1211 Commits

Author SHA1 Message Date
Norman Feske
016d63703d depot: update recipe hashes 2025-04-10 14:55:59 +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
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
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
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
Christian Helmuth
5619ccd940 Set USB bios_handoff="no" in run scripts
This is the default setting in Sculpt currently, so use it also
for testing.
2025-04-10 14:24:11 +02:00
Christian Helmuth
cc465070d2 dde_linux: remove -Wframe-larger-than=2048
Prevents the following (long-since unattended) warning in intel_fb.

.../repos/pc/src/driver/framebuffer/intel/pc/spec/x86_64/../../lx_user.c:703:1: warning: the frame size of 2336 bytes is larger than 2048 bytes [-Wframe-larger-than=]
2025-04-10 14:24:11 +02:00
Norman Feske
5a9016b010 ports,dde_linux/bsd/ipxe,pc: don't copy Xml_node
Issue #5411
2025-04-10 14:24:11 +02:00
Sebastian Sumpf
843f5c32af dde_linux: review license headers
* add "or later" to GPLv2 license header where possible in order to make
  it compatible with GPLv3 based licenses

* add license header to non-trivial files where missing

fixes #5486
2025-04-10 14:14:07 +02:00
Sebastian Sumpf
f88a61a6a0 wg_fetchurl.run: remove lwip labels from nic_router
lwIP does not provide default Nic::Connection labels anymore.

issue #5471
2025-04-10 14:13:26 +02:00
Sebastian Sumpf
92086cce68 genode_c_api/socket: add label to socket init
Add label argument to genode_socket_init that can be/is used to label
possible connecions.

issue #5471
2025-04-10 14:13:26 +02:00
Sebastian Sumpf
fce286fbdd dde_linux: remove test/vfs_lxip
The test is outdated and not working anymore.

issue #5471
2025-04-10 14:13:25 +02:00
Sebastian Sumpf
ed77207963 os: move vfs/lxip to vfs/ip from dde_linux
Because the sources are now used by lwip/lxip, make them accessible in a
public place.

issue #5471
2025-04-10 14:13:25 +02:00
Sebastian Sumpf
e46bc6159d test/ip_raw: add support for lwip
Add lwIP requiremnts to the ip_raw test.

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
836caa299d lxip_raw: split test to support more IP stacks
issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
f0a75b75fb lxip: support link_state handling
* (re-)configure address when link state goes up
* propagate link state to Linux code

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
6a0c9f50ea lxip: support wakeup remote and socket_info
* instead of sending packet-stream signals for each possible rx/tx packet
  via genode_nic_client_notify_peers, call the wakeup_remote callback
  which implements the Vfs::Remote_io interface in vfs/ip.
  genode_nic_client_notify_peers will only be called in case the vfs goes idle.

  measured speed up: TX x9.1, RX x1.6

* retrieve genode_socket_info from Linux ipconfig.c

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
14ae2cc846 vfs_lxip: use socket_info for address retrieval
Replace Linux specfic address information (ip, netmask, etc) with
C-API's socket_info

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
6cefd1e16c vfs_lxip: implement Vfs::Remote_io
This is required for NIC-session batching and triggers only when VFS
user goes idle.

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
0e48ea08cf os: move genode_c_api/nic_client from lxip to os
The Nic-client C-API is based on the Uplink C-API.

issue #5471
2025-04-10 14:12:37 +02:00
Sebastian Sumpf
a57ebc55fa os: move genode_c_api/socket.h from lxip to os
Move lxip local socket C-API to os/include/genode_c_api

issue #5471
2025-04-10 14:12:37 +02:00
Roman Iten
1e518cb606 dde_linux: use 'assert'-proc in run scripts
Issue #5432
2025-04-10 14:12:20 +02:00
Christian Helmuth
2d89b53b0c depot: update recipe hashes 2025-02-27 12:53:40 +01:00
Josef Söntgen
f081306eeb lighttpd: use pcre library
Needed for pattern matching in the configuration file.

Issue genodelabs/genodians.org#37.
2025-02-27 12:53:40 +01:00
Norman Feske
2719b37107 run: use ram attribute in start nodes
Issue #5448
2025-02-24 16:39:20 +01:00
Johannes Schlatow
7a158e1e40 lx_emul: emit TOUCH_RELEASE events with proper ID
When emitting TOUCH_RELEASE events, we have to make sure that the
release events refer to the corresponding ID of the preceding TOUCH
event(s).

