13748 Commits

Author SHA1 Message Date
Norman Feske
fe40a3c45e xml_node.h: construct from Const_byte_range_ptr
This patch allows for the construction of 'Xml_node' objects from a
'Const_byte_range_ptr' argument as a safer alternative to the pair
of addr, max_len arguments.

Issue #5411
2025-01-30 16:30:13 +01:00
Norman Feske
bdb8d4d881 ldso: avoid use of Xml_node assign operator
Issue #5411
2025-01-30 16:30:13 +01:00
Christian Helmuth
cadf774fa0 tool/port/metadata: fix usage output
Variable ECHO is not set as common.inc is not included.
2025-01-30 16:30:13 +01:00
Josef Söntgen
4a2c52d8f4 symbols/libc: add open_memstream function 2025-01-30 16:30:13 +01:00
Norman Feske
329dbc56d0 base/thread.h: guard deref of '_logger()'
The pointer returned by '_logger()' can be a nullptr, in particular
while tracing is (temporarily) inhibited. This patch ensures that
the 'Thread::trace' accessors never operate on a nullptr.

Fixes #5410
2025-01-30 16:30:13 +01:00
Norman Feske
a06fd84b75 util/construct_at.h: ensure legit sizeof(Placeable)
If the memory for the designated object is allocated as char[sizeof(T)],
the size of 'Placeable' is expected to equal the size of T. However, in
principle, the compiler has the freedom to inflate the 'Placeable'
object. The static assertion gives us the assurance that the compiler
does not violate our assumption.
2025-01-30 16:30:13 +01:00
Norman Feske
1b0829e8a9 gems: ABI and depot recipe for dialog API
This exposes makes the dialog API usable for users of Goa. It turns the
former static dialog library to a shared object and accompanied symbols
file, and adds depot recipes for the library and API.

Issue #5409
2025-01-30 16:30:13 +01:00
Norman Feske
c978df4186 nitpicker: send pointer pos to global key handler
To enable a global key handler to implement motion gestures while a
global key is held, it needs to know the current pointer position at the
time when the global key sequence starts. This is prerequisite for
the window layouter's ability to drag windows by clicking anywhere
within the window while holding a global key.

Issue #5403
2025-01-30 16:24:36 +01:00
Norman Feske
e27d0d36fa wm: revoke curr focus if new focus is undefined
This allows the window layouter to ensure that input entered after
switching to an empty screen won't be routed to the old focused but
no longer visible window.

Issue #5390
2025-01-30 16:24:36 +01:00
Norman Feske
3600705a2f nitpicker: no absolute motion without hover
This patch enforces the invariant that absolute motion events are
delivered to the hovered client only. If no client is hovered, the event
is discarded.

Otherwise, in a situation where no client is hovered (i.e., due to a
background that does not cover the entire screen) but a focus is
defined, absolute motion events would be delivered to the focused
session. From a client's perspective, when moving the pointer from the
client to emptiness, the client would observe a leave event followed by
absolute motion. This, in turn, confuses the window manager, which
expects that the receiver of an absolute motion event is hovered.

Fixes #5375
2025-01-30 16:24:36 +01:00
Norman Feske
ab736c04f6 core: remove Core_env
This patch adjusts the last remaining callers of 'core_env' and removes
the 'Core_env' interface.

- Core's RAM/cap accounts are now represented by 'Core_account'
  implementing the 'Pd_account' interface.

- The former parts of 'Core_env' are now initialized in sequence
  in 'bootstrap_component'.

- 'Core_child' has been moved to a header to reduce the code in
  'main.cc' to a bare minimum. This as a preparation for the
  plan of making 'main.cc' specific for each kernel.

Fixes #5408
2025-01-30 16:24:36 +01:00
Norman Feske
42ff0d078f base: split Pd_account from Pd_session
Core uses an instance of 'Pd_session_component' as a representative
for RAM/cap quota accounts used whenever session resources are
donated to core's services. All other facets of 'Pd_sesson_component'
remain unused. Core's instance of 'Pd_session_component' is hosted
at 'Core_env'. Upon its construction, all unused facets of
'Pd_session_component' are initialized by dummy arguments in 'Core_env'.

To overcome the need for dummy arguments, this patch splits the
accounting part of the PD-session interface into a separate
'Pd_account' interface. This gives us the prospect of narrowing
core's current use of 'Pd_session_component' by 'Pd_account',
alleviating dead code and the need for any dummy arguments.

