Commit Graph

8435 Commits

Author SHA1 Message Date
Stefan Kalkowski
dda168fc10 platform API: simplify _wait_for_device
Fix genodelabs/genode#4615
2022-09-21 12:19:10 +02:00
Sebastian Sumpf
0370b0fa23 platform_drv: fix reference count in "Switch" class
Only decrement by 1 in the "unuse" function.
2022-09-21 12:19:10 +02:00
Stefan Kalkowski
4b9fb10fdb platform_drv: aquire_single_device return first
* Only acquire and return the first device

Fix genodelabs/genode#4614
2022-09-21 12:19:10 +02:00
Johannes Schlatow
f25070d441 irq_connection: add constructor with session label
When creating an Irq connection to a component (not core), e.g. a pin
driver, we typically need a to provide a session label in order to apply
a session policy and to distinguish multiple sessions from the same
component.

genodelabs/genode#4606
2022-09-21 12:19:10 +02:00
Norman Feske
c0e303632e gems: fix clipping in polygon_gfx/line_painter.h
This clipping check happened to wrongly test the surface's clipping area
instead of the by 1x1 pixel reduced 'clip' rectangle.
2022-09-21 12:19:10 +02:00
Norman Feske
0ff755b236 menu_view: remove minor code redundancy
This is a follow-up commit for "menu_view: configurable alpha channel
and bg color", which simplifies the code. The '_no_alpha' surface is not
needed because the 'Gui_buffer' provides a 0x0 alpha surface when using
the opaque mode.
2022-09-21 12:19:10 +02:00
Norman Feske
8bccc6e68f cached_fs_rom: increase fs buffer size to 4 MiB
The default file-system communication-buffer size of 128 KiB combined
with the clamping of requests to 1/4th the buffer size results in the
fragementation of read operations into 32 KiB chunks. This is overly
conservative and causes high context-switch overhead down the storage
stack (vfs server -> part_block -> block driver).

Related to #4613
2022-09-21 12:19:10 +02:00
Norman Feske
20df224b19 dde_rump: increase max I/O request size to 1 MiB
With the increase of MAXPHYS, the rump kernel requests a contiguous
allocation of 2101248 bytes, which exceeds the allocator's block size of
2 MiB.

  Error: backend allocator: Unable to allocate memory (size: 2101248 align: 12)

The patch avoids this corner case by increasing the allocator's block
size to 4 MiB.

Fixes #4613
2022-09-21 12:19:09 +02:00
Martin Stein
99254b4d52 nic_router: bind link state to remote DNS config
The NIC router README claims that the 'dns_config_from' attribute in a DHCP
server configuration binds the propagated link state of all interfaces at the
domain of the server to the validity of the IP config of the domain that is
given through 'dns_config_from'.

However, this was not true. The router missed to implement this detail which
led to clients of such a DHCP server sending DHCP DISCOVER packets too early.
These early DHCP DISCOVER packets were dropped by the router potentially
causing a big delay until the client started a new attempt. Unnecessary long
network boot-up delays were observed with at least the lwip run script and
Sculpt on the PinePhone and could be tracked down to this former
inconsistency in the router.

This commit fixes the inconsistency.

Fixes #4612
2022-09-21 12:19:09 +02:00
Johannes Schlatow
4fd1b52d1f trace_recorder: adopt Genode::Dictionary
genodelabs/genode#4610
2022-09-21 12:19:09 +02:00
Norman Feske
ab7c0b40f2 depot_query: avoid repetitive file accesses
This patch changes the access of pkg-archives files such that the file
read only once per pkg, not for each ROM module used by the package.

Issue #4611
2022-09-21 12:19:09 +02:00
Norman Feske
851ae574d1 depot_query: add directory cache
By caching directory listings, the performance of depot_query is no
longer impeded by a massive amount of stat calls while searching for ROM
module locations.

Issue #4611
2022-09-21 12:19:09 +02:00
Norman Feske
b4441bff04 depot_query: remove ineffective caches
Upon closer inspection of real-world access patterns, it turns out that
the 'Stat_cache' and 'Cached_rom_query' are not as effective as hoped
for because cache hits are rare while querying pkg blueprints.

However, by increasing the initial size of the blueprint reporter from 4
KiB (default) to 64 KiB has a great effect. With the small default
report size, the querying of blueprints is repeated until the buffer
size suffices, incrementing the buffer size by 4 KiB in each iteration.

Issue #4611
2022-09-19 14:00:36 +02:00
Norman Feske
3be0136901 base: add util/dictionary.h utility
The new 'Dictionary' provides an easy way to access objects using
strings as key. The 'String' received the 'operator >' to simplify the
organization of strings in an AVL tree.

The patch removes the former definition of the 'operator >' from the
platform driver because it would be ambigious now.

Fixes #4610
2022-09-19 14:00:35 +02:00
Norman Feske
6df66a77d0 sculpt: avoid superfluous depot queries
This patch avoids repetitive depot queries at the start of the Sculpt
system.

We don't need to trigger a query unconditionally whenever the
managed/deploy changes because the call of 'handle_deploy' triggers a
query when needed.

We don't need to trigger a query once the prepare step is completed
because the depot_query component is spawned at this point. The initial
blueprint produced by the depot_query component, in turn, triggers the
'handle_deploy' mechanics in the sculpt manager.

The constructor of the Sculpt manager's 'Main' does not need to call
'depot_deploy' because the prepare step - which is a precondition for
the deployment - cannot be completed at this point anyway.
2022-09-19 14:00:35 +02:00
Sebastian Sumpf
003247d883 dde_bsd: audio do not advance on silence
Do not advance ring buffer positions when playing silence, additionally
to not send progress signals when playing silence. Silence implies
underrun in the client side - not progress.

