Commit Graph

8440 Commits

Author SHA1 Message Date
Christian Prochaska
48cc52be07 tool chain: tool check cleanup
- look for autoconf 2.69 on Ubuntu 22.04
- remove obsolete checks
- add new checks

Fixes #4622
2022-10-12 12:09:35 +02:00
Alexander Boettcher
9e33e57294 nova: support more MSIs
Issue #4578

Ref alex-ab/nova#8
2022-10-12 12:09:34 +02:00
Christian Helmuth
b20cabb6e4 pci: fix PCIe extended capability definition
Also removed the warning about unhandled capability IDs.

Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
6a7247ab44 platform: remove cache attribute from io_mem call
Instead of allowing the client to set a caching attribute
in the io_mem() call of the device interface, which was
only used to decide in between of the memory  being
write-combined or not, remove it from the API.
Instead use the information delivered by the devices ROM,
whether memory from a PCI BAR is prefetchable or not,
to decide whether it is mapped write-combined or not.

Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
7334128a2e pci_decode: export prefetchable attribute of BARs
Memory descriptors in PCI BARs have a prefetchable bit, which can
be used to optimize memory access when setting, e.g. write-combined
in page-table entries.

Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Christian Prochaska
1d0b9ed302 qt5: fix build errors with GCC 11 host tool chain
Fixes #4621
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
6a36e8a8dc pci_decode: count MSI numbers beginning from one
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Norman Feske
5956dd591f sculpt: version 22.10 2022-10-12 12:09:34 +02:00
Sebastian Sumpf
e1e70dd927 platform_drv: fix Intel graphics PCI infos
GMCH is at offset 50 on Gen8+.

Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
85e69f6882 driver_time.run: remove legacy platform_drv
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
5600e21d16 virtualbox_auto tests: remove legacy platform_drv
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Martin Stein
f59ee209d2 nic_router: use exact packet sizes in dhcp client
The DHCP client used to always send packets with a size of 1024 regardless of
the size of the actual content, which was always significantly lower. 1024
bytes was simply a guess to provide enough space for all types of DHCP client
packets. As we know the exact size of each packet the DHCP client sends even
before packet creation, this commit makes use of the knowledge resulting in
much smaller packets sent by the DHCP client.

Fixes #4619
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
c7c460f6e0 os: add include/pci/* to os api
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Martin Stein
665a551fcd base-hw & cortex_a9: consider timer IRQ unreliable
On some Cortex A9 platforms (Qemu 4.2.1 PBXA9), the IRQ status register is not
reliable. Sometimes, it indicates an IRQ too early, i.e., shortly before the
counter wraps. Therefore we have to accomplish wrap detection via counter
comparison only. We check whether the current counter value is higher than the
start counter value of the current timeout.

However, this implies that we have to take care to always read out the counter
before it hits the max timout value again. And, therefore, the max timeout
value has to be far away from the first value the counter has after wrapping.
Consequently, we propagate a max timeout value of half the max counter value.

Fixes #4209
2022-10-12 12:09:34 +02:00
Johannes Schlatow
32efbdfb32 vfs_tap: fix README (mode attribute) 2022-10-12 12:09:34 +02:00
Stefan Kalkowski
afa0bed5fc platform_drv: add USB4 pci class, update README
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
ec6f89111e virtio_pci: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
fdba7259ab platform_drv: provide Virtio PCI information
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
de0c339e0b pci: remove pci test of legacy platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
b8eab65536 dde_linux: remove legacy usb_host_drv for x86
Remove legacy platform_session API usage from legacy lx_kit/lx_emul

Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
91e64c3f27 vbox5_genode_usb_hid: remove legacy platform_drv
Ref genodelabs/genode#4578
2022-10-12 12:09:34 +02:00
Stefan Kalkowski
71eefc3315 nic_router_uplinks.run: remove legacy platform_drv
Ref genodelabs/genode#4511
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
203f24742a netperf tests: remove legacy platform_drv
Ref genodelabs/genode#4511
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
9b38af4d7d smartcard.run: remove legacy platform_drv
Ref genodelabs/genode#4511
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
c8f055c9e3 smbios_decoder.run: remove legacy platform_drv
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
e7571c539c sculpt: use generic platform driver
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
250275fbfb gpu_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
03cec5cdd7 dde_bsd: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
8d746a701e drivers_nic-pc: use generic platform_drv
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
7cf6651d2c ipxe_nic_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
feaaaa3e8b drivers_interactive-pc: use generic platform_drv
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
92b5dda2bc vesa_fb_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
ed8f71e459 ahci_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
5528434fb6 lx_kit & lx_emul: use generic platform API
* Remove wrapper for legacy x86 platform API
* Move PCI configuration space quirks to corresponding driver
  (pc_usb_host_drv, pc_wifi_drv, pc_intel_fb_drv)
* Adapt driver test run-scripts to changed configuration

Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
9f9a5186e0 ps2_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
71129fca2d nvme_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Stefan Kalkowski
42a46b75f1 depot: add recipe for pc devices rom
Ref genodelabs/genode#4578
2022-10-12 11:59:09 +02:00
Stefan Kalkowski
5e42f347d8 platform_drv: attach reserved memory to device PD
Consumes the information about reserved memory region reports from
the devices ROM, and adds appropriated mappings to the corresponding
device PD.

Ref genodelabs/genode#4578
2022-10-12 11:59:09 +02:00
Stefan Kalkowski
85dc2e5b9b pci_decode: interpret reserved memory from ACPI
We need the information about reserved memory region reports
from the ACPI tables within the platform driver to pre-fill
IOMMU tables with the corresponding mappings. Therefore,
the pci_decode component now parses the information from the
ACPI ROM, and adds "reserved_memory" nodes to all related
devices in the devices report.

Ref genodelabs/genode#4578
2022-10-12 11:59:08 +02:00
Stefan Kalkowski
281785f6bd platform API: make MMIO dataspace cap accessible
In case of the GPU multiplexer, we need to delegate MMIO memory
to the framebuffer client in form of a managed dataspace. To be
able to attach a given Platform::Device::Mmio object to a region map
we need to access its capability.

Ref genodelabs/genode#4578
2022-10-12 11:59:08 +02:00
Stefan Kalkowski
c583446ade platform_drv: add HDAUDIO PCI quirks
Ref genodelabs/genode#4578
2022-10-12 11:59:08 +02:00
Stefan Kalkowski
b85b3abe20 base-hw: update cpu_scheduler unit test
* Modernize routines, eliminate pointers, use constructibles, etc.
* Use absolute time instead of relative time consumption when
  updating the scheduler

Ref genodelabs/genode#4151
2022-10-12 11:59:08 +02:00
Stefan Kalkowski
debd41081e base-hw: optimize & cleanup scheduler
* Remove useless `ready_check` function
* Implement fine-grained checking when schedule updating is necessary

Ref genodelabs/genode#4151
2022-10-12 11:59:08 +02:00
Christian Helmuth
13bfe50d00 Update expat to version 2.4.9
The tar.gz archive of version 2.4.6 vanished from sourceforge.
2022-10-12 11:59:08 +02:00
Martin Stein
c23b74e150 base-hw: problems with timeout lib in src recipe
This commit fixes two issues with the timeout lib and the base-hw src recipe:

* Add source files of timeout lib to recipe content.
  The files weren't copied to the depot until now. However, the archive
  nonetheless built successfully because of the second issue that is described
  below.

* Get rid of the usage of the BASE_DIR variable in the timeout lib.
  The BASE_DIR variable always resolves to the repos/base directory even when
  building in a depot. That said, the use of BASE_DIR in make-files that are
  not part of the build system itself must be avoided. Instead, REP_DIR,
  REP_INC_DIR, and $(call select_from_repositories, ...) should be used.

Ref #4209
2022-10-12 11:59:08 +02:00
Norman Feske
da150dbb1c Xml_node: allow whitespace around '=' characters
Fixes #4167
2022-10-12 11:59:08 +02:00
Christian Helmuth
ef269ea2e0 sd_card_bench: disable on rpi 2022-10-12 11:59:08 +02:00
Christian Helmuth
0ead7eacfd tool_chain_auto: disable on unsupported platforms
all: imx53_qsb_tz, rpi
foc: imx6q_sabrelite
2022-10-12 11:59:08 +02:00
Christian Helmuth
c8dd433e8b depot_autopilot: disable unsupported tests on foc/pbxa9 2022-10-12 11:59:08 +02:00
Stefan Kalkowski
0231ee4ad3 hw: don't halt kernel due to unknown cpu exception
Fix genodelabs/genode#4617
2022-10-12 11:59:08 +02:00
Christian Helmuth
6c6ce30389 depot_autopilot: disable unsupported tests on riscv 2022-10-12 11:59:08 +02:00
Martin Stein
88cddc35dd nic_router: use the dictionary data structure
This commit gets rid of the router-local wrapper of Genode's AVL string tree
and replaces it with Genode's new Dictionary structure. The Dictionary is now
used for managing domains and NIC clients. Due to this change, the formerly
necessary helper classes Domain_base and Nic_client_base could be removed as
well.

Ref #4610
2022-10-12 11:59:08 +02:00
Martin Stein
3a616fed4d nic_router: rename is_ready() to ready()
Ref #4612
2022-09-21 14:03:31 +02:00
Christian Helmuth
3f1870841c depot: update recipe hashes 2022-09-21 12:19:10 +02:00
Christian Helmuth
548c3b46ad test-trace_buffer: increase thread stack to 8K
Prevents warnings on x86_32/linux.
2022-09-21 12:19:10 +02:00
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