10559 Commits

Author SHA1 Message Date
Stefan Kalkowski
fd78fb4de3 hw: pager thread per cpu
Instatiate a separate pager thread for each cpu core. Every time a pager
object gets managed by the Pager_entrypoint, assign it to the pager thread
on the same cpu core.

Ref genodelabs/genode#5318
2025-01-30 16:30:14 +01:00
Stefan Kalkowski
ae1e4918a7 hw: use enums in stack base definition
Ref genodelabs/genode#5319
2025-01-30 16:30:14 +01:00
Stefan Kalkowski
f97c8cacde hw: sanitze cpu context
* Rename Kernel::Cpu_job to Kernel::Cpu_context (alias Kernel::Cpu::Context)
* State first Cpu affinity of Cpu::Context at construction time
* Move cpu affinity argument from kernel syscall create_thread to start_thread
* Ensure that Cpu pointer is always valid

Fix genodelabs/genode#5319
2025-01-30 16:30:14 +01:00
Stefan Kalkowski
e275787119 hw: add missing six-arguments syscall for riscv
Ref genodelabs/genode#5319
2025-01-30 16:30:14 +01:00
Stefan Kalkowski
025043cdcf hw: generalize IPC-helping to a common mechanism
* Removes helping from Ipc_node and Thread class
* Implement helping as mechanism of Scheduler::Context

Ref genodelabs/genode#5318
2025-01-30 16:30:14 +01:00
Stefan Kalkowski
dc37c396cf hw: ensure board_name is set as depot build
When no BOARD variable is set via the build environment,
the board_name in the platform_info ROM needs to be set either.

Ref genodelabs/genode#5360
Fix genodelabs/genode#5414
2025-01-30 16:30:14 +01:00
Alexander Boettcher
9239b36f05 platform: be robust on IRQ creation failure
In case invalid IRQ numbers are used (255 on x86), the IRQ session creation
request may be denied and the platform driver is killed because of the
uncatched exception, which must be avoided.

Issue #5406
2025-01-30 16:30:14 +01:00
Alexander Boettcher
91a58d3e98 foc: increase max count for RPC caps in core
to boot Sculpt

Issue #5406
2025-01-30 16:30:14 +01:00
Alexander Boettcher
8a5fd27b46 foc: add support to add ACPI rsdp in platform info
which is required for UEFI boots.

Issue #5406
2025-01-30 16:30:14 +01:00
Alexander Boettcher
1a0a1b3f27 acpi: be robuster on IO_MEM session denied
Issue #5406
2025-01-30 16:30:14 +01:00
Alexander Boettcher
ae90a8a10d platform/pc: be robust on IOMMU claiming
Issue #5406
2025-01-30 16:30:13 +01:00
Alexander Boettcher
0d81a104ad base: use Map_local_result in io_mem _map_local(...)
Issue #5406
2025-01-30 16:30:13 +01:00
Alexander Boettcher
12f87260c0 nova: add x2apic support
Fixes #5413
2025-01-30 16:30:13 +01:00
Johannes Schlatow
a0366120ef base-nova: allow access to IOAPIC
This allows the platform driver to control remapping of legacy
interrupts.

genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
b07107c8c6 platform/pc: re-use init code during resume
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
aaeb21136b platform/pc: remove Env from generate() methods
This was a relic from a time where we dumped the page tables from NOVA
and therefore needed to attach the corresponding dataspaces.

genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
4a0ce32faa platform/pc: implement IRQ remapping for Intel
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
3c5b88111c platform/pc: use queued invalidation interface
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
4790bc03fc platform/pc: move register-based invalidation
This is in preparation of implementing the queued-invalidation
interface.

genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
c767c2b129 platform/pc: implement IOAPIC
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
5006b009cb platform: add IRQ remapping support
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
b136ed0dfc pci_decode: report IOAPIC devices
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
f85068e1f2 acpi_drv: report IOAPIC devices
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Johannes Schlatow
ce70b44087 acpi_drv: reflect DMAR properties in report
genodelabs/genode#5066
2025-01-30 16:30:13 +01:00
Christian Prochaska
6c1af53909 qt6: add 'i18n' example
Fixes #5421
2025-01-30 16:30:13 +01:00
Norman Feske
916d036b58 sculpt_manager: use Callable
Issue #5420
2025-01-30 16:30:13 +01:00
Norman Feske
69e8e9f3f1 base: add util/callable.h
Fixes #5420
2025-01-30 16:30:13 +01:00
Christian Prochaska
fe18db4d34 qt6: add 'SvgWidgets' files
Fixes #5419
2025-01-30 16:30:13 +01:00
Norman Feske
2ac0a7368c base: remove base/internal/unmanaged_singleton.h
Fixes #5418
2025-01-30 16:30:13 +01:00
Norman Feske
580456ef7b test-libc_fifo_pipe: adjust cap_quota
The proper accounting of caps consumed for allocation of UTCBs on
base-hw slightly increases the costs per thread.

Issue #5408
2025-01-30 16:30:13 +01:00
Norman Feske
ec9caa3490 libc: remove use of unmanaged_singleton
Issue #5418
2025-01-30 16:30:13 +01:00
Norman Feske
3900199d2f libc: host fd alloc as part of Libc::Kernel
This avoids the need to construct the fd_alloc out of thin air using
unmanaged_singleton.

Issue #5418
2025-01-30 16:30:13 +01:00
Benjamin Lamowski
05522696c7 hw: x86_64: refactor Vm_session_component
On x86, the `Vm_session_component` obscured the differences between SVM
and VMX.

Separate the implementations, factor out common functionality and
address a number of long-standing issues in the process:

- Allocate nested page tables from Core_ram_allocator as a more suitable
  abstraction and account for the required memory, subtract the
  necessary amount of RAM from the session's `Ram_quota` *before*
  constructing the session object, to make sure that the memory
  allocated from the `Core_ram_allocator` is available from the VMM's
  RAM quota.
- Move the allocation of Vcpu_state and Vcpu_data into the Core::Vcpu
  class and use the Core RAM Allocator to allocate memory with a known
  physical address.
- Remove the fixed number of virtual CPUs and the associated reservation
  of memory by using a Registry for a flexible amount of vCPUs.

Issue #5221
2025-01-30 16:30:13 +01:00
Benjamin Lamowski
922fdd1628 hw: factor out Vmid_allocator
Move the static `Vmid_allocator` in each `Vm_session_component` into a
common header file.

Issue #5221
2025-01-30 16:30:13 +01:00
Norman Feske
c0c6f3f660 os/session_policy.h: avoid use of Xml_node assign
Issue #5411
2025-01-30 16:30:13 +01:00
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
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