issue #4609
2022-09-19 14:00:35 +02:00
Sebastian Sumpf
e0c4d5068d audio_out_session: reset changes to 'pos = tail'
In case a driver is waiting for data, is should only investigate 'pos'.
It should not advance the ring in any way until there is data available.

issue #4609
2022-09-19 14:00:35 +02:00
Norman Feske
907641f6ea lx_fs: improve safety when using dir handles
This patch consolidates the repetitive error handling across the RPC
functions, which take node handles or directory handles as arguments.

During this change, I noticed that directory handles - which are values
provided by the client - were not checked for their type before being
used. A misbehaving client may open a file, manually construct a
directory handle using the number of the file handle, and invoke a
directory operation at lx_fs, which would then wrongly access a file
node as directory node.

This patch solves this issue by introducing two distinct methods
_with_open_node and _with_open_dir_node, which perform the respective
safety checks.

Fixes #4608
2022-09-19 14:00:35 +02:00
Martin Stein
79cc9af212 nic_router: intf. con/destruct reports link state
Creating and destructing an interface was not considered a change of its real
link state as defined in the description of the <report link_state_triggers="">
config attribute in the router's README. In case of Uplink sessions this is
obviously a problem as they communicate their real link state through session
lifetime. But also in case of NIC sessions it's a possible to create an
interface that is immediately "up" after creation or destruct an interface
without its link state going "down" beforehand.

Taking into account also the practical application of the
<report link_state_triggers=""> attribute, reporting only on destruction and
construction of interfaces that are "up" seems shorthanded. This is because a
report-receiver most likely needs to be able to synchronize the lifetime of
the objects that keep track of the link states with the lifetime of the
corresponding sessions.

That said, with this commit, the router triggers a report update on each
session construction/destruction when <report link_state_triggers=""> is
set.

Fixes #4462
2022-09-19 14:00:35 +02:00
Martin Stein
aff1db1543 nic_router: generate reports asynchronously
The NIC router used to generate reports triggered by IP config changes or link
state changes synchonously, i.e., inline with the activation context that
caused the change. This has two disadvantages. First, it can lead to an
excessive number of report updates in situations with quick bursts of
triggering changes. In such situations it is preferable to collect the changes
and reflect them with only one final report update.

Second, synchronous reporting may happen while the router is in a state that
leads to an incorrect report (e.g. during reconfiguration). To prevent this
from happening, the router so far explicitely switched off reporting when
entering incoherent states and back on when leaving them. However, this
solution is error-prone as the exclusion windows must be maintained manually.

Both issues can be solved by not directly generating a report when necessary
but instead submitting a signal and letting the signal handler do the work in
a dedicated activation context.

Ref #4462
2022-09-19 14:00:35 +02:00
Christian Helmuth
a573d3a332 Adapt tested log pattern in vbox5_genode_usb_hid_raw 2022-09-19 14:00:35 +02:00
Christian Helmuth
82f96668fa Increase cpu_burner RAM quota in test-trace_logger
Now, the test also succeeds on sel4.
2022-09-19 14:00:35 +02:00
Norman Feske
cc9368ccb4 os: add File_system_session::num_entries RPC
This patch splits the querying of the number of directory entries from
the directory's 'status' information. Subsuming the number of directory
entries as part of the status makes 'stat' calls too costly for some
file systems that need to read a directory for determining the number of
entries. So when stat'ing the entries of one directory that contains sub
directories, all entries of each sub directory are visited.

Thanks to Cedric Degea for pointing out this performance bottleneck!

With this change, the 'status' function returns a 'Status::size' value
of 0 when called for a directory handle.

Fixes #4603
2022-09-19 14:00:35 +02:00
Norman Feske
5b4b243e3d sculpt.run: distinguish DEPOT=list from DEPOT=omit
This patch splits the former DEPOT=omit option into two variants.
The new 'list' option behaves like the former 'omit' option, skipping
the creation of the tar archive from the depot content referenced by the
deploy configuration but showing a list of depot archives that need to
be published for the deployment.

When specifying 'omit' in th new version, the local depot is not queried
for the packages referenced in the deploy configuration. So the
deployment can refer to packaged hosted only remotely.

Fixes #4605
2022-09-19 14:00:34 +02:00
Norman Feske
96191fe577 gems: reanimate depot_deploy.run 2022-09-19 14:00:34 +02:00
Christian Helmuth
c8b4b83b71 base-linux: inhibit tracing in region-map attach/detach
Tracing must be inhibited in attach/detach as RPC trace points may
trigger attachment of trace dataspaces, which would result in nested
mutex acquisition.

This prevents errors in test-trace_logger like follows.

  [init -> depot_autopilot] 0.140 [init -> dynamic_rom] Error: deadlock ahead, mutex=0x500e6f00, return ip=0x50053ed7

Fixes #4607
2022-09-19 14:00:34 +02:00
Johannes Schlatow
80a2f7224e gems: src/lib/trace_recorder -> src/trace_recorder
The target.mk files for building the trace policies are no longer
reachable under src/lib/ by the build system.

genodelabs/genode#4599
2022-09-19 14:00:34 +02:00
Martin Stein
b82d83e271 nic_router: handle bad DNS in DHCP ACK gracefully
The DHCP client of the NIC router used to end up in an uncaught exception if
an IP address in the DNS server option of a DHCP ACK was invalid. This commit
makes the 'Dns_server' constructor (where the exception originated from)
private and instead introduces a public lambda method 'construct' that calls
one lambda argument on success and another on failure. This is also in line
with the most recent changes to the 'find_by_*' methods of other classes in
the NIC router and contributes to the goal of reducing expensive exception
handling.

