14000 Commits

Author SHA1 Message Date
Alexander Boettcher
d9481d6121 grub2: update to upstream GRUB 2.12+
Fixes #5503
2025-04-10 14:24:31 +02:00
Christian Helmuth
2354a6bddb Remove stale raw/download_coreplus recipe
Issue #5492
2025-04-10 14:24:31 +02:00
Christian Helmuth
74a2aeb28a Remove virtualbox5
Fixes #5492
2025-04-10 14:24:31 +02:00
Stefan Kalkowski
3cb76194a1 libusb: remove No_device exception
An exception thrown within `update_urbs` in the Usb::Device of
Usb::Interface utilities can lead to unhandled URBs, because of
the unexpected, early return from the function.
Instead of throwing an exception when the device vanishs, tunnel
an appropriated error return value through the C/C++ call-chain
by using the library-specific URB class derivation as container.
In case of any failure during URB completion, handle it's libusb
specific completion immediatedly.

Ref genodelabs/genode#5434
2025-04-10 14:24:31 +02:00
Norman Feske
ff83de2bbc base: decouple 'Pd_session' from 'Ram_allocator'
With this patch, the 'Pd_session' interface no longer implements the
'Ram_allocator' interface, which allows us to change the
'Genode::Ram_allocator' semantics (as a subsequent step) without
affecting core's PD service.

The patch also replaces the client-local implementation of
'Pd_session_client::dataspace_size' by the proper RPC call 'ram_size' to
core, which mitigates the potential risk of de-referencing a dataspace
cap of an untrusted origin. E.g., in scenarios where the monitor
component requests the size of a dataspace allocated by the debugging
target.

Since 'ram_size' is an RPC call, it cannot be const. Hence, the
'Ram_alloctor::dataspace_size' has become non-const.

The new 'Pd_ram_allocator' implements the 'Ram_allocator' interface by
using a PD session.

Issue #5502
2025-04-10 14:24:31 +02:00
Christian Helmuth
25fb8a07eb Increase timeout in wg_fetchurl test
Under heavy load, the host may take its time to transfer 2x 16MiB on
some platforms.

Also, I replaced the explicit component builds by import_from_depot.
2025-04-10 14:24:11 +02:00
Christian Helmuth
a7af82fd81 Increase cap quota (for lxip) in nic_bridge test 2025-04-10 14:24:11 +02:00
Christian Helmuth
1f181f6ce3 genode_c_api: errors on socket/nic_client init
Prevent uncaught exceptiosn in (NIC-client) initialization but report
as errors from genode_socket_init() / genode_nic_client_create().
2025-04-10 14:24:11 +02:00
Alexander Boettcher
14cfc765c6 intel/gpu: allocate aperture on demand
in order to support running intel/gpu next to boot_fb, which has access
to part of the mmio aperture. The aperture is tried to be accessed not
before a Platform client (intel/display) or the first GPU client
appears.

Fixes #5497
2025-04-10 14:24:11 +02:00
Norman Feske
aa9ff3894c base: scoped access of Native_thread
With planned removal of Thread:: exceptions, we need to consider that a
'Thread' object may exist without a valid 'Stack' and therefore without
a valid 'Native_thread', which is hosted as part of the 'Stack'.

This patch reworks the code that accesses the 'Native_thread' to use the
new 'Thread::with_native_thread' interface. Within the local scope,
the native thread is referred to as 'nt'.

The _init_platform_thread and _deinit_platform_thread() have been
replaced by _init_native_thread and _deinit_native_thread, which take
a 'Stack &' as argument.

As a safety caution, 'Native_thread' objects can no longer be copied.

Issue #5245
2025-04-10 14:24:11 +02:00
Norman Feske
d241baec61 base-foc: remove Core_cap_index::_gate
This member is apparently unused.
2025-04-10 14:24:11 +02:00
Norman Feske
f53c1f3b2e base-foc: don't use Native_thread in pager code
The Native_thread type was solely used to refer to the originator of a
page fault. A plain kcap value suffices for that.
2025-04-10 14:24:11 +02:00
Christian Helmuth
f386b93e52 hw: enable vbox6_genode_usb_hid_raw 2025-04-10 14:24:11 +02:00
Christian Helmuth
5619ccd940 Set USB bios_handoff="no" in run scripts
This is the default setting in Sculpt currently, so use it also
for testing.
2025-04-10 14:24:11 +02:00
Christian Helmuth
cc465070d2 dde_linux: remove -Wframe-larger-than=2048
Prevents the following (long-since unattended) warning in intel_fb.

