10821 Commits

Author SHA1 Message Date
Stefan Kalkowski
ef7c0c9fb1 fixup "hw: sanitize scheduler, cpu, and timer interplay" (scheduler unit test) 2025-04-11 12:45:16 +02:00
Johannes Schlatow
29c6c4cc0e platform/pc: recover from invalidation errors
On the unexpected occasion of an invalidation-queue error, the
invalidator gets stuck in an infinite loop. We therefore need to check
for and recover from invalidation-queue errors while waiting.

genodelabs/genode#5523
2025-04-11 11:15:03 +02:00
Johannes Schlatow
df97b39340 platform/pc: clear invalidation descriptor
Each new entry in the invalidation queue must be zeroed before writing
in order to clear data from old entries. Not doing this can cause
invalidation queue errors after the tail pointer wrapped around.

genodelabs/genode#5501
genodelabs/genode#5523
2025-04-11 11:14:44 +02:00
Stefan Kalkowski
f93aebc810 fixup "hw: extend remote-cpu-call for destroy" (vcpu.h always included) 2025-04-10 16:50:00 +02:00
Sebastian Sumpf
4e6ea61c5f phone_manager: use Gui::info for screensaver's driver ready
Report 'display_driver_ready' to screensaver depending if <capture> node
is present in Gui::info. The Gui::panorama call does not suffice because
it reports the dimensions of the very last Capture client closed as
fallback.

issue #5496
2025-04-10 16:41:18 +02:00
Sebastian Sumpf
adbfd05130 bootstrap: skip zero sized late_ram_regions
On some platforms late_ram_regions are initialized to zero which
leads bootstrap to insert zero based/sized ram regions wich later caused
the following warning in core:

! unable to register RAM region base=0x0 size=0x0
! unable to exclude I/O range from RAM: base=0x0 size=0x0

Therefore, omitt adding zero sized regions to the boot info.

issue #5496
2025-04-10 16:41:18 +02:00
Sebastian Sumpf
a0c3b77f0e record_play_mixer: wakeup depleted record clients
In case a play-session client sends data too slow leading to
record-session client depletion after 250ms of inactivity, try to wakeup
depleted clients upon reception of fresh audio data from the
play-session. The _scheduler.consecutive check for triggering a wakeup
doesn't seem to suffice in case of occasionally slow play clients.

(This fixes the osci preset on the PinePhone)

issue #5496
2025-04-10 16:41:18 +02:00
Sebastian Sumpf
b8acdc8a28 recipe: add dialog.lib.so to touch_keyboard
issue #5496
2025-04-10 16:41:18 +02:00
Sebastian Sumpf
e12198dce4 dialog: ignore sequence numbers in input
* ignore sequence numbers from nitpicker in _handle_input because it
  generates it's own numbers

* send sequence number on single click

issue #5496
issue #5491
2025-04-10 16:41:18 +02:00
Sebastian Sumpf
5d45065b06 phone_manager: adjust to window clipping
Since "wm/decorator/layouter: window clipping" we need to separate
resize and window-layout ROMs while also adding the <boundary> nodes for
wm/decorator/layouter to function correctly.

issue #5496
2025-04-10 16:41:18 +02:00
Sebastian Sumpf
a71780f89a phone_manager: adjust to root dir via session label
* adjust touch_keyboard.h to updated session label handling for font_fs.
* add dialog.lib.so

issue #5496
2025-04-10 16:41:18 +02:00
Josef Söntgen
76ad585e56 Remove Block::Driver interface
This commit removes the aged Block::Driver interface that has already
been superseded by the Block::Request_stream API for some time now.
It is solely used by components whose existence is made redundant,
like 'lx_block', or old drivers, like the SD-Card driver for PL180
and old i.MX53/6 systems or the RPi 1, that have not seen active use
other than in the nightly CI runs.

Fixes #5522.
2025-04-10 16:32:58 +02:00
Josef Söntgen
5fdfc4fcea Remove lx_block component
The 'lx_block' component uses the aged Block::Driver framework
internally and most if not all use-cases where it could be employed
can be addressed by using the 'vfs_block' component instead.

This commit also removes some run-scripts that make use of 'lx_block'
whose components are already excercised otherwise.

Issue #5522.
2025-04-10 16:32:58 +02:00
Stefan Kalkowski
2dd9dc3460 hw: extend remote-cpu-call for destroy
Extend the remote cpu call to destroy a thread to be able to
destroy a vcpu as well. Change the vcpu_destroy syscall to
remotely destroy it when the scheduler of the other core has
chosen it at that same point in time.

Fix #5511
2025-04-10 16:05:51 +02:00
Stefan Kalkowski
0a9d81a821 hw: remove virtualization directory in x86/arm_v8a
Remove additional directory layer for this feature that is
omnipresent in both architectures. It makes the code more easy
to read and follow.

Fix #5520
2025-04-10 16:05:51 +02:00
Stefan Kalkowski
b09a496a5d hw: rename Kernel::Vm object to Kernel::Vcpu
Moreover this commit does:
* rename *_vm syscall to *_vcpu equivalents
* add missing inclusion guard
* fix several inclusion guards
* rename certain compilation units containing "vm"

Fix #5512
2025-04-10 16:05:51 +02:00
Stefan Kalkowski
5a8a38dbf4 hw: add assertion into ~Cpu_context
Ref #5511
2025-04-10 16:05:51 +02:00
Stefan Kalkowski
39d23b4f6c hw: setting thread as blocked works cross-core
Eliminate the assertion as it lets the kernel stall by any smp component
that calls thread's pause syscall, as long as the GENODE_RELEASE flag
isn't set.

Fix #5510
2025-04-10 16:05:51 +02:00
Stefan Kalkowski
c7b7c811d5 hw: sanitize scheduler, cpu, and timer interplay
* Remove afiinity artefact from Cpu class
* Scheduler::need_to_schedule => Scheduler::ned_to_update (consistency)
* Don't re-use last scheduler context after new scheduling
  decision, might have been deleted (potential use-after-free)
* Move Timer::process_update into timer's interrupt handling routine
* Move execution time of Cpu_context into Scheduler::Context
* Re-order scheduler and idle context initialization (ref before initialized)

Ref #5509
2025-04-10 16:05:51 +02:00
Stefan Kalkowski
3adca95137 cpu_sampler.run: fix 'assert'-proc change
Ref #5432
2025-04-10 16:05:41 +02:00
Alexander Boettcher
74b7374b7c gui_fader: sanitize buffer(mode) RPC
to avoid invalid ram dataspace capability errors if the mode is
invalid, e.g. 0x0

Fixes #5521
2025-04-10 15:53:41 +02:00
Alexander Boettcher
856c48e1a1 nitpicker: enhance fallback bounding box check
Solely consider sessions with valid bounding boxes for the decision
to use the fallback bounding box or not. New started capture clients may
require some time between capture session creation and actually capture
screen creation at which the bounding box becomes valid.

Issue #5521
2025-04-10 15:53:14 +02:00
Norman Feske
9e96947ae9 capture session: specify viewport as rect
By giving the client a way to specify the origin of the viewport in
addition to the size, we can solve transformed (rotated, flipped)
output to screen buffers where the line length is larger than the
number of visible pixels.

Issue #5518
2025-04-10 15:39:28 +02:00
Alexander Boettcher
b72a6b3400 nova: remove legacy vCPU creation support
Vbox5 was the last user. Seoul and VBox6 using the Genode VM interface.

Issue #5492
2025-04-10 15:21:49 +02:00
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