Fixes #4465
2022-09-19 14:00:34 +02:00
Martin Stein
054990aafa nic_router: fix net session aliases
The Interface class of the router is an abstraction for NIC client sessions,
NIC server sessions, and Uplink sessions. Nonetheless, Interface generally used
to use the packet stream types of the Nic namespace and it worked because the
Uplink packet stream types are factually the same (the are typedef'd from the
same base type templates with the same parameters).

The initial intention of this issue was to remove dependency on the diverse
packet stream stream types from Interface. However, this turned out to be more
tricky than thought. The Interface class calls function templates on the packet
stream types, making a generic virtual interface impossible. And moving the
calling code to the session classes as well would produce a lot of redundancy.

Therefore, this commit removes only the use of the Nic namespace in the
interface.* files by typedef'ing the packet stream types from the generic
Genode type templates with the same parameters as in Nic and Uplink.

Fixes #4385
2022-09-19 14:00:34 +02:00
Martin Stein
d9b5e4ae8d libc: warn on missing std*="" or <fd path=""> file
The libc kernel used to silently go on if one of the files given through
stdin/stdout/stderr or <fd path=""> was missing (with possibly vital
functionality for the component not working). A pointer to the presumably
simple configuration issue of the underlying scenario was not given to the
user.

With this commit, the libc kernel prints a descriptive warning before
proceeding with the invalid file descriptor

Fixes #4218
2022-09-19 14:00:34 +02:00
Martin Stein
5e9e003bb0 libc: warn on missing std*="" or <fd path=""> dirs
The libc kernel used to end up in an uncaught exception if one of the
directories in the paths given through stdin/stdout/stderr or <fd path=""> was
missing. The resulting error didn't point the user to the presumably simple
configuration issue of his scenario in any way and killed the affected
component.

With this commit, the libc kernel prints a descriptive warning instead and
simply continues to run the component with the corresponding file descriptor
missing. At least in case of stdin/stdout/stderr, the libc deals gracefully
with this approach.

Ref #4218
2022-09-19 14:00:34 +02:00
Christian Helmuth
5b25060730 libc: prevent compiler warning 2022-09-19 14:00:34 +02:00
Christian Helmuth
8186a1d7f8 Support seconds in vfs/rtc plugin and libc backend
Fixes #3886
2022-09-19 14:00:33 +02:00
Johannes Schlatow
4689275845 depot_deploy: do not fail on missing nodes
If provided with a config that does not include a `<static>` or
`<common_routes>` node, depot_deploy exits due to a `Nonexistent_sub_node`
exception. Instead, we should output a more useful warning.

Fixes genodelabs/genode#4600
2022-09-19 14:00:33 +02:00
Johannes Schlatow
7d143087c9 xml_node: change with_sub_node signature
The `with_sub_node` method is renamed to `with_optional_sub_node` to
better reflect that the non-existence of a sub node with the desired type is
ignored.
At the same time, the new `with_sub_node` now takes a second functor that is
called when no sub node of the desired type exists.

