Commit Graph

12834 Commits

Author SHA1 Message Date
Sebastian Sumpf
93b3e7d12f libc: socket_fs_plugin add monitor call
Add monitor call for '_fd_read_ready' because this maps to 'poll' in
'vfs_lxip' which should be executed by the EP.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
701856b06a dde_linux: copy vfs_lxip -> vfs_legacy_lxip
Make a copy of vfs_lxip so it can be revived easily. The plugin can now
be used like

! <legacy_lxip dhcp="yes"/>

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
27b1017fe9 test/lxip_raw: test using Genode socket C-API directly
The lxip_raw.run script will spawn a client/server scenario that tests
Genode C-API calls. The scenario can be used standalone, meaning no
actual network card is required.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
42d9640443 lxip: update to Linux 6.1.20
This commit updates lxip from version 4.4.3 to 6.1.20. It uses the
current lx_kit approach and is a shared library again. The stack has
been tested for x86_32/x86_64/arm_v6/arm_v7/arm_8.

The C-interface of the IP stack can be found under
lxip/include/genode_c_api/socket.h.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
c2080ecc03 linux.port: lxip_ip_config.patch
The patch makes it possible to re-configure the IP settings via DHCP or
static.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
bcb4b231af linux.port: lxip_checksum_32.patch
CONFIG_X86_USE_PPRO_CHECKSUM is a 'def_bool y' and gets re-enabled by
'make olddefconfig'. The PPRO version contains text relocations which we cannot
have in binaries (e.g., 'lea 45f(%ebx ...).').

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
364e58097d lx_emul: prevent division by zero
Check if ceil is <= 1 to prevent division by zero in
'__get_random_u32_below'.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
a0840d7a06 lx_emul/shadow: uaccess_32/64
Expand shadow header with '__copy_from_user_inatomic_nocache' and/or
'__copy_from_user_flushcache'.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
1006e9d987 lx_emul/x86_32: atomic64 set and cmpxchg
64-Bit versions for 32-Bit architecture.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
8c26a142c6 lx_emul: spinlock add bh_enable/disable
add bottom half enable/disable to functions with suffix "_bh" were
missing, because some functions release the bottom half separately
(__neigh_event_send).

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
c2a2ed67bb lx_kit/lx_emul: support explicit init call
Add the possibility to execute a module-init call by name using
'lx_emul_init_call', this is used, for example, by lxip to configure and
re-configure the IP address through 'ip_auto_config'.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
7abe07e2cf lx_emul/virt: remove stop from 'rcu_barrier' dummy
issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
df459c46ef usb_net: adjust to virt_linux config changes
* remove dummies for '__alloc_pages' and friends

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
5dc4ee6524 wireguard: adjust to virt_linux config changes
* remove dummies for '__alloc_pages'
* adjust arm_64 -> arm_v8
* remove IPv6 dummies (disabled in virt_linux)

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
7395f24423 virt_lx_emul: add shadow 'page_alloc.c'
Add suspport for '__alloc_pages' in virt_linux

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
7d62b891f8 virt_linux api: adjust to lx_kit split of arm_v(6|7|8)
Adjust API path.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
e21e32a793 virt_linux: disable IPv6
Will be re-enabled with IPv6 support of lxip.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
c2650cd1e7 virt_linux_generated: sort dep.list
sort 'dep.list' using LC_ALL=C.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
360d38c36d dde_linux: move lxip -> legacy_lxip
move lxip stack to 'legacy_lxip' so it can be revived easily.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
f19cd8416e lx_kit: split includes and setjmp into arm_v(6|7|8)
Move 'arch_execute.h' headers and 'setjmp/longjmp' implementation from
arm/arm_64 to arm_v(6|7|8).

issue #5104
2024-02-26 08:59:07 +01:00
Martin Stein
1336b0a751 mmio: upper-bounds checks
The classes Genode::Mmio, Genode::Register_set, Genode::Attached_mmio, and
Platform::Device::Mmio now receive a template parameter 'size_t SIZE'. In each
type that derives from one of these classes, it is now statically checked that
the range of each Genode::Register::Register- and
Genode::Register_set::Register_array-deriving sub-type is within [0..SIZE).

