10797 Commits

Author SHA1 Message Date
Norman Feske
016d63703d depot: update recipe hashes 2025-04-10 14:55:59 +02:00
Norman Feske
a2058a8d21 capture session: add viewport as buffer attribute
This patch adds the viewport area to the interface.
It is not evaluated by the nitpicker GUI server yet.

Issue #5518
2025-04-10 14:55:59 +02:00
Alexander Boettcher
5d8a8257d6 boot_fb: use physical resolution of framebuffer
due to requirements introduced by #5428 to avoid errors alike:

Warning: surface 1376x768 mismatches texture 1366x768

Side effect of this is, that also pixels are captured which are not visible on
screen actually.

Issue #5428
Issue #5501
2025-04-10 14:55:59 +02:00
Alexander Boettcher
774cdec4bc okl4: use python3
Issue #5487
2025-04-10 14:55:59 +02:00
Norman Feske
4c01ba1663 sculpt: version 25.04
Issue #5501
2025-04-10 14:55:59 +02:00
Norman Feske
1ef80e86e2 base: introduce Local_rm for local Region_map
The new 'Local_rm' type offers a narrow interface for the interaction
with the component-local address space, managing the lifetime of
attachments by using the 'Allocation' API.

Fixes #5516
2025-04-10 14:55:57 +02:00
Christian Helmuth
8c4bd7d9da gui_fader: restore previous dither-matrix indexing
The dither matrix is not perfectly random but provides a kind of
pseudo-random pattern that fits the original dithering approach with
global coordinate based indexing. If the matrix is offset by one line
each 16 pixels the pattern becomes visible as alternating light and dark
columns.

Follow-up commit to "gui_fader: precompute dithered 16x16 tile".

Issue #5501
2025-04-10 14:55:21 +02:00
Norman Feske
84eb264786 util/attempt.h: mark 'Attempt' types as nodiscard
This catches bugs early on. E.g., when leaving an 'Allocation'
unused, it gets immediately deallocated, which is most probably not
intended. For regular 'Attempt' objects, this change encourages
the proper propagation of errors, or at least the logging of unexpected
conditions.

Fixes #5513
2025-04-10 14:55:21 +02:00
Norman Feske
e380d0da95 base: use 'Allocation' interface for mem alloc
This patch converts the memory-allocator interfaces ('Allocator',
'Range_allocator') and their implementations ('Heap', 'Sliced heap',
'Slab', 'Allocator_avl', 'Synced_allocator') to the new 'Allocation'
utility. The new interface resides at base/memory.h whereas the
traditional allocators implement the new interface.

Down the road, the traditional allocators can successively be decoupled
from the traditional 'Allocator' and 'Range_allocator' interfaces.

Issue #5502
Issue #5245
2025-04-10 14:55:21 +02:00
Norman Feske
30e200f4ae base/ram.h: rename Unmapped... to Constrained...
The 'Allocation' template clears the way for precisely differentiating
allocators via (a variety of) C++ types. It turns out that this approach
alleviate the need to consider the differentiation between
mapped/unmapped in ram.h.

With the new approach, a mapped allocator can be built as a template
taking a ram allocator (constrained/unconstrained) and a local
region-map (core local_rm, env local_rm) as ingredients.

Since the differentiation between constrained/unconstrained has its
natural place at ram.h, name the current RAM allocator
'Ram::Constrained_allocator', in anticipation of a future
'Ram::Unconstrained_allocator' with weakened error conditions.

Issue #5502
2025-04-10 14:55:21 +02:00
Norman Feske
08010003e3 core: remove exception from Trace::Control alloc
This patch models the 'Trace::Control_area' as an allocator of slots
using the new 'Allocation' utility and thereby removes the former
exception-based error propagation.

Issue #5245
2025-04-10 14:55:21 +02:00
Norman Feske
b4a746bc89 base/error.h: add raise() interface
The new 'raise' function can be used instead of 'throw' to keep the
framework headers void of C++ throw statements, which would otherwise
prevent the compilation of the headers with -fno-exceptions.