genodelabs/genode#4600
2022-09-19 14:00:33 +02:00
Christian Helmuth
f0e9881c7e intel_fb: prevent compiler warning 2022-09-19 14:00:33 +02:00
Stefan Kalkowski
f2c52d1570 usb c-api: manage lifetime of session handles
Fix genodelabs/genode#4602
2022-09-19 14:00:33 +02:00
Stefan Kalkowski
3d26ce9f8d usb_host: acknowledge all requests asynchronously
Fix genodelabs/genode#4601
2022-09-19 14:00:33 +02:00
Norman Feske
7c3b9c843f base-hw: tighten src-archive content of lib/mk/
This patch refines the rules for generating a base-hw src archive
for a given board by enumerating the content of the lib/mk/spec/*
directories instead of including entire directories. This avoids
the inclusion of lib.mk files found in SoC-specific repositories
(like genode-allwinner) in the kernel source archives.

When building a binary archive from such a src archive with the changes
of issue #4599, the build system would otherwise try (and fail) to build
the libraries for the accidentally included lib.mk files.
2022-09-19 14:00:33 +02:00
Norman Feske
4c1ec0404a Remove unused target from recipes/src/libc 2022-09-19 14:00:32 +02:00
Norman Feske
bd9478204d Exclude file lib from gems API
The 'file' library makes the gems API depend on the libc, which is not
desireable because most users of the gems API have no direct libc
dependency.

With the changes of issue #4599, the build of each src archive that
depends on the gems API would attempt to build the 'file' library and
thereby demand the libc.

Note that the 'file' library is a relic that should better not be
promoted as part of the gems API. Hence, this patch removes the file
library from the gems API and adds it to the src archives of the few
remaining users.

Issue #4599
2022-09-19 14:00:32 +02:00
Norman Feske
35661d065e base-linux: omit unused lib/mk/ from API recipe
The 'base-linux' API is used by hybrid Genode/Linux programs for the
lx_hybrid library. This API archive happend to contain other libraries -
like seccomp - that are solely needed for building core. With the change
of the build system in issue #4599, the build system would attempt to
build all libraries instead of merely the library dependencies of the
available targets. Hence, it would trigger the build of, e.g.,  the
seccomp library for each user of the base-linux API.

This patch avoids these superfluous build steps by pruning the content
of lib/mk/ to the libraries actually needed for lx_hybrid users.

Issue #4599
2022-09-19 14:00:32 +02:00
Norman Feske
f1f0ee3a21 base: disregard ld.lib.so stub as build artifact
The ld.lib.so stub library generated by base/lib/mk/ld.mk has no
purpose at runtime. On the contrary, it must not be integrated into the
boot image because its name collides with the kernel-specific dynamic
linker.
2022-09-19 14:00:32 +02:00
Norman Feske
9aab61f5a7 mk: allow declaration of build artifacts for libs
The build system automatically announces the names of shared libraries
as build artifacts. However, in rare cases, it is required to manually
define them. In particular, the 'ld' stub library plays no role at runtime
and should not be integrated into the boot image.

This patch adds a customization hook following the same pattern as used
for target.mk files, namely the BUILD_ARTIFACTS variable. If defined,
its value is taken as the list of boot artifacts generated by the
library-description file.

Issue #4368
2022-09-19 14:00:32 +02:00
Norman Feske
dd9e12601e Remove pseudo targets for building shared libs
Thanks to the change "build: support library builds via lib/<libname>",
shared libraries can now be built directly by the build system.

Issue #4599
2022-09-19 14:00:32 +02:00
Norman Feske
c560285d88 build: support library builds via lib/<libname>
This patch adds special handling for lib/<libname> arguments to the
build system, which supersedes the former LIB=<libname> mechanism.
Whereas the old mechanism was limited to a single library, the new
convention allows multiple library arguments, similar to regular
targets. The change brings the two immediate benefits.

First, the streamlining of library and target arguments allows for the
building of libraries via the 'build' command of the run tool.

Second, it alleviates the need for pseudo target.mk files for building
shared libraries that have no direct dependencies, in particular VFS
plugins.

Since this change eases the explicit creation of shared libraries
from run scripts, we may reconsider the automatic implicit building
of shared libraries driven by targets. E.g., while developing a Qt
application, a run script could import the Qt libraries from the
depot and combine those with the developed (fresh built) target without
triggering the build of the Qt libraries in the build directory.

When issueing 'make' without arguments, all targets are built. This
patch applies this behavior to libraries as well, thereby removing the
need for the base/src/lib/target.mk pseudo target as used by the CI
tools to build all libraries.

Note that target.mk files located under src/lib/ are no longer
reachable. Therefore, all run scripts that used to trigger the
build of a shared library via a pseudo target must be adapted.
E.g., 'build lib/vfs/tap' must be replaced by 'build lib/vfs_tap'.

With this patch, the LIB=<libname> option is no longer supported.

Fixes #4599
2022-09-19 13:59:28 +02:00
Norman Feske
f50971b6a9 os: src/lib/trace/policy -> src/trace/policy
The target.mk files for building the trace policies are no longer
reachable under src/lib/ by the build system.

Issue #4599
2022-09-19 13:59:27 +02:00
Norman Feske
88e13bb236 base-linux: src/lib/initramfs -> /src/initramfs
Move the target for initramfs outside the src/lib/ directory because
target.mk files within src/lib/ are no longer reachable.

Issue #4599
2022-09-19 13:59:27 +02:00
Johannes Schlatow
bc57e9e647 vfs: add Append_file class
This reverts commit cf904e0a5d and
introduces the Append_file class instead.

genodelabs/genode#4352
2022-09-19 13:59:27 +02:00
Alexander Boettcher
354667bb6d lx_emul: validate USB endpoint and settings param
to avoid pagefaults and general protection faults on access to unpaged memory
regions.

Fixes #4596
2022-08-31 15:10:17 +02:00
Alexander Boettcher
b888c95024 qemu-usb: reread settings on configuration profile
changes. The alternative settings get reread on all interfaces as done before
"qemu-usb: fix device endpoint update" commit by introducing specific
reset_alt_settings function. The fallthrough case was intentionally before
the "qemu-usb: fix device endpoint update" case, which now is wrong.

Issue #4596
2022-08-31 15:10:17 +02:00
Alexander Boettcher
adc4d47251 usb_host: use Expanding reporter for device report
Issue #4596
2022-08-31 15:09:23 +02:00
Christian Helmuth
4dddc41b71 depot: update recipe hashes 2022-08-31 09:32:09 +02:00
Christian Prochaska
85044d65af qt5: add missing include in qtwebengine
Fixes #4595
2022-08-31 09:32:09 +02:00
Christian Helmuth
0368601b16 Prevent warning in trace-recorder policy
Make warned about

  make[2]: Circular /plain/krishna/build/genode_staging/x86_64/bin/ctf0_pcapng <- ctf0_pcapng dependency dropped.
2022-08-31 09:32:09 +02:00
Norman Feske
60194d666d menu_view: add 'important' frame style
This style is used by the upcoming phone version of Sculpt for GUI
elements that are supposed to stand out a little bit more than the
regular frame style.
2022-08-31 09:32:09 +02:00
Norman Feske
461a27a674 sculpt_manager: support opaque menu_view instances
Related to issue #4592.
2022-08-31 09:32:09 +02:00
Norman Feske
2772abc8d7 menu_view: configurable alpha channel and bg color
This patch enhances menu_view with the optional configuration attributes
'opaque' and 'background'. Setting 'opaque' to "yes" suppresses the use
of the alpha channel at the GUI session. This improves the drawing
performance by 20% on the PinePhone. Since the menu_view uses the
gems/gui_buffer.h utility, the 'Gui_buffer' received a new 'Alpha'
argument at construction time.

The 'background' attribute can be specified to define the reset color of
the GUI buffer. It alleviates the need to create a frame widget for the
top level.

The patch also switches the optimization level for compiling menu_view
to -O3, which increases the drawing performance on the PinePhone by 30%.

Fixes #4592
2022-08-31 09:32:09 +02:00
Norman Feske
bd8c7f84dd touch_keyboard: tweaks for PinePhone display
This change increases the quota to allow the use of bigger fonts, and
tweaks the style such that the keyboard gets a decent appearance on the
PinePhone's 1440x720 display.
2022-08-31 09:32:09 +02:00
Norman Feske
697d2e86d7 sculpt: add modem support via USB net
This patch adds principle support for using a USB-net modem as
mobile-data uplink. The change is motivated by the upcoming phone
manager for the PinePhone where the modem serves as the primary network
uplink. For the regular PC version of Sculpt, the feature is not needed
(hence remains disabled) because USB net can be deployed from a package
as described in:

  https://genodians.org/jschlatow/2021-07-21-mobile-network

The patch also renames the "Local" network option to "Disconnected" to
be more intuitive.
2022-08-31 09:32:09 +02:00
Norman Feske
5a0b4c98aa sculpt_manager: move Network::_menu_view to Main::
By decoupling the network dialog's menu view from the 'Network' class,
we become able to host the network dialog in the same menu view instance
as other dialogs.
2022-08-31 09:32:09 +02:00
Norman Feske
6f2237fc46 sculpt_manager: add missing includes 2022-08-31 09:32:09 +02:00
Norman Feske
4f4f270d35 sculpt.run: expose leitzentrale state to manager
This patch allows the sculpt manager hosted in the leitzentrale
subsystem to observe the toggling between the runtime and the
administrative GUI. This enables alternatives to the use of the
gui_fader for switching between both views. In particular, the
upcoming phone_manager toggles the visibility of its own GUI
depending on the leitzentrale state.
2022-08-31 09:32:09 +02:00
Norman Feske
8b85eb9b34 sculpt.run: customize initial /config/managed/
In a Sculpt system based on the upcoming phone_manager, the event filter
obtains its static configuration from /config/managed/event_filter.
Without the requirement for changes at runtime, there is no need to
have the phone_manager in the loop after all.

Without this patch however, this file was always initialized with the
template gems/sculpt/event_filter/default, which was presumably used
only at boot time until the sculpt manager has produced the first
generated event-filter configuration.

This patch applies the choice of optional configs - i.e., a custom
event_filter config - to both the config/ and the initial content of
config/managed/. So in cases where the /config/managed/event_filter
remains entirely static, the latter properly reflects the choosen
variant.
2022-08-31 09:32:09 +02:00
Norman Feske
236ebecf44 event_filter: new touch-key filter
The new <touch-key> filter type can be used to trigger artificial
press/release events for predefined touch-screen areas.

Fixes #4587
2022-08-31 09:32:09 +02:00
Christian Helmuth
59f1fe7625 rump: ext2_fs depot package
Usable via Sculpt /config/deploy, e.g. via

  <start name="nvme-0.4.fs" pkg="ext2_fs">
    <route>
      <service name="Block">
        <child name="nvme-0.part_block" label="4"/>
      </service>
      <service name="RM">
        <parent/>
      </service>
    </route>
  </start>

Fixes #4590
2022-08-31 09:32:09 +02:00
Christian Helmuth
d82d67a4b2 part_block depot package
Usable via Sculpt /config/deploy, e.g.,

  <start name="nvme-0.part_block" pkg="part_block">
    <route>
      <service name="Block">
        <parent label="nvme-0"/>
      </service>
      <service name="Report" label="partitions">
        <parent/>
      </service>
    </route>
  </start>

Issue #4590
2022-08-31 09:32:09 +02:00
Christian Prochaska
8f9f0f1d7f qt5_textedit: add mesa driver requirement to runtime
Fixes #4591
2022-08-31 09:32:09 +02:00
Christian Helmuth
6fbc953dbd Declare missing exception types thrown in USB session 2022-08-31 09:32:09 +02:00
Christian Prochaska
82a57a10e7 qt5: update to version 5.15.2
Fixes #4589
2022-08-31 09:32:08 +02:00
Christian Prochaska
6d172b8e7a qt5.run: provide mesa driver route for children
Fixes #4588
2022-08-31 09:32:08 +02:00
Norman Feske
08279e6288 Create Point, Area, Rect via 'from_xml' functions
By using the new functions provided by the base API, this patch removes
the dependency of several components from include/decorator/xml_utils.h.

Issue #4584
2022-08-31 09:32:08 +02:00
Martin Stein
f64d1bbc30 vfs_libusb: fix missing dependency to libusb
Ref #4582
2022-08-19 07:59:10 +02:00
Norman Feske
381a3406ba sculpt: evaluate initial manual nic_router config
Fixes #4586
2022-08-17 16:33:14 +02:00
Christian Prochaska
fb454a28fe libc: support 'thread_local' variable destructors
Fixes #4585
2022-08-17 14:51:50 +02:00
Norman Feske
42edac8a34 util/geometry: support 'Rect::from_xml'
This patch eases the creation of 'Point', 'Area', and 'Rect' objects
from XML attribute values.

Fixes #4584
2022-08-17 14:28:12 +02:00
Norman Feske
5319f36788 util/string.h: support 'int' for 'ascii_to'
This patch complements the 'long' version of the 'ascii_to' conversion
function by an 'int' version.

Fixes #4583
2022-08-17 14:28:12 +02:00
Martin Stein
d0a33e34da pcsc-lite: fix inc dir base in depot case
Fixes #4582
2022-08-17 12:26:44 +02:00
Martin Stein
3286d37c64 pcsc-lite: src and api recipe
Ref #4582
2022-08-17 12:26:44 +02:00
Roland Bär
8f228e3035 nic_router: no ICMP on unroutable IPv4 multicast
The NIC router used to send an ICMP "Destination Unreachable" packet as
response to every unroutable IPv4 packet. However, RFC 1812 section 4.3.2.7
defines certain properties that must be fullfilled by an incoming packet in
order to be answered with this type of ICMP. One requirement is that the packet
is no IPv4 multicast.

This commit prevents sending the mentioned ICMP response for unroutable IPv4
multicasts and instead drops them silently.

Fixes #4563
2022-08-17 12:26:01 +02:00
Christian Helmuth
44e2cd14a0 depot: update recipe hashes 2022-08-17 12:03:26 +02:00
Norman Feske
48711c6f8b sculpt: hook for audio-driver integration
This patch allows the leitzentrale subsystem to control an audio driver
hosted in the drivers subsystem. An example use case is the toggling of
the speaker during phone calls.
2022-08-17 12:03:26 +02:00
Sebastian Sumpf
b5c780993c board: Rename virt_qemu to virt_qemu_<arch>
Instead of having a generic "virt_qemu" board use "virt_qemu_<arch>" in
order to have a clean distinction between boards. Current supported
boards are "virt_qemu_arm_v7a", "virt_qemu_arm_v8a", and
"virt_qemu_riscv".

issue #4034
2022-08-17 12:03:26 +02:00
Johannes Schlatow
c462720c28 trace_recorder: add TraceCompass analyses
Define custom analyses that can be imported into TraceCompass (>= 7.3)
for evaluating the traced component interactions and checkpoints.

genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
e4aceb7845 trace_recorder: add combined ctf + pcapng policy
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
ef742001e8 trace_recorder: implementation
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
53f576e50e trace_recorder: add pcapng policy
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
be20b715ca trace_recorder: add ctf policy
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
758ba3855e trace: add types for trace_recorder policies
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
062881a484 trace: add types for ctf tracing
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
810bbc0484 nic_router: add trace_packets config option
genodelabs/genode#4352
2022-08-17 12:03:26 +02:00
Johannes Schlatow
cee0c9858c trace_buffer: add object() accessor
genodelabs/genode#4352
2022-08-17 12:03:07 +02:00
Johannes Schlatow
086f3efef2 trace: add trace_eth_packet event
genodelabs/genode#4352
2022-08-17 12:03:07 +02:00
Johannes Schlatow
80a422e590 trace: add GENODE_TRACE_CHECKPOINT macros
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Johannes Schlatow
73dad70356 trace: add checkpoint event
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Johannes Schlatow
cf904e0a5d vfs: add append mode to New_file
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Christian Helmuth
2e266dfe3c vbox5_genode_usb_hid_raw: support --depot-auto-update
... in nested run.
2022-08-10 13:33:04 +02:00
Christian Helmuth
eeb40d0cc2 vbox5_genode_usb_hid_raw: configure static RTC
This prevents

  Warning: clock_gettime(): missing real-time clock

log messages.

Related to #4561
2022-08-10 13:33:04 +02:00
Peter Krummenacher
11b964b759 audio_in_session: fix wrong buffer in content
Fixes #4573
2022-08-10 13:33:04 +02:00
Christian Prochaska
3f8bde1254 vbox6: don't call blocking 'read()' to start audio recording
Fixes #4580
2022-08-10 13:33:04 +02:00
Christian Prochaska
bda276f498 vfs_oss: implement 'SNDCTL_DSP_SETTRIGGER' command
Fixes #4579
2022-08-10 13:33:04 +02:00
Martin Stein
a4ec06a3b7 nic_router: no empty DNS servers opt in DHCP reply
The NIC router used to add the DNS servers field to DHCP replies regardless of
whether there were DNS servers or not. As reported by a Genode user, the empty
DNS server field irritated at least Windows 10 guests (Vbox 6) that connected
to the NIC router. This resulted in Windows 10 ignoring DHCP offers from the
router with such characteristic.

With this commit adding the DNS server DHCP option is skipped if there are no
DNS servers at the corresponding DHCP server or the domain IP config the server
shall fetch its DNS servers from.

Fixes #4581
2022-08-10 13:33:04 +02:00
Christian Helmuth
1dd69eeb6c lx_emul: skip USB config setting if already set
Skip SET_CONFIGURATION requests if the device already has the selected
config as active config. This workaround prevents issues with Linux
guests in VirtualBox and SDC-reader passthrough.

Thanks to Peter for the patch.
2022-08-10 13:33:04 +02:00
Josef Söntgen
3d8c1080b1 dde_linux: remove exited tasks
The commit introduces means to mark a task for destruction that is
removed on the next scheduling cycle. This fixes stack leakage from
dynamic kworker tasks.

Issue #4575.
2022-08-10 13:33:04 +02:00
Josef Söntgen
bc665384c3 dde_linux: free stack on task destruction
Issue #4575.
2022-08-10 13:33:04 +02:00
Stefan Kalkowski
8255053242 platform_drv: export Intel graphics PCI infos
Provide additional PCI register information inside the pci-config part
of the devices ROM for clients able to access an Intel graphic card,
namely the GMCH control register content, which contains for instance
the GTT size and stolen memory size.

Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
9dfc2caa11 platform_drv: add UHCI PCI quirks
Implement BIOS handover and Intel resume register update
apart from device driver to circumvent export of PCI
config space to drivers.

Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
413e2baa1c platform_drv: PCI assignment failure is no error
When there is no I/O MMU available the assignment is failing too,
although this is no error but normal behaviour.

Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
8f9b5e9bd2 depot: src package for pci_decode
Ref genodelabs/genode#4578
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
2cc6c1adef pci: export BAR indices, sub-vendor, -product, rev
The pci_decode has to extract the additional fields from the PCI configuration
space. The platform driver again has to parse and forward the knowledge too.
The PCI BAR indices are exported when info="yes" is set in the policy node for
the corresponding session.

Fix genodelabs/genode#4577
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
5bf3e72d37 pci: return correct I/O port base from BAR
The base address of I/O ports has a different encoding than
those of I/O memory. This needs to be encountered in the PCI
config helper utilities.

Fix genodelabs/genode#4576
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
49c6e01049 qemu-usb: ignore invalid USB data packets
Fix genodelabs/genode#4574
2022-08-10 13:33:03 +02:00
Johannes Schlatow
a6a856cb70 dde_ipxe: fix allocation errors under high TX load
Under high TX load, 'irq_handler()' is rarely executed but packets
are still received since 'netdev_poll()' is called for every TX packet.

'netdev_poll()' not only handles completed transmissions but also
puts the IO buffers of received packets into the RX queue and refills the RX
ring by allocating more IO buffers. However, the IO buffers can only be freed
after they have been dequeued and passed to the 'rx_callback()'. Since
this was only done by 'irq_handler()', we exhaust the slab allocator
under high TX load.

A fix for this is to process the RX queue not only in the IRQ handler
but also when transmitting packets.

genodelabs/genode#4555
2022-08-10 13:33:03 +02:00
Alexander Boettcher
e2b61231ae pc: avoid use usleep_range in m/udelay emulation
m/udelay is called with closed interrupts. Linux contrib code expects no
other task to be run respectively to be re-scheduled. usleep_range leads to
executing other tasks, which causes assertions in "spinlock taken twice" or
"unexpected preempt count" errors, seen on runtime with wifi_drv and intel_fb.
The assertion triggered with the changes by #4562.
2022-08-10 13:33:03 +02:00
Alexander Boettcher
6c5d2253c9 sel4: increase caps in filesystem tests
fixes x86_32/64 libc_vfs_fs_ext2 and libc_vfs_fs_fat
2022-08-10 13:33:03 +02:00
Martin Stein
3868df9f8b nic_router_dhcp_*: raise timeouts
On okl4, pistachio, sel4 the test didn't come up fast enough in order to still
experience the first configuration of NIC router #1. This commit doubles the
lifetime of the first configuration of NIC router #1 to 4 seconds and raises
the overall test timeout accordingly.

Ref #4555
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
89f9e7a3ee lx_emul: consolidate SMP + NO_HZ_IDLE
* Move common SMP and NO_HZ_IDLE variables and functions into
  generic lx_emul shadow implementations, and integrate them
  into the common lx_emul import rules
* Enable SMP and NO_HZ_IDLE within virt_linux kernel configuration
* Adapt pc drivers and wireguard accordingly
* Use original Linux softirq implementation in wireguard
* Remove erroneous softirq shadow implementation

Ref genodelabs/genode#4540
Ref genodelabs/genode#4562
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
48eacb6f79 qemu-usb: handle Interface_not_found exceptions
Fix genodelabs/genode#4572
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
560747c22e lx_emul: active config validation in usb driver
Fix genodelabs/genode#4567
2022-08-10 13:33:03 +02:00
Stefan Kalkowski
92a5fa9bed lx_emul: remove usb device reset in session close
Ref genodelabs/genode#4566
2022-08-10 13:33:03 +02:00
Martin Stein
e32157e21b nic_router: packet allocation w/o exceptions
In overload situations, i.e. when a sender fills up the entire buffer, we land
in situations where the sender receives an ack_avail signal, releases one
packet, allocates and sends a packet and fails to allocate a second packet.
This is especially relevant if the receiver does not batch ack_avail signals
(such as vfs_lwip). In those ping-pong scheduling scenarios, the overhead from
catching the Packet_alloc_failed exception becomes significant. In case of the
NIC router, we will land in an overload situation if the sender is faster than
the receiver. The packet buffer will be filled up at some point and the NIC
router starts to drop packets. For every dropped packet, we currently have to
catch the Packet_alloc_failed exception.

This commit adds a new method alloc_packet_attempt to Packet_stream_source that
has almost the same signature as the older alloc_packet method but returns
an Attempt<Packet_descriptor, Alloc_packet_error> object. As the method already
used the allocator back end exception-less, changes on lower levels were not
needed. Furthermore, the NIC router was modified to use the new exception-less
alloc_packet_attempt instead of alloc_packet.

Ref #4555
2022-08-10 13:33:03 +02:00
Alexander Boettcher
3f69457a94 pc/intel: add intel_fb test to autopilot 2022-08-10 13:33:03 +02:00
Martin Stein
433029c3a6 nic_router: find ARP cache entries w/o exceptions
Replaces the former implementation of the 'find_by_ip' method at the data
structure for ARP cache entries. This method used to return a reference to the
found object and threw an exception if no matching object was found.

The new implementation doesn't return anything and doesn't throw exceptions. It
takes two lambda arguments instead. One for handling the case that a match was
found with a reference to the matching object as argument and another for
handling the case that no object matches.

This way, expensive exception handling can be avoided and object references
stay in a local scope.

Ref #4555
2022-08-10 13:33:03 +02:00
Johannes Schlatow
e2086ac8e4 nic_router: change max_packets_per_signal default
According to a benchmarking series on Zynq (base-hw) and x260 (base-nova) using
test-nic_perf_router, increasing the 'max_packets_per_signal' has a significant
effect on the packet throughput. By increasing the default value from 32
to 150, we could gain a few hundred Mbit/s. Increasing the value further
does not seem to have such a strong effect, though.

genodelabs/genode#4555
2022-08-10 13:33:03 +02:00
Johannes Schlatow
a2b74af59a depot: add nic_perf recipes
genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
3e562bc9bb os: add nic_perf component
The nic_perf component is used for benchmarking the throughput of Nic
and Uplink sessions.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
8df8f78fe2 nic_router_dhcp: fix signal handler in test client
The test client did not react upon packet_avail and ack_avail signals.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Martin Stein
9a37ccfe29 nic_router: incremental L4 checksum updates
The checksums for forwarded/routed UDP, TCP and ICMP, used to be always
re-calculated from scratch in the NIC router although the router changes only
a few packet fields. This commit replaces the old approach whereever sensible
with an algorithm for incremental checksum updates suggested in RFC 1071.
The goal is to improve router performance.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
b6d15fa3ab nic_router: incremental IPv4 checksum updates
The checksums for forwarded/routed IPv4, used to be always re-calculated from
scratch in the NIC router although the router changes only a few packet fields.
This commit replaces the old approach whereever sensible with an algorithm for
incremental checksum updates suggested in RFC 1071. The goal is to improve
router performance.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
d69e89f5cb internet checksum: use signed long for accumulator
We used to use 'unsigned long' for the accumulating variable when calculating
internet checksums. However, 'signed long' is more in accordance with RFC 1071
and will allow us to share the same back end for folding, once we implement
incremental updating of internet checksums.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
6b3ed6c75b internet checksum: no default arg value
Prevent public reflection of the only internally used 'init_sum' argument in
'uint16_t internet_checksum(...)' that, in addition, added a default value to
the function interface.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
07d4a7c11f nic_router: no IPv4 checksum update on ICMP echo
When sending an ICMP ECHO reply, the router merely swaps SRC and DST of the
IPv4 header of the corresponding request and these changes cancel each other
out in checksum calculation. Therefore, with this commit, the router skips
updating the IPv4 checksum in this context.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
865ee192b4 nic_router: no checksum update on IP routing
The router used to update IPv4 checksums when routing via an <ip> rule
despite the fact that it doesn't change any IPv4 header fields in this case.

Ref #4555
2022-08-10 13:33:02 +02:00
Martin Stein
95b3b36cd9 nic_router: update checksums only once per packet
The NIC router used to update IPv4 and layer 4 checksums of a packet for each
interface it was sent to (say, all interfaces of the domain the packet was
routed to). However, there was and is no technical reason for not doing it
only once and then iterating over the interfaces with the already updated
packet. This is what this commit does in an intent to raise the router's
performance.

Ref #4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
01c9c32573 nic_router: relax timer accuracy for timestamps
The NIC router uses the timer for relatively coarse-grained timeouts.
It therefore suffices to update and store the current time when the NIC router
is signalled and use the cached time instead. This prevents frequent
syscalls or RPCs when acquiring the current time for every packet.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
735abca1b6 nic_router: avoid marginal timeout updates
The link dissolve timeout is updated for every packet, which leads to
trigger_once() RPCs that only marginally change the scheduled timeout but
significantly slow down the packet throughput.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
3ea910bf83 packet_stream: reset wakeup_needed on wakeup()
The wakeup call only emits a single signal as it assumed both are
handled by the same signal handler. However, the original implementation
did not reset the wakeup_needed variable properly.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
6a308dacd7 packet_stream: always emit ack_avail
When using signal batching, ack_avail and packet_avail should always
be emitted and preferred over ready_to_submit and ready_to_ack.
A signal receiver might decide to not register the ready_to_* signals when it
handles congestion by dropping packets. The Nic router is an example of
such a signal receiver.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Johannes Schlatow
8193f5571a nic_router: batch packet stream signals
genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Alexander Boettcher
359283968a vbox6: improve NMI handling
Fixes #4568
2022-08-10 13:33:02 +02:00
Christian Helmuth
eda6c6607c Restore dynamic on/off in usb_webcam test
Issue #4565
2022-08-10 13:33:02 +02:00
Christian Helmuth
8d7ade5604 lx_emul: fix single USB interface claim/release
Fixes #4565
2022-08-10 13:33:02 +02:00
Stefan Kalkowski
596c20c199 pc: enable SMP and softirq/tasklets in lx_emul
Enables symetric-multi-processor support in the Linux kernel configuration
used as base for the driver ports for PC. This is done to be compliant with
common usage of x86 drivers today.
Moreover, this commit uses the original kernel source for softirq/tasklet
implementation to get rid of the insufficient shadow implementation
in the lx_emul sources.

Ref genodelabs/genode#4562
2022-08-10 13:33:02 +02:00
Stefan Kalkowski
ec1b060fc5 dde_linux: x86 requirements for SMP
Prepare shadow implementations in spinlocks, pagetable defines,
and irq_stack assembler macros to be able to enable SMP on x86/PC.

Ref genodelabs/genode#4562
2022-08-10 13:33:02 +02:00
Stefan Kalkowski
c898a4770b dde_linux: initialize wait_bit subsystem
This is needed to compile kernel/sched/wait_bit.c needed by
x86 SMP as prerequisite for kernel/softirq.c.

Ref genodelabs/genode#4562
2022-08-10 13:33:01 +02:00
Josef Söntgen
558e2fc35e libdrm/etnaviv: fix DRM version implementation
Issue #4559.
2022-08-10 13:33:01 +02:00
Josef Söntgen
da25b288ee libports: add mesa/lima driver
This commit introduces the Mesa3D lima driver for Mali 400 series
GPUs.

Issue #4559.
2022-08-10 13:33:01 +02:00
Josef Söntgen
d2c26fd504 libdrm: introducde DRM dispatcher
The dispatcher will select between the various DRM drivers. For
now it is only used by the etnaviv driver.

Issue #4559.
2022-08-10 13:33:01 +02:00
Josef Söntgen
1f819a26e5 mesa/etnaviv: use VFS Gpu plugin to acquire Env
Issue #4559.
2022-08-10 13:33:01 +02:00
Josef Söntgen
02f3b965b9 mesa/etnaviv: move to arm_v8 spec
Issue #4559.
2022-08-10 13:33:01 +02:00