That said, SIZE is the minimum size of the memory region provided to the above
mentioned Mmio classes in order to avoid page faults or memory corruption when
accessing the registers and register arrays declared inside.

Note, that the range end of a register array is not the end of the last item
but the end of integer access that is used for accessing the last bit in the
last item.

The constructors of Genode::Mmio, Genode::Attached_mmio, and
Platform::Device::Mmio now receive an argument 'Byte_range_ptr range' that is
expected to be the range of the backing memory region. In each type that derives
from on of these classes, it is now dynamically checked that 'range.num_bytes
>= SIZE', thereby implementing the above mention protection against page faults
and memory corruption.

The rest of the commit adapts the code throughout the Genode Labs repositories
regarding the changes. Note that for that code inside Core, the commits mostly
uses a simplified approach by constructing MMIO objects with range
[base..base+SIZE) and not with a mapping- or specification-related range size.
This should be fixed in the future.

Furthermore, there are types that derive from an MMIO class but don't declare
any registers or register arrays (especially with Platform::Device::Mmio). In
this case SIZE is set to 0. This way, the parameters must be actively corrected
by someone who later wants to add registers or register arrays, plus the places
can be easily found by grep'ing for Mmio<0>.

Fix #4081
2024-02-26 08:59:07 +01:00
Martin Stein
ee6f5f3b1b base: remove deprecated driver files
As far as I can tell, these file are not used anymore.

Ref #4081
2024-02-26 08:31:06 +01:00
Sebastian Sumpf
7ea020d471 usb_hid: add 'usb_clear_halt'
This function is called by 'hid_reset' when the HID_CLEAR_HALT bit set,
as it happens to be on the Rasbarry Pi 1.

issue #4958
2024-02-26 08:31:06 +01:00
Sebastian Sumpf
d191c376f7 dde_linux: add libnl for arm_v6
This was covered before by SPEC 'arm'.
2024-02-26 08:31:06 +01:00
Christian Prochaska
7bfc8f2fde tool: add backtrace
Fixes #5103
2024-02-26 08:31:05 +01:00
Pirmin Duss
55007f5bd9 i2c: bus speed configuration node
I2C EEPROMs of the type at24xxx are really slow (ca. 10 kHZ).

This adds the `bus_speed_khz` attribute to the config of the driver and
adapts the i.MX8 driver to support the feature.

Issue gapfruit#1996
Fixes genodelabs#5090
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
40c8e76f49 dde_linux: adjust test/driver_time to virt_linux
Adjust test to current virt_linux configuration.

issue #5095
2024-02-26 08:31:05 +01:00
Benjamin Lamowski
8540b4c9d1 hw: rename Vm_data to Vcpu_data
Rename Vm_data to Vcpu_data to make it clear that the allocated data is
per vCPU, not per VM.

Issue #5100
2024-02-26 08:31:05 +01:00
Benjamin Lamowski
69b76ba9ed hw: move physical VMCB address out of the VMCB
The physical address of the memory used for the guest VMCB is already
present in Vcpu_data. Use the information there instead of storing the
physical address in the host data area, thereby freeing up 8 bytes for
a bigger Mmio class.

Issue #4081
2024-02-26 08:31:05 +01:00
Benjamin Lamowski
cec7847502 vbox6: add support for Windows BSOD logging
Hitting a BOSD in a Windows guest in Virtualbox 6 leads to calling
 `DBGFR3ReportBugCheck`, which leads to the following error since it is
 unimplemented in our port:

```
 Error: DBGFR3ReportBugCheck: DBGFR3ReportBugCheck called, not implemented, eip=0x1a5c4e4
```

Including the actual method from Virtualbox 6 enables logging
diagnostics for the Windows Blue Screen of Death (BSOD).
To see Blue Screen logging output, enable "dbgf" and "gim" logging
via the `VBOX_LOG` following environment variable in the vbox6 runtime
config.
When manually triggering a BSOD in the Windows guest, this should
produce the following logging diagnostics:

```
GIM: HyperV: Guest indicates a fatal condition! P0=0xe2 P1=0x0 P2=0x0 P3=0x0 P4=0x0
GIMHv: BugCheck e2 {0, 0, 0, 0}
MANUALLY_INITIATED_CRASH
```