.../repos/pc/src/driver/framebuffer/intel/pc/spec/x86_64/../../lx_user.c:703:1: warning: the frame size of 2336 bytes is larger than 2048 bytes [-Wframe-larger-than=]
2025-04-10 14:24:11 +02:00
Christian Helmuth
73213872f8 intel_fb: amend connectors report with display name
The EDID reported by connected displays contains data to identify
displays based on product strings and PNP IDs. Amended the connectors
report <connector> node by an optional display_name attribute containing
the EDID information if available.

Fixes #5499
2025-04-10 14:24:11 +02:00
Norman Feske
af3e8725ca Rename 'Constrained_ram_*' to 'Accounted_ram_*'
Fixes #5495
2025-04-10 14:24:11 +02:00
Stefan Kalkowski
1c2822fcc4 hw: prepare memory area for cpu's correctly
To correctly deal with sparsely used cpu numbers on x86,
add an array to the board data-structure that tracks the actual
cpus detected. Later when memory is available, and the per-cpu
kernel stacks and cpu-local memory gets initialized, use the
array to reference the correct memory slots.

Fix genodelabs/genode#5468
2025-04-10 14:24:11 +02:00
Stefan Kalkowski
b147dad267 hw: add include guards to generated consts header
The special `hw/memory_consts.h` header file that is automatically
generated from an assembler base file to avoid pre-processing assembler
files, was missing inclusion guards.

Ref genodelabs/genode#5468
2025-04-10 14:24:11 +02:00
Norman Feske
b601ad5272 util/string.h: ease custom Number_of_bytes types
This patch exposes the formatted K/M/G byte output of 'Number_of_bytes'
as a class template function that accepts different basic types. This
enables the easy creation of a formatted output type for a type larger
than size_t.

Introduced in the context of issue #5489
2025-04-10 14:24:11 +02:00
Norman Feske
3cd5a69b65 base: make Xml_node publicly noncopyable
This patch limits the Xml_node's copy constructor for internal use only.

Fixes #5411
2025-04-10 14:24:11 +02:00
Norman Feske
5a9016b010 ports,dde_linux/bsd/ipxe,pc: don't copy Xml_node
Issue #5411
2025-04-10 14:24:11 +02:00
Christian Helmuth
4aa33bce33 vbox6: prevent deadlock in framebuffer implementation
QuerySourceBitmap() may end up in a block for VM response, while the VM
becomes blocked on the critsect in framebuffer.

Fixes #5477
2025-04-10 14:24:11 +02:00
Johannes Schlatow
1df55bd2dc platform: use default domain only as fallback
The default IOMMU domain is used as a default if the kernel has IOMMU
support and if devices are not linked explicitly linked to a IOMMU
device. As soon as an IOMMU device is present, the kernel IOMMU is never
used. Hence, there is no point in maintaining the default domain if
there are other domains present.

genodelabs/genode#5494
2025-04-10 14:24:11 +02:00
Johannes Schlatow
e4704a1d39 platform: fix potential double insertion
When a session component has multiple IOMMU domains and `add_range()`
fails not on the first but on another domain, the range is not removed
from the first domain. This causes double insertion on the next try.

genodelabs/genode#5494
2025-04-10 14:24:11 +02:00
Norman Feske
37ec1db5ea Remove unused vfs_replay component
Fixes #5493
2025-04-10 14:24:11 +02:00
Norman Feske
7187499133 block_tester: modernize internal structure
Don't copy Xml_node, remove the use of exceptions, split test mechanics
from the scenario's data representation, avoid inheritance, use const
where possible.

Note that this patch also changes the batching of the <replay> scenario.
Unlike the other scenarios, it did not use to cap the maximum number of
jobs according to 'batch' attribute. The interpretation of the 'batch'
attribute has now been unified.

