Commit Graph

13727 Commits

Author SHA1 Message Date
Josef Söntgen
a16ca36eb6 bsd_audio: remove unnecessary RM requirement
The explicit usage of the Rm session became obsolete with the
removal of the internal slab (see memory consumption commit).

Fixes #5348.
2024-10-08 09:09:23 +02:00
Benjamin Lamowski
66689fa799 usb_webcam: remove unneeded requirement on RM
The usb_webcam's runtime requires a Region Manager session even though
it is not needed by the application, remove it.

Fixes #5346
2024-10-08 09:09:23 +02:00
Norman Feske
fc4b026b62 nitpicker: remove periodic mode of operation
Unless nitpicker is used in 'request_framebuffer' mode, it no longer
depends on a periodic timer but merely acts as a broker between capture
clients and GUI clients. Sync signals as delivered to GUI clients are
now wired to Capture::Session::capture_at calls. So the display driver
defines the occurrence of those signals.

Note that sync signals are only delivered while a driver actively calls
'capture_at'. If a driver stops capturing, GUI clients no longer receive
any sync signal. This is a change from the previous situation where GUI
clients could depend on the periodicity of sync signals.

Issue #5347
2024-10-08 09:09:23 +02:00
Norman Feske
e69ade5299 decorator: use timer for animation timing
This patch changes the precision of the configuration's motion attribute
to a multiple of 10 ms (centi-seconds). The previous version used steps
of 20 ms. Hence, one needs to adjust existing configurations by doubling
the motion attribute values of the themed decorator.

Issue #5347
2024-10-08 09:09:23 +02:00
Norman Feske
58d20c7751 menu_view: use timer for animation timing
This patch removes the use of sync signals as time source. The animation
phase is now timed using a timer connection as tick source while sync
signals are used for scheduling the redraws.

Issue #5347
2024-10-08 09:09:23 +02:00
Norman Feske
ffcd08b5c7 backdrop,pdf_view: remove sync handling
The sync handling makes the code more complicated without a benefit.

Issue #5347
2024-10-08 09:09:22 +02:00
Norman Feske
0e55119b36 liquid_framebuffer: reset signal handlers
Apply the same rationale as commit "gui_fb: reset signal handlers when
closing fb" to the liquid framebuffer.
2024-10-08 09:09:22 +02:00
Alexander Boettcher
4554ec42da nova: make write-combined unit test more robust
- touch all memory before time measurements, to reduce lazy paging jitter
- diff of 100us between 2 memset runs are now considered a failure (before 10us)
- add refrence measurements of same region size which is not write-combined
- make the output easier parse able of write-combined test

Fixes #5342
2024-10-08 09:09:22 +02:00
Norman Feske
09461c51bd capture_session: capture stop/wakeup protocol
With this change, a client (i.e., display driver) can register
a wakeup signal handler to be notified on the arrival of new data to
capture. The signal is delivered only when the client has stopped
capturing. The client propagates this condition to the server using
the new 'capture_stopped' RPC call.

This change in principle enables a display driver to suspend its
periodic mode of operation after a few frames without capturing any
new data. As the first driver, the fb_sdl driver has been adapted to
the new protocol. This change not only eliminates the driver's CPU
load when idle, it also reduces the latency of sporadic output
because the response to such GUI updates is no longer bound by a
fixed periodic interval.

Issue #5344
2024-10-08 09:09:22 +02:00
Norman Feske
c527a4e0e4 util/dirty_rect.h: accessor for empty state
Provide an easy way to check for the absence of any dirty pixels.

Issue #5344
2024-10-08 09:09:22 +02:00
Norman Feske
2d3c2fc258 fb_sdl: move SDL event loop to dedicated thread
This patch is a preparatory step for relaxing the strictly periodic
operation of fb_sdl. With the new design, the SDL event loop can block
for events while Genode's main entrypoint stays receptive for I/O.
The main entrypoint can interact with the SDL thread by injecting
SDL user events.

The patch also replaces the full-screen clearing and update of the
SDL window by an update of the captured bounding box only. This reduces
the CPU load of fb_sdl when idle. When updating a small part of the
screen (e.g., when moving the mouse only), the load is still rather
heavy though.

Issue #5344
2024-10-08 09:09:22 +02:00
Norman Feske
3f1759a4d1 capture_session: detection of idle capture server
This patch enhances the Capture::Connection::Screen such that the
bounding box of the affected pixels can be tracked by the caller,
which can use this information to adjust its behavior to the
activity/inactivity of the capture server.

Issue #5344
2024-10-08 09:09:22 +02:00
Norman Feske
6d68d3297d capture_session: propagate physical size in mm
This patch adds the physical screen size as argument to the
Capture::Session::buffer RPC function, which allows drivers to
propagate DPI information to the GUI server. While changing the
the interface, the patch replaces the former use of C++ exceptions
by a result type. The 'Buffer_result' is handled transparently by the
Capture::Connection. The client.h code is now integrated in
connection.h.

Issue #5344
2024-10-08 09:09:22 +02:00
Josef Söntgen
6d79a44c46 sculpt_manager: adapt to Wifi::Manager changes
Issue #5341.
2024-10-08 09:09:22 +02:00
Josef Söntgen
d4e4b8bf60 driver/wifi: rework CTRL interface manager
This commit streamlines the interaction between the Wifi::Manager
and the wpa_supplicant's CTRL interface.

As user-facing changes it alters some default settings and introduces
new features:

* Every configured network now needs to explicitly have its
  'auto_connect' (to be considered an option for joining) attribute
  set to 'true' whereas this was previously the default value if the
  attribute was not set at all.

* The 'log_level' attribute is added and configures the supplicant's
  verbosity. Valid values correspond to levels used by the supplicant
  and are as follows 'excessive', 'msgdump', 'debug', 'info', 'warning'
  and 'error'. The default value is 'error' and configures the least
  amount of verbosity.

* The 'bgscan' attribute may be used to configure the way the
  supplicant performs background-scanning to steer or rather optimize
  roaming decision within the same network. The default value is set
  to 'simple:30:-70:600'. It can be disabled by specifying an empty
  value, e.g. 'bgscan=""'.

* The 'verbose_state' attribute was removed alltogether and similar
  functionality is now coverted by 'verbose' attribute.

Implementation-wise the internals changed significantly and are
outlined in the following paragraphs.

Formerly the interaction between the manager and the supplicant
was handled in an apparent way where the internal state of each
interaction was in plain sight. This made the flow cumbersome to
follow and therefor each interaction is now confined to its own
'Action' object that encapsulates the ping-pong of commands and
responses between the manager and the supplicant. All actions are
processed in an sequential way and thus there is no longer any
need to defer pending actions depending on the interal state of
the current interaction. Configuration changes as well as events
issued by the supplicant where new actions can be created are
handled in this fashion. Of note are both signal-handlers,
'_handle_cmds' and '_handle_events' respectively.

The state report, which provides the information about the current
state of connectivity to a given wireless network, was dealt with
in the same vein and its handling was spread across the manager
implementation. Again, to make it easier to follow, the generation
of the state report is now purely driven by the 'Join_state' object.
This object encapsulates the state of connectivity and is normally
updated by events issued from the supplicant (see '_handle_events').
It is also incorporated when handling command responses (see
'_handle_cmds').

Handling of timed-actions, like scan and signal quality
update requests, was done by setting a timeout at the Timer session
directly and thus only one timed-action could be pending at any time.
This excluded dealing with timed-actions like connected-scanning
and signal quality polling concurrently. This was changed and now
a One_shot_timeout is used to programm each concurrent timed-action.

For implementing the communication channel for the CTRL interface the
manager and supplicant use a shared memory buffer, the Msg_buffer.
Since the CTRL interface for Genode was implemented using C, some
shenanigans were performed to access the memory buffer. Now the
CTRL interface implementation uses C++ and only exports the functions
required by the supplicant as C. This simplifies the usage of the
Msg_buffer and allows for removing the global functions needed for
synchronizing the Msg_buffer access as those are now part of the
object itself via the 'Notify_interface'.

Fixes #5341.
2024-10-08 09:09:22 +02:00
Josef Söntgen
6b474e059c wpa_supplicant: update to version 2.11
Issue #5341.
2024-10-07 15:54:59 +02:00
Josef Söntgen
42dae6e570 lib/wifi: make errno conversion function public
The 'convert_errno_from_linux' function was already used internally to
convert the Linux errno values to the matching FreeBSD libc ones when
calling socket functions.

It will now also be used to convert the error values included in
netlink messages as those, naturally, also correspond to the Linux
ones.

Issue #5341.
2024-10-07 15:54:59 +02:00
Alexander Boettcher
e5df8da1bd vbox6: enable AES hardware instruction support
Issue #5314
2024-10-07 15:54:59 +02:00
Norman Feske
d565598489 wm: avoid initial flickering of child views
When starting testnit with the wm, the child views briefly appear at a
position relative to the top-left corner of the screen until the
top-level view has been positioned by the layouter. This patch keeps
child views invisible until their respective parent views are
positioned.
2024-10-07 15:54:59 +02:00
Alexander Boettcher
75266e467d vbox6: enable AVX support
Issue #5314
2024-10-07 15:54:59 +02:00
Alexander Boettcher
a07b5937d9 nova: handle invalid FPU guest state
Makes the kernel robust against invalid guest FPU state provided by a VMM,
e.g. our port of Vbox6.

Issue #5314
2024-10-07 15:54:59 +02:00
Alexander Boettcher
ff506b0375 vm/x86: support extended fpu state transfer
Extend Genode's vCPU FPU state and adjust all users to copy
at most FPU data they actually support.

Issue #5314
2024-10-07 15:54:59 +02:00
Norman Feske
5993fa9c7f wm: keep child views in front of their parent
When restacking a top-level view, execute the top-level restacking
before updating the child views. Otherwise, child views may wrongly
refer to the old stacking position of the top-level view.

Issue #5242
2024-10-07 15:54:59 +02:00
Norman Feske
e5437563e2 test/nitpicker: add missing refresh call
Issue #5242
2024-10-07 15:54:59 +02:00
Alexander Boettcher
b4ff720ea4 tool/run: support ipxe via UEFI boot on foc & sel4 2024-10-07 15:54:59 +02:00
Norman Feske
9cd87a8495 wm: update coding style
Use Genode namespace, indicate 'Main' members as being private,
use Session_object, remove unused '_focus_request_reporter',
use Id_space for Window_registry, replace lookup by with pattern.
2024-10-07 15:54:59 +02:00
Norman Feske
e83ace4242 decorator: fix window-stacking glitch
This is a follow-up commit to "gui_session: manage view ID at the client
side", which missed to invalidate the neighbor view of a window but
instead wrongly assigned the (now always valid) view ID 0 as neighbor.
In situations where a window disappears and re-appears (e.g., repeatedly
launching testnit in the wm.run scenario), the new window could not
always be topped.

Issue #5242
2024-10-07 15:54:59 +02:00
Alexander Boettcher
f147a1220e intel/display: make effective use of PSR
- only mark framebuffer dirty if necessary
  -> gives the hardware chance to save longer power
- remove extra timer connection on Genode component side
  -> use Linux time primitives

Issue #5339
2024-10-07 15:54:59 +02:00
Alexander Boettcher
0414e4929f intel/display: enable panel self refresh support
Fixes #5339
2024-10-07 15:54:59 +02:00
Norman Feske
3ba8ddc85c gui_session: mark RPC client methods as nodiscard
Issue #5340
2024-10-07 15:54:59 +02:00
Norman Feske
ec50c008bb wm: account session resources
With this patch, the wm accounts RAM and caps consumed on behalf of its
clients to the respective client's session quota instead of paying out
of its own pocket. This should make the wm resilient against resource
exhaustion and lowers the quota requirements.

Issue #5340
2024-10-07 15:54:59 +02:00
Norman Feske
cf507a0b86 wm: replace Rpc_object by Session_object
This will ease the tracking of session resources.

Issue #5340
2024-10-07 14:44:31 +02:00
Norman Feske
a9b2d9bdc6 gui_session: adjust session quota for wm scenarios
The current default session RAM quota of 36 KiB reflects the needs of
the nitpicker GUI server. However, in most commonly used scenarios, a
GUI client connects to nitpicker indirectly via the wm. The low value
worked so far because the wm did not account RAM and cap usage per
client so far but paid out of its own pocket and faithfully forwarded
all resource upgrades to nitpicker.

When adding resource accounting to the wm, the old default value has the
effect that a new client has to repeatedly attempt the session creation -
each time offering sligthly more session quota - until both nitpicker and
the wm are satisfied.

By roughly doubling the default to 80 KiB, a wm client immediately
succeeds with opening a GUI session without repeated attempts.
By specifying a custom 'cap_quota' amount to the 'Genode::Connection',
the Gui::Connection now donates enough caps for both the wm and
nitpicker.

Issue #5340
2024-10-07 14:44:31 +02:00
Norman Feske
034de3b1b1 base/connection.h: allow customized cap-quota arg
By default, a 'Connection' donates an amount of caps as declared in
SESSION_TYPE::CAP_QUOTA to the server at session-creation time.

In some situations, however, a client may deliberately want to donate a
larger amount. For example, when opening a GUI session at the wm, the
total amount of needed caps is the sum of those consumed by the wm plus
those consumed by nitpicker. Using this knowledge, the Gui::Connection
may specify a sufficient amount to avoid iterative session-creation
retries. The new 'Connection' constructor accommodates this use case by
accepting an explicit 'cap_quota' argument.

Issue #5340
2024-10-07 14:44:31 +02:00
Norman Feske
240b631512 nitpicker: alloc initial slab block in session
This patch saves two sliced-heap allocations per session.

Issue #5340
2024-10-07 14:44:30 +02:00
Norman Feske
e8e499ae9e nitpicker: account input and framebuffer caps
This patch deduces the caps needed for the framebuffer and input RPC
objects from the resources accounted locally within the session. It also
takes precautions for the situation where a client offers too little
resources, prompting the mid-way cancelling of the 'Session_component'
creation. With the patch, the 'ep.manage' operations are rolled back
by the corresponding 'ep.dissolve' operations.

Issue #5340
2024-10-07 14:44:30 +02:00
Norman Feske
e4af726056 nitpicker: alloc view caps only when needed
This patch moves the eager allocation of view capabilities from the
'view' and 'child_view' RPC functions to the 'view_capability' RPC
function, reducing the consumption of capabilities in all scenarios
where views don't need to be shared between GUI sessions.

Issue #5340
2024-10-07 14:44:30 +02:00
Norman Feske
61c0be82f9 mupdf.run: add missing libm 2024-10-07 14:44:30 +02:00
Alexander Boettcher
eb7aea82b8 hw/x86: prefer acpi rsdp v2 of multiboot2
over rsdp v1. The multiboot2 provided rsdp_v1 version may not contain the
xsdt pointer, but may have the very same acpi revision as the acpi rsdp v2
version of multiboot2.

Fixes #5332
2024-10-07 14:44:30 +02:00
Benjamin Lamowski
cdc45e15f1 libc: implement kqueue(2)
Fixes #5301
2024-10-07 14:44:30 +02:00
Christian Helmuth
45cee6e951 libc: support asynchronous monitor jobs
Issue #5302
2024-10-07 14:44:30 +02:00
Christian Helmuth
899893cd17 libc: remove dynamic alloc from pthread_once
Fixes #5336
2024-10-07 14:44:30 +02:00
Christian Helmuth
131f8015f1 test-pthread: pthread_once stress test
Issue #5336
2024-09-06 10:38:45 +02:00
Christian Helmuth
505cd5e338 test-pthread: prevent compiler warnings
.../repos/libports/src/test/pthread/main.cc:539:76: warning: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Wvolatile]
.../repos/libports/src/test/pthread/main.cc:1104:32: warning: ‘test’ may be used uninitialized [-Wmaybe-uninitialized]
2024-09-06 10:38:45 +02:00
Norman Feske
ce4f0cdd18 gui_fb: update coding style
Avoid Genode:: prefix, indicate 'Main' members as being private.
2024-09-06 10:38:45 +02:00
Norman Feske
f650f2e91b gui_fb: reset signal handlers when closing fb
The gui_fb client may have installed a custom sync_sigh and mode_sigh.
Reset those signal handlers at the GUI server should the client
disappear. Otherwise, the GUI server (nitpicker) continues to attempt
transmitting sync signals to the no-longer existing component, spamming
the log with "Warning: invalid signal-context capability" messages.
2024-09-06 10:38:45 +02:00
Norman Feske
dd13a976af wm: alloc real view IDs locally
Don't use client-provided view IDs as IDs for the wrapped nitpicker
views. There is no 1:1 relation of IDs and physical views. So if a wm
client re-uses an ID, the physical view is expected to stay in tact.
If the corresponding view object within the wm is not destroyed, however,
its ID remains allocated, which may then conflict the ID of a new view
if the ID is reused by the client. This scenario resulted in the
following error:

  Error: Uncaught exception of type 'Genode::Id_space<Gui::View_ref>::Conflicting_id'

This patch handles the situation by keeping the allocator of physical
views (_real_view) decoupled from the client's ID allocator.

Issue #5242
2024-09-06 10:38:45 +02:00
Josef Söntgen
cc2b628d1c pc_wifi: use '___ratelimit' dummy
The generated dummy triggers sometimes on base-foc.
2024-09-06 10:38:45 +02:00
Alexander Boettcher
e2dd009256 netperf: retire signal patches and setitimer
emulation. Issue #5337 adds the required support to the libc.
2024-09-06 10:38:45 +02:00
Norman Feske
fc3bd14da0 libc: rudimentary support for SIGALRM
This patch enables basic use cases of the POSIX 'alarm' function, which
schedules the delivery of a SIGALRM signal after a specified amount of
seconds.

Issue #5337
2024-09-06 10:38:45 +02:00