Issue #5408
2025-01-30 16:24:36 +01:00
Norman Feske
fc11e26511 core: pass ram, rm, io-ports to local services
This patch replaces the use of 'core_env()' in 'platform_services.cc' by
the function arguments 'core_ram', 'core_rm', and 'io_port_ranges'.

It also removes the 'Pd_session' argument from 'Io_port_root' and
'Irq_root' to avoid the reliance on the 'Pd_session' interface within
core,

Issue #5408
2025-01-30 16:24:36 +01:00
Norman Feske
43d7c3bd11 core: don't rely on Core_env in platform.cc
Replace the use of the global 'core_env()' accessor by the explicit
delegation of interfaces.

- For allocating UTCBs in base-hw, 'Platform_thread' requires
  a way to allocate dataspaces ('Ram_allocator') accounted to the
  corresponding CPU session, a way to locally map the allocated
  dataspaces (core's 'Region_map'), and a way to determine the
  physical address (via 'Rpc_entrypoint') used for the initial
  UTCB mapping of main threads. Hence those interfaces must be
  passed to 'Platform_thread'.

- NOVA's pager code needs to look up 'Cpu_thread_component'
  objects using a map item as key. The lookup requires the
  'Rpc_entrypoint' that hold the 'Cpu_thread_component' objects.
  To make this 'Rpc_entrypoint' available, this patch adds
  the 'init_page_fault_handing' function.

- The 'Region_map_mmap' for Linux requires a way to look up
  'Linux_dataspace' objects for given dataspace capabilities.
  This lookup requires the 'Rpc_entrypoint' holding the dataspaces,
  which is now passed to 'platform.cc' via the new Linux-specific
  'Core_region_map::init' function.

Issue #5408
2025-01-30 16:24:35 +01:00
Sebastian Sumpf
ac5cfb59ea dde_bsd: support microphone selection
Make preferred microphone configurable when a headset is plugged in by
introducing the 'mic_priority' attribute for the <config> node. Values
can be "internal" and "external".
2025-01-30 16:20:39 +01:00
Alexander Boettcher
a9df9fccfd intel/display: report no inuse mode on disabled connector
Fixes #5404
2025-01-30 16:20:39 +01:00
Benjamin Lamowski
5e3a898109 base: add create_vcpu to Vm_session interface
`Vm_session_component::create_vcpu()` is present across all supported
kernels, yet until now it was not part of the `Vm_session` interface.

Add the method to the `Vm_session` interface. This unifies calls in the
base library and is the basis to remove the need for a common base class
for separate `Vm_session` implementations for SVM and VMX on x86_64.

Issue #5221
2025-01-30 16:20:39 +01:00
Benjamin Lamowski
f94f461f8f base: make Ram_allocator noncopyable
Prevent erratic runtime behavior stemming from accidentally passing a
copy to a `Ram_allocator` by making the interface noncopyable.

In consequence, we had to provide an explicit copy constructor for
`Session_env` in server/nic_router, which will be reconsidered in
issue #5405.

Issue #5221
2025-01-30 16:20:09 +01:00
Christian Prochaska
dd64164ed6 qt6: split port into modules
Fixes #5402
2024-12-11 12:22:00 +01:00
Stefan Kalkowski
d3002b26ac libusb: warn once and freeze when device vanishs
Instead of repeatedly printing error messages when a device is not
available anymore, print an error once and then sleep forever.
There is no dynamic behaviour with respect to device availability
implemented in the libusb yet. Instead, you can manage libusb
components externally.

Ref genodelabs/genode#5401
2024-12-11 12:20:37 +01:00
Stefan Kalkowski
ebb159d32d usb webcam: turn run-scripts into sculpt tests
Ref genodelabs/genode#5401
2024-12-11 12:20:31 +01:00
Christian Helmuth
cd6701c483 depot: update recipe hashes sculpt-24.10.3 2024-12-11 08:35:22 +01:00
Norman Feske
60d009e6c6 nitpicker: notify clients on any panorama change
Nitpicker used to notify GUI clients about an updated GUI info only when
the total panorama size changed. However, in situations where two
capture clients are swapped, the total size may stay the same whereas
the relation of displays to different parts of the panorama is no longer the
same. Such changes are interesting to some clients like the window layouter,
which needs to update the assignement of screens to displays.

This patch changes nitpicker so that each panorama change is reflected
to GUI clients as a mode-info update.

Issue #5390
2024-12-10 14:12:24 +01:00
Alexander Boettcher
d0522706ba nova: avoid false pager assertion
Fixes #5399
2024-12-10 14:12:24 +01:00
Christian Helmuth
7f8db06284 Complete removal of tool/sdk approach
The SDK approach introduced in #2948 was superseded by Goa.

Issue #4446
2024-12-10 14:12:24 +01:00
Norman Feske
0749f8cbdf wm: free content view IDs if decorator disappears
This patch fixes the following error message printed by the wm upon the
restart of a decorator.

  Error: freeing non-empty slab block"
  Error: ID space not empty at destruction time

Fortunately, the error is not critical as the backing store is released
along with the session.
2024-12-10 14:12:24 +01:00
Norman Feske
1ddbb3444c sculpt/nitpicker: use label for matching decorator
The 'label_suffix=" -> decorator"' rule is weaker than the
more generic 'label_prefix="runtime -> wm"' rule, to the effect that the
decorator is assigned to the "desktop" domain instead of the "decorator"
domain. Replace the 'label_prefix' by the decorator's concrete label
to resolve this ambiguity.
2024-12-10 14:12:24 +01:00
Alexander Boettcher
4da68e11b6 tool: support to set menuentry of GRUB
manually to self chosen value, by overwritting the tcl procedure
grub_menuentry, e.g.:

proc grub_menuentry { } { return "'My OS' --option_of_your_choice " }

Fix #5398
2024-12-10 14:12:24 +01:00
Christian Helmuth
5665e8059a Optional session label in audio_in/out connection 2024-12-10 14:12:24 +01:00
Norman Feske
3067a2c51d nitpicker: prevent the pointer from going nowhere
The 'size_changed' handling remained without effect when the (last)
display re-appears (e.g., back from screen blank) because
'Capture_root::bounding_box()' delivered the '_fallback_bounding_box'
in the intermediate phase where no display was present. Unfortunately,
'Capture_root::visible()' failed to apply the same logic. This patch
makes 'visible()' consistent with 'bounding_box()'. It has the
welcome effect that nitpicker remembers the pointer position during
the dark phase.

Fixes #5397
2024-12-10 14:12:24 +01:00
Christian Helmuth
1d73cf2003 Prevent false warnings in memcpy (GCC 12)
GCC 12 tree-loop-distribute-patterns generates false warnings of
-Warray-bounds, -Wstringop-overflow, or -Wstringop-overread in memcpy()
and memcpy_cpu() in static/inline cases for code that obviously prevents
its execution by invariant checking. On -O3, even more warnings are
produced.
2024-12-10 14:12:24 +01:00
Norman Feske
010847b69c decorator: fix sync-handling corner case
This patch fixes the corner case where a call of 'trigger_gui_sync'
unexpectedly did not result in the execution of '_handle_gui_sync'.
When sporadically called (w/o having installed a period sync handler)
in a time window shortly after a previous '_handle_gui_sync' that just
switched back to sporadic mode, the situation was considered as !idle.
So the 'local_submit' was skipped.

The patch fixes the issue by always issuing a 'local_submit' except when
operating in period mode. The '_gui_sync_enabled' state is now driven
only by '_handle_gui_sync' to make the intent more clear.

Fixes #5396
2024-12-10 14:12:24 +01:00
Josef Söntgen
96d9f5d317 usb: consider alternate setting in endpoint select
When constructing an Usb::Interface and implicitly corresponding
Usb::Endpoint instances only select endpoints relevant for the
given alternate setting.

The libusb has to be changed to delegate the correct alternate
setting to the constructor too.

Fix genodelabs/genode#5394
2024-12-10 14:12:24 +01:00
Alexander Boettcher
97e638a2ac intel/display: avoid mode detection in irq task
On hotplug, the C++ side of the driver now gets just notified,
without any further detection.

On the C++ side, now specific actions are scheduled explicitly, which will be
executed step by step. New appearing actions will be queued and are
not eligible to run before the former actions of the list are processed.

Fixe #5392
2024-12-10 14:12:24 +01:00
Alexander Boettcher
ba013af1a3 sculpt_manager: handle manual fb config w/o mirror
config node gracefully. If no mirror is set, ever claim one entry
as the mirrored one. Without this change, the current effect is that
the UI does not allow to merge one of the discrete modes.

Issue #5392
2024-12-10 14:11:57 +01:00
Alexander Boettcher
e520dbbb7e nova: avoid assertion during SC cleanup
Regression introduced in Issue #5314

Fixes #5391
2024-12-10 14:11:57 +01:00
Norman Feske
7928597249 doc: remove docs covered by the Genode books
Foster the Genode books as a single point of reference for Genode's
documentation. E.g., the Getting-Started section of the "Genode
Foundations" book has long obsoleted doc/getting_started.txt. This
patch also remove long orphaned texts like gsoc_2012.txt. The approach
described in the porting guide has now been replaced by the Goa SDK.

The Genode books can be downloaded at the genode.org website. Like
Genode, they are open source. All text is licensed as CC-BY-SA and
can be found at https://github.com/nfeske/genode-manual

Fixes #5393
2024-12-10 14:11:57 +01:00
Norman Feske
979aaed52b doc: merge coding_style.txt into conventions.txt
Issue #5393
2024-12-10 14:11:57 +01:00
Christian Helmuth
f2c25383af acpi_event: prevent misleading warning about PRESS_RELEASE 2024-12-10 14:11:57 +01:00
Alice Domage
e384381942 tool/run/image/uboot: provide dtb for FIT images
Our new U-BOOT for the imx8mp_iot_gate complains about the size
of the device tree being zero bytes. This is because it no longer
provides the kernel boot arguments via ATAGS, but passes them via
by injecting them in the flattened device tree..

This commit adds a minimal dtb file to the FIT image to satisfy U-BOOT.

Issue  #5354
2024-12-10 14:11:57 +01:00
Stefan Kalkowski
b529b1eac6 qemu-usb: prevent assertion by eager URB processing
Instead of directly process URBs whenever a USBPacket arrives from
the Qemu ported XHCI layer, send a local signal to the I/O handler,
which will process the requests after leaving certain sensible
code pathes like usb_packet_complete. Otherwise, it might happen
that a packet, which was still marked as being queued gets already
completed, which leads to an assertion and hang of the library.

Fix genodelabs/genode#5389
2024-12-10 14:11:57 +01:00
Benjamin Lamowski
b21c8729ea base: provide core_ram_allocator via platform_add_local_services()
This is a prerequisite to rework the allocation of core data structures
for VM sessions in hw.

Issue #5221
2024-12-10 14:11:57 +01:00
Norman Feske
d5f3cc6ec2 terminal: ignore input without valid GUI mode
This prevents the potential corner case where the terminal receives input
at a time when the window has no valid size and _text_screen_surface is
not constructed.
2024-11-27 13:37:34 +01:00
Stefan Kalkowski
4730312c1e hw: register state and backtrace when core faults
If one of core's threads is causing an MMU fault, dump the
register state and stack backtrace of the faulting stack to
aid debugging.

Fix genodelabs/genode#5387
2024-11-27 13:33:24 +01:00
Stefan Kalkowski
cc2bcee417 tool/run: create debug files for backtrace of core
When building ELF binaries of core and bootstrap for a run scenario,
also create the *.core.debug file to be able to use the tool/backtrace
utility.

Ref genodelabs/genode#5387
2024-11-27 13:33:24 +01:00
Johannes Schlatow
2c2fb6b70e tool/run: add intel_hwp config to boot_dir/hw
Fixes #5388
2024-11-27 13:33:24 +01:00
Alexander Boettcher
b50bbef303 tool: support meshcmd as AMT alternative tool
which may be used as alternative for

- AMT log grabbing, default: amtterm
- AMT power cycling, default: wsman, alternative: amttool

https://www.meshcommander.com
https://github.com/Ylianst/MeshCommander
https://www.intel.com/content/www/us/en/developer/articles/news/meshcmd-new-intel-amt-command-line-tool.html
2024-11-26 18:17:41 +01:00
Christian Prochaska
35a679d861 libc: pthread cond/rwlock improvements
- add a check to detect if a different thread has
  initialized the internal object in the meantime
- remove ENOMEM error since the 'Libc::Allocator'
  is not supposed to throw exceptions
- remove init mutex from 'pthread_condattr_init()'
  since there is no implicit initialization which
  could happen in parallel like with mutex/cond/rwlock

Issue #5386
2024-11-26 01:08:19 +01:00
Christian Prochaska
37842757ac libc: synchronize implicit pthread mutex initialization
Fixes #5386
2024-11-26 01:08:15 +01:00
Norman Feske
fa9473ce58 doc/release_notes/24-11.txt: minor style fixes 2024-11-22 18:17:24 +01:00