Issue #5411
Fixes #5489
2025-04-10 14:24:11 +02:00
Johannes Schlatow
bdac10cb05 sculpt_manager: improve hover-seq coordination
When a single TOUCH and TOUCH_RELEASE event are submitted
simultaneously, the input sequence number is incremented twice. In
consequence, menu view will never generate a hover report for the
intermediate sequence number. However, this is the report that the
sculpt manager is waiting for to correlate it with the TOUCH event.

Only incrementing the input sequence number when the state changed from
not clicked to clicked exposes another corner case: When the last event
unfocused a dialog (e.g. the popup dialog) and when the current event
touches the dialog, the seq event is not delivered to the dialog because it
is not focused. Therefore, the seq event should be submitted after submitting
the TOUCH event.

genodelabs/genode#5491
2025-04-10 14:24:11 +02:00
Johannes Schlatow
9fdffcaa81 event_filter: add touch-gesture filter
Add configurable swipe and hold gestures.

genodelabs/genode#5491
2025-04-10 14:24:11 +02:00
Benjamin Lamowski
ea9093c83b hw: rename (read,write)_vcpu_state to load/store
The methods to read and write state to the vCPU were named
from the viewpoint of the `Vcpu_state` data structure that was being
exchanged with the VMM, i.e. `read_vcpu_state()` was reading the data
structure (and writing it into the vCPU) wheras `write_vcpu_state()` was
writing the vCPU's state into `Vcpu_state`. This is confusing from a
more generic understanding of a "vCPU state".

Rename the state manipulation methods into `load()` and `store()`, where
`load()` loads the supplied `Vcpu_state` into the vCPU and `store()` stores the
vCPU's state in the supplied `Vcpu_state`.

Issue #5483
2025-04-10 14:24:11 +02:00
Norman Feske
6edbfbf7c3 gems: don't copy Xml_node
Issue #5411
2025-04-10 14:24:11 +02:00
Norman Feske
eb572914b1 libports: don't copy Xml_node
Issue #5411
2025-04-10 14:19:03 +02:00
Norman Feske
368509ff9b libc: don't copy Xml_node
This patch reworks the libc's internal config handling by replacing
scattered Xml_node accesses by the new 'Config' type that is parsed
at once. The config ROM has been moved from 'Env_implementation' to
the libc kernel.

Issue #5411
2025-04-10 14:18:41 +02:00
Norman Feske
636eb7b53f os: don't copy Xml_node
As this patch changes 'Vfs::File_system_factory::create', the
VFS plugins must be adapted, now taking 'Xml_node const &' as
argument.

Issue #5411
2025-04-10 14:18:41 +02:00
Norman Feske
f3e4e04de7 base: don't copy Xml_node
Issue #5411
2025-04-10 14:15:34 +02:00
Norman Feske
25d4b8f944 vfs_block.run: add missing build of vfs libs 2025-04-10 14:15:34 +02:00
Benjamin Lamowski
c3c719fce7 hw: simplify x86 vCPU initialization
Initializing a vCPU on base-hw involved a round-trip to the kernel to
send the initial startup exit signal and setting up the vCPU on first
run of the vCPU thread.

Signal the vCPU handler directly from the base libary. This removes the
need to call `Vm::run()` during construction of the vCPU, possibly from
a remote core. Check that `Vm::run()` and `Vm::pause()` are only called
from the local CPU core. Finally, move the initialization of the vCPU
from `Vm::proceed()` to `Vm::run()`, so that the `Vcpu_state` can be
synced from the VMM directly after initialization.

Fixes #5483
2025-04-10 14:15:34 +02:00
Benjamin Lamowski
dd8b78575e hw: fix "hw: x86_64: clean up vCPU startup"
Syncing the vCPU state with the VMM before the virtualization technology
was inititialized on the target CPU core may fail, such as on VMX where
the resulting `vmread` instructions will cause #UD faults.

Skip syncing the vCPU state when the vCPU isn't initialized
yet and sync the initial `Vcpu_state` from the VMM when the vCPU is
known to be initialized.

