Commit Graph

12814 Commits

Author SHA1 Message Date
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
Pirmin Duss
4535a27dfc libc.run: add missing library libm
Issue genodelabs/genode#5094
2024-02-26 08:31:04 +01:00
Josef Söntgen
00d3f61961 libdrm/etnaviv: align implementation with lima
This commit brings the etnaviv back end implementation in line
with the one from lima. Since the etnaviv driver itself handles
different contexts implicitly rather explicitly like lima and
iris for the moment only a main-context is used for all operations.

Issue genodelabs/genode-imx#8.
2024-02-26 08:31:04 +01:00
Johannes Schlatow
43274fbf5f depot: add tcp_terminal recipe
required for goa_testbed

genodelabs/genode#5093
2024-02-26 08:31:04 +01:00
Johannes Schlatow
fb58e46672 lighttpd: omit O_NONBLOCK
Uploading large files via HTTP PUT failed when the file system was
accessed via a file system session because lighttpd opened the
destination file with O_NONBLOCK and the write operation stalled
at some point.

genodelabs/genode#5093
2024-02-26 08:31:04 +01:00
Josef Söntgen
840bb5f90d lighttpd: enable mod_webdav module
genodelabs/genode#5093
2024-02-26 08:31:04 +01:00
Josef Söntgen
8a94dd2cb1 lighttpd.run: add mod_webdav
- using <inline> for random is not gonna fly when getentropy is called
  multiple times (and eventually fails due to EOF)

genodelabs/genode#5093
2024-02-26 08:31:04 +01:00
Josef Söntgen
ac790cd6fb ports: update lighttpd to 1.4.73
genodelabs/genode#5093
2024-02-26 08:31:04 +01:00
Josef Söntgen
b19d8a50d5 lighttpd.run: fix libc rtc setting
genodelabs/genode#5093
2024-02-26 08:31:04 +01:00
Johannes Schlatow
83e3178e9b Add FindXxx.cmake files to api archives
The FindXxx.cmake files are used by Goa's cmake support.

genodelabs/genode#5087
2024-02-26 08:31:04 +01:00
Christian Prochaska
f3cf4a7d7b qt5: adapt QtWebEngine for host GCC 13
Fixes #5091
2024-02-26 08:31:03 +01:00
Norman Feske
96ea73c3fe sculpt: preset for goa_testbed
Issue #5092
2024-02-26 08:31:03 +01:00
Norman Feske
7c76ec897c sculpt: add "http" and "telnet" nic_router domains
These domains allow for the hosting of plain http and telnet servers
reachable from the outside. The change is designated for the goa
testbed.

Issue #5092
2024-02-26 08:31:03 +01:00
Alexander Boettcher
c2cd4102d8 gpu/intel: prepare GPU structures for resume
The commit is a preparation commit for suspend/resume. It prepares the GPU
structures relying on gmadr.cap() (MMIO) to be re-constructible by applying
the with* pattern to context, ring_buffer and ggtt mmio map. It removes
the managed dataspace handling of gmadr subsets to make the with_* pattern
possible.

Issue #5081
2024-02-26 08:31:03 +01:00
Alexander Boettcher
d02f4866ea gpu/intel: make platform resources reconstructible
This commit is a preparation commit for suspend/resume. The commit
refactors the code in order to consolidate all Platform resources into one
instance. All users within the GPU driver should access the resources with
with_* functions, which checks whether the device resource is usable. The
callers are not allowed to store any references to the provided resources.

With this change, it will be possible in follow up commits, to release
the platform device and to re-acquire it and its resources, e.g. mmio, irq,
gmadr.

Issue #5081
2024-02-26 08:31:03 +01:00
Alexander Boettcher
c5a1e3daa3 acpi_suspend: extend test scenario
- add PS/2 input drivers
- add GPU client test case - glmark2
- remove display driver before suspend
- route log output via terminal on display to gather information, since in
  most cases serial/AMT is not available after ACPI resume

Issue #5081
2024-02-26 08:31:03 +01:00
Christian Prochaska
3062b7d780 lx_emul: add kvfree_call_rcu
Fixes #5089
2024-02-26 08:31:03 +01:00
Alexander Boettcher
27c9825bf0 intel/display: support larger resolutions
- fix detection to re-allocate framebuffer
- free up resources on framebuffer switching

Thanks Peter for reporting and fixing.
2024-02-26 08:31:03 +01:00
Benjamin Lamowski
25c7204b2a hw: clear RAM dataspaces in chunks
Clearing very large RAM dataspaces could fill up core's page table,
because the dataspaces are locally mapped to clear them.
This would manifest in a loop where exhausting the local page table
leads to its flushing (which does not work for core) and a retry that
again fills up the page table and so on.

To prevent this, flush RAM dataspaces in chunks of at most 128MiB.

Fixes #5086
2024-02-26 08:31:03 +01:00
Norman Feske
41731a2439 Make Session_object::warning const
This allows the use of the label-prefixed log utilities from a const
method of a derived class.
2024-02-26 08:31:03 +01:00
Benjamin Lamowski
8b5aa538e7 virtualbox6: fix runscript broken by refactoring
Add the `test.iso` and `virtualbox6.vbox` to `boot_modules`
that were omitted during the refactoring in #4860.

Fixes #5085
2024-02-26 08:31:03 +01:00