Fixes #5099
2024-02-26 08:31:05 +01:00
Norman Feske
de6048f517 libc: consistency of tv_sec when tv_nsec wraps
The libc's internal calculation of the tv_sec and tv_nsec fields must be
based on the same ms value. Otherwise, tv_sec is not always immediately
incremented whenever tv_nsec wraps. For applications, this inconsistency
can result in observed jumps in time.

Fixes #5098
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
684de7a57b lib/wifi: remove static constructors
Remove static constructors from 'socket_call.cc'

issue #5096
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
491ab232bf wifi: remove 'Component::construct'
Init calls are not static constructors anymore, so 'Lx_kit::Env' is not
required to be initialzed before static constructors are called.

issue #5096
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
1b4f7ae0d3 lx_emul: generate initcalls during build
Functions registered with 'module_init' (i.e., '__define_initcalls'),
'OF_DECLARE', and 'DECLARE_PCI_FIXUP_CLASS_FINAL' used to be static
constructors and had be explicitly registered using
'exec_static_constructors' before executing any Linux code.

With this commit we remove the constructor attributes from these
functions and create a global function pointer in the form of

__initptr_<name>_<id>_<counter>_<line number of macro>

'import-lx_emul_common.inc' will collect these '__initptr' symbols after
the compile step and generate a 'lx_emul_register_initcalls' function
that executes the functions pointed to. This step is now automatically
performed in 'lx_emul_start_kernel'. This way a call to
'exec_static_constructors' can be omitted in case there are no other
constructors in place.

issue #5096
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
f9bff3bc7c dde_linux: remove library mk for usb_host_include
This library does not exist anymore.

issue #5095
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
dea712ab72 usb_hid: add support for arm_v6
Also split into spec 'arm_v(6|7|8)'

issue #5095
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
8851b64825 usb_net: add SMSC95xx driver for arm_v6
issue #5095
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
b73765cf9b usb_net: add support for arm_v6
Also split into spec 'arm_v(6|7|8)'

issue #5095
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
01369546d2 dde_linux: adjust wireguard and test to arm_v8
spec 'arm_64' has been moved to 'arm_v8'

issue #5095
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
a67bc59686 virt_linux: add arm_v6
also split into arm_v(6|7|8)

issue #5095
2024-02-26 08:31:05 +01:00
Sebastian Sumpf
bb06e8451a dde_linux: split lib/mk into arm_v6/7/8
Split 'arm' and 'arm_64' into 'arm_v(6|7|8)'

issue #5095
2024-02-26 08:31:05 +01:00
Christian Prochaska
6aba9b1b9a tool/run/depot.inc: allow depot user in used_apis
Issue #5092
2024-02-26 08:31:05 +01:00
Christian Helmuth
94ebdc9269 qt5: add missing header to qpa_init.h
Thanks to Andreas for the hint.
2024-02-26 08:31:05 +01:00
Norman Feske
0d34988929 test.run: remove obsolete boot-module heuristic
The ROMs of built executables and shared objects are now covered by the
[build_artifacts].

Issue #4860
2024-02-26 08:31:04 +01:00
Alexander Boettcher
443008777b vbox_share: provide .vbox file
The vbox file is missing to run the test scenario

Related to issue #4860
2024-02-26 08:31:04 +01:00
Christian Helmuth
6855b27553 openssl: update to version 1.1.1w 2024-02-26 08:31:04 +01:00
Christian Helmuth
e440ab40ef virt/lx_emul: check for NULL urb in usb_submit_urb()
The Linux implementation also includes this check. NULL urb submission
happened with Wacom touch devices.
2024-02-26 08:31:04 +01:00
Christian Helmuth
2584c104e0 usb_hid: use lib/kfifo.c
Required by Wacom touch drivers.
2024-02-26 08:31:04 +01:00
Christian Helmuth
092e4a001f usb_hid: mode led handling to shadow input-leds.c
The former implementation relied on input drvdata always pointing to
struct hid_device, which is not true for Wacom touch devices (at least).
Now, we implement the input handler for devices providing LEDs
(evbit[EV_LED] set) only and use input_inject_event() to set the LED
states.
2024-02-26 08:31:04 +01:00
Norman Feske
d6d1b8e025 Road map for 2024 2024-02-26 08:31:04 +01:00