Issue #5474
2025-04-10 14:14:07 +02:00
Benjamin Lamowski
71e9b603a7 hw: extend "hw: explicit cpu state argument in kernel entry" for VMX
The work in #5425 missed an adaption for setting up the stack pointer
and pushing the appropriate TRAP_VMEXIT exception value before jumping
to `_kernel_entry` after returning from `vmlaunch`.

Adapt the VMX implementation and remove a now superfluous argument from
the initialization method.

Issue #5474
2025-04-10 14:14:07 +02:00
Stefan Kalkowski
aa0927b194 pistachio: patch kernel to get rid of python tool
Patch the kernel's build system to not use python tooling
for different configurations, instead we only support one
fixed configuration for x86 (32-bit) only.

Ref genodelabs/genode#5487
2025-04-10 14:14:07 +02:00
Sebastian Sumpf
843f5c32af dde_linux: review license headers
* add "or later" to GPLv2 license header where possible in order to make
  it compatible with GPLv3 based licenses

* add license header to non-trivial files where missing

fixes #5486
2025-04-10 14:14:07 +02:00
Norman Feske
97ea0d15ec sandbox: don't copy Xml_node
Issue #5411
2025-04-10 14:14:07 +02:00
Norman Feske
7aefaff646 os/buffered_xml.h: don't copy Xml_node
The public 'xml' const member replaces 'with_xml_node()' and the 'xml()'
accessor.

Issue #5411
2025-04-10 14:14:07 +02:00
Norman Feske
05d69a0bb3 os: increase mtime resolution to milliseconds
This patch changes the 'Timestamp' type of the VFS and file-system
session to an unsigned 64-bit value holding the number of milliseconds
since the UNIX epoch (beginning of 1970).

The special case of an invalid timestamp has been removed as it was
never consistently handled anyway.

In contrast to the POSIX timespec, which represents tv_sec and tv_nsec
both as signed values, this patch uses an unsigned value because the
interpretation of negative tv_sec and tv_nsec values is muddy.
Hypothetical modification times older that 1970 are capped at 1970.

Fixes #3511
2025-04-10 14:14:07 +02:00
Christian Helmuth
5cfe44ab72 Check stable output in file_vault_client test
Just output the date (not hours and minutes) in ls as RTC is fixed to
2018-01-01 00:01.

Issue #4371
2025-04-10 14:13:26 +02:00
Alexander Boettcher
2c1e25fcf7 nova: use branch with sanitized HIP population
to avoid boot failures as seen with X201 after #5413.

Fixes #5481
2025-04-10 14:13:26 +02:00
Norman Feske
2c2f016501 vfs_rump: retrieve modification time in stat
Issue #4371
2025-04-10 14:13:26 +02:00
Johannes Schlatow
9e2e592283 sculpt_manager: touch control of popup dialog
When trying to control the popup dialog with touch events, the dialog
was immediately closed (on any touch). This was a consequence of
evaluating the dialog's hover state without waiting for the
corresponding hover report. For regular motiong events, the hover report
is updated when the pointer moves. For touch events, however, the
hover report is only updated when the touch occurs. We therefore need to
wait for the hover report that corresponds to the touch event before
deciding about closing the popup dialog.

Since menu_view's hover report is not updated for clicks/touches outside any
dialog, we are now using nitpicker's hover report, which also got
augmented by the sequence number in order to be correlated with the
click/touch event.

Fixes #5485
2025-04-10 14:13:26 +02:00
Norman Feske
1336495858 nitpicker: re-eval pointer on panorama change
Whenever the panorama changes, eagerly re-evaluate the validity of the
current pointer position. Otherwise, the pointer may stay at an invisible
position until the next input motion happens. During this intermediate
phase, the position featured in the hover report cannot reliably be
matched against the panorama report (as needed by the sculpt manager
to let the leitzentrale GUI follow the pointer).

Issue #5370
2025-04-10 14:13:26 +02:00
Norman Feske
38650149b6 nitpicker: report both xpos,ypos for pointer
Don't omit either attribute whenever the value is 0. If the pointer is
defined, both attributes are reported. This way, the presence/absence
of the attribute expresses the validity of the pointer.

Issue #5370
2025-04-10 14:13:26 +02:00