In the presence of the C++ runtime, the 'raise' implementation reflects
the supplied error value(s) as C++ exceptions of the appropriate type.
In the (future) optional absence of the C++ runtime, 'raise' remains
unresolved, which then gives us the assurance that the binary contains
no code path leading to 'raise', all error conditions must have been
covered in other ways than 'raise'.

For this reason, 'Genode::raise' is not provided by the base library
but the cxx library (C++ runtime). Once we allow components to opt out
of the cxx library, 'raise' will automatically become unresolved for
those strict components.

Issue #5245
2025-04-10 14:55:21 +02:00
Norman Feske
fd5172e1f3 base/output.h: make Alloc_error printable
Issue #5245
2025-04-10 14:55:21 +02:00
Norman Feske
146fd54f2d base/lib/symbols/ld: fix sorting order 2025-04-10 14:55:20 +02:00
Norman Feske
e69e0e3f1c base/slab.h: remove exceptions from constructor
Issue #5245
2025-04-10 14:55:20 +02:00
Norman Feske
73d6171850 util/attempt.h: make 'Attempt' printable 2025-04-10 14:55:20 +02:00
Norman Feske
fee2f354dc util/attempt.h: introduce 'Ok' type
This type alleviates the need to re-introduce custom '*_ok' types
whenever a result can be an error but no value.
2025-04-10 14:55:20 +02:00
Norman Feske
2e76f4fc58 base: move common exception types to exception.h
The univerally used exception types Out_of_ram, Out_of_caps, and Denied
used to be defined at quota_guard.h and ram_allocator.h whereas the
types are broadly used. This patch gathers those type definitions at
the central place exception.h instead, to gradually untangle the reliance
on exceptions, i.e., in quota_goard.h, and to make the output of error
messages printing exception types ('abort') more concise.

Issue #5245
2025-04-10 14:55:20 +02:00
Norman Feske
7e0d2084fb base: add base/error.h for common error types 2025-04-10 14:55:20 +02:00
Norman Feske
9febe62a78 app/dummy: use 'Ram' API
Issue #5502
2025-04-10 14:55:20 +02:00
Norman Feske
689fc1eb93 Introduce new 'Ram' API types
The new types in base/ram.h model different allocation scenarios and
error cases by mere C++ types without using exceptions. They are meant
to replace the former 'Ram_allocator' interface. As of now, the
'Unmapped_allocator' closely captures the former 'Ram_allocator'
semantics. The 'Constrained_allocator' is currently an alias for
'Unmapped_allocator' but is designated for eventually allocating
mapped RAM.

In contrast to the 'Ram_allocator' interface, which talked about
dataspace capabilites but left the lifetime management of the
allocated RAM to the caller, the new API represents an allocation
as a guard type 'Allocation', which deallocates on destruction by
default.

Allocation errors are captured by a 'Result' type that follows
the 'Attempt' pattern.

As a transitionary feature, the patch largely maintains API
compatibility with the original 'Ram_allocator' by providing
the original (exception-based) 'Ram_allocator::alloc' and
'Ram_allocator::free' methods as a wrapper around the new
'Ram::Constrained_allocator'. So components can be gradually
updated to the new 'Ram::' interface.

Issue #5502
2025-04-10 14:55:15 +02:00
Norman Feske
e9558a36f9 util/allocation.h: base type for allocation objs
The 'Allocation' type represents the result of an allocator, which
guards the lifetime of the allocation. The 'Allocation::Attempt' type is
a suitable result type for allocators that need to reflect either an
successful allocation or an error condition.

Issue #5502
2025-04-10 14:27:21 +02:00
Norman Feske
2dfaeab7c2 util/attempt.h: add 'Unique_attempt' utility
The new variant combines the attempt with unique-pointer semantics
and is thereby usable for returning non-copyable objects such as
RAM 'Allocation'.

Issue #5502
2025-04-10 14:27:21 +02:00
boinsoft
7d4b6b6bd5 ports: replace ftp urls to http
Fixes #5505
Fixes #5498
2025-04-10 14:27:21 +02:00
Alexander Boettcher
4ec277058e intel/display: use drm vblank wait support
Fixes #5415
2025-04-10 14:27:21 +02:00
Josef Söntgen
d143ed7e47 libc: extended symbols file needed by fio
Fixes #5507.
2025-04-10 14:27:21 +02:00
Josef Söntgen
b4e6b96a19 libc: implement _SC_CLK_TCK
Return the same value that is used in FreeBSD.

Issue #5507.
2025-04-10 14:27:21 +02:00
Sebastian Sumpf
e5cbf602e0 gpu/intel: RC6 support
* add RC6 support for GPU GEN9 (Skylake+) and GEN12 (Tiger Lake+), RC6 is
  entered by software after CHECK_INACTIVEus of inactivity. When a new
  Vgpu is scheduled we trigger a resume from RC6.

* increase VGPU-watchdog timeout to 300ms

issue #5504
2025-04-10 14:27:21 +02:00
Sebastian Sumpf
721e2c634a gpu/intel: Make mmio member of Reset
issue #5504
2025-04-10 14:27:21 +02:00
Christian Helmuth
dea2ed1e41 dialog: adaptation to root dir via session label
This is a follow-up fix for "file-system session: root dir via session
label".

Issue #5445
2025-04-10 14:27:21 +02:00
Norman Feske
7e420a68a6 Remove C++ exceptions from 'Thread' API
After constructed, a 'Thread' object may remain in a dysfunctional state
should the stack allocation have failed. This condition is no longer
reflected as a C++ exception but as result value of 'Thread::info()'.

Keep 'Thread::name' as public constant because the stack is not always
available for storing the name.

The 'stack_top' accessor has been removed because this information is
already provided by 'Thread::info()'.

Issue #5245
2025-04-10 14:27:21 +02:00
Christian Helmuth
0736db0863 Revert "sculpt: consider screen pos for pointer tracking"
Absolute motion events already carry global coordinates (fader
session).

This reverts commit 3dc05a0a89f00e40d194e7d895b525b405f57f7e.

Issue #5501
2025-04-10 14:26:47 +02:00
Alexander Boettcher
33fab30a1f intel/display: use phys resolution for capture
In the "<merge>" case, only a subset of the actual
framebuffer was (intentionally) captured to reduce cpu and memory bandwith.
The new blit tool however requires, by now, that the capture size must
be identical to the framebuffer in use.

Issue #5501
2025-04-10 14:26:47 +02:00
Norman Feske
d726d70795 capture session: allow arbitrarily sized buffers
This patch reverts the 8px padding of capture buffers as introduced
by commit "nitpicker: alloc padded capture buffer". The padding was
introduced to ease the use of SIMD instructions operating on the capture
buffer (blit2front) assuming that practical screen dimensions are a
multiple of 8px. Unfortunately this assumption is wrong. E.g., some
laptops use a resolution of 1366x768. So the back2front copying cannot
sidestep the handling of the finicky special cases.

Issue #5428
Issue #5501
2025-04-10 14:26:47 +02:00
Norman Feske
3909f9b6e4 blit: lift 8x8 restriction from back2front
This patch allows for the use of the back2front operation with textures
that are not a multiple of 8x8 pixels, which makes the utility
compatible with screen resolutions like 1366x768. In such cases, the
implementation falls back to the non-SIMD variant.

Issue #5428
Issue #5501
2025-04-10 14:26:47 +02:00
Christian Helmuth
3ba0e6fda3 intel/display: remove diagnostic message on init
Issue #5501
2025-04-10 14:24:31 +02:00
Alexander Boettcher
1ba010af5d intel/display: avoid too dark display
during early bootstrap.

Issue #5501
2025-04-10 14:24:31 +02:00
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