Fixes #5446
2025-02-24 16:39:20 +01:00
Christian Helmuth
5076554f20 depot: update recipe hashes 2025-01-30 16:32:35 +01:00
Josef Söntgen
acf1488e65 libnl: use fixed_stint.h for typedefs
Issue #5431.
2025-01-30 16:30:15 +01:00
Christian Helmuth
cd6701c483 depot: update recipe hashes 2024-12-11 08:35:22 +01:00
Christian Helmuth
011b44c282 depot: update recipe hashes 2024-11-20 08:58:39 +01:00
Stefan Kalkowski
591aadea54 lx_emul: take usb device lock before resetting it
Fix genodelabs/genode#5381
2024-11-20 08:58:39 +01:00
Alexander Boettcher
188080e15f intel/display: add i915_gem_evict_for_node
When the aperture is close to full or such fragmented, this unimplemented
function may be invoked.

Fixes #5377
2024-11-08 16:45:51 +01:00
Josef Söntgen
7fe7ca1968 driver/wifi: provide best practices in README 2024-11-08 16:11:03 +01:00
Christian Helmuth
30f3ef25ad depot: update recipe hashes 2024-10-30 14:02:44 +01:00
Josef Söntgen
fe93df27d1 driver/wifi: fix invalid network check
This commit alignes the implementation to the intention of dismissing
invalid '<network>' entries. We only accept entries when they contain
a valid SSID and additionally a valid PSK if the network is protected.

Issue #5356.
2024-10-30 08:14:53 +01:00
Stefan Kalkowski
4f084d1f9e lx_emul: unify NIC uplink binding
Fix genodelabs/genode#5361
2024-10-30 08:05:33 +01:00
Sebastian Sumpf
77d53f13ca lx_emul: handle pin controller irqs
Register Global_irq_controller as Device so interrupts get forwarded to
irqchip.c code. Otherwise, pin-controller interrupts will get lost.

Fixed #5363
Related #5356
2024-10-30 08:05:33 +01:00
Josef Söntgen
be70fddbb8 nic/pc: disable IRQ coalescing in R8169 driver
This commit patches the DDE Linux contrib code to remove IRQ coalescing
from the R8169 driver that for reason not yet known leads to interrupts
occurring irregularly.

Issue #5356.
2024-10-15 08:42:03 +02:00
Josef Söntgen
7760116478 linux-firmware: add QCA9377 FW (MNT Pocket Reform)
Issue #5360.
2024-10-11 14:48:01 +02:00
Josef Söntgen
95c439e758 driver/wifi: fix firmware pointer check
Issue #5360.
2024-10-11 14:47:48 +02:00
Josef Söntgen
e0874baa8f
driver/wifi: remove auto_connect attribute
This commit does away with controlling the join-intent via an attribute
but couples it to the existence of a '<network>' node. With this change
all '<network>' nodes within the configuration are always
unconditionally considered for joining.

Issue #5356.
2024-10-08 14:21:20 +02:00
Josef Söntgen
e4d2a4df42
driver/wifi: split hidden network scanning
This commit splits the intent to scan for a hidden network and the
actual configuration of a network itself by introducing
'<explicit_scan>' nodes. Like the '<network>' node these also feature
a 'ssid' attribute and each node is incorporated into the SCAN request
if its SSID is valid.

For more information please consult 'repos/src/driver/wifi/README'.

Issue #5356.
2024-10-08 14:20:56 +02:00
Josef Söntgen
40f2b58098
pc_wifi: use wifi_config.inc helper
Introduce helper that does away with the redundant config generation
snippets.

Issue #5356.
2024-10-08 14:20:22 +02:00
Christian Helmuth
61c9706353 depot: update recipe hashes 2024-10-08 11:30:26 +02:00
Sebastian Sumpf
c27e25b5ca lx_emul: shmem_file.h adapt to folio changes
Everything related to compound pages is gradually removed and replaced
with folios.

issue #5264
2024-10-08 09:09:23 +02:00
Sebastian Sumpf
8530aa7540 lx_emul/start: move lx_emul_setup_arch behind kmem_cache_init
Call lx_emul_setup arch after kmem_cache_init, because
unflatten_device_tree requires 'memblock_alloc' which  does not work
when using native slub.c/memblock.c on ARM platforms.

issue #5264
2024-10-08 09:09:23 +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