Commit Graph

8990 Commits

Author SHA1 Message Date
Josef Söntgen
ae0e0c118e nvme_drv: add support for host-memory-buffer
This commit introduces support for the HMB feature and will setup the
buffer during start-up. The host-memory-buffer (HMB) feature is mostly
used on NVMe devices that do not make use of an DRAM cache to store its
translation tables amongst other operational data. Not using HMB can
impair the performance on such devices.

The memory is allocated in 2 MiB chunks of DMA-capable memory and its
total size in bytes is configurable via the 'hmb_size' config attribute.
The driver always checks the minimal and preferred size of the HMB and
issues a warning in case it is not enabled via the configuration.
Moreover, if the configured size is less than the minimal amount
required by the device the HMB is not configured at all and a warning
is issued also. If the configured size is more than the preferred size
it will be capped to that amount.

Fixes #4715.
2023-03-13 14:32:53 +01:00
Norman Feske
239d4864e9 loader: support dynamic session upgrades
This patch converts the loader implementation to the 'Session_object'
interface to implement the ability to upgrade the session caps and RAM
after after the session creation. This is needed to accommodate the
change of the Loader::Connection in commit "Remove format strings from
connection types".

Issue #2064
2023-03-13 14:32:53 +01:00
Norman Feske
c99fb2b69b core: replace use of Avl_string by Dictionary
Issue #4780
2023-03-13 14:32:53 +01:00
Stefan Kalkowski
ec700e88f7 pci_decode: do not handle signals after decoding
Remove signal handler and ACPI report ROM from Main class
to prevent to react on report changes.

Fix genodelabs/genode#4779
2023-03-13 14:32:53 +01:00
Norman Feske
8698e693d5 trace_logger: replace Avl_string by Dictionary
Issue #4780
2023-03-13 14:32:53 +01:00
Norman Feske
d4047e9af7 nic_router: remove stale include of avl_string.h 2023-03-13 14:32:53 +01:00
Norman Feske
d727d18871 base: remove format strings from API
This patch ultimatedly removes format strings from Genode's base API.
Users of the former base/snprintf.h and base/console.h headers may
use the free-standing 'format' library hosted in the ports repository.

Fixes #2064
Fixes #3869
2023-03-13 14:32:53 +01:00
Norman Feske
e9b249b709 Replace use of base/snprintf.h by format library
Issue #2064
2023-03-13 14:32:53 +01:00
Norman Feske
9ef0f1b6cb libports: freestanding 'format' string library
This little library implements rudimentary format-string support. It is
useful for porting 3rd-party code that ought not depend on a full libc.

Issue #2064
2023-03-13 14:32:53 +01:00
Norman Feske
50ee8dfaf8 Remove obsolete includes of base/snprint.h
Issue #2064
2023-03-13 14:32:53 +01:00
Norman Feske
94b8c61e32 libc: remove internal use of base/snprintf.h
Issue #2064
2023-03-13 14:32:52 +01:00
Norman Feske
8b44f49d75 vbox5: remove use of base/snprintf.h
Issue #2064
2023-03-13 14:32:52 +01:00
Norman Feske
36c00cc294 gems: remove use of format strings
Issue #2064
2023-03-13 14:32:52 +01:00
Norman Feske
ecd0066e80 os: remove use of format strings
Issue #2064
2023-03-13 14:32:38 +01:00
Norman Feske
915adcd0dd base: remove internal use of format strings
Issue #2064
2023-03-13 14:32:38 +01:00
Norman Feske
9debad4e91 Remove format strings from connection types
Issue #2064
2023-03-13 14:32:37 +01:00
Norman Feske
fb66e733b5 base: add 'Connection' constructor accepting args
The new 'Connection' constructor accepts the session label, affinity,
and args as constructor arguments. The session arguments are passed as a
'Genode::String'. This allows for side-stepping the need for rendering a
format string passed to 'Env::session'.

Issue #2064
2023-03-13 14:32:37 +01:00
Christian Helmuth
bed084c17c Add missing sources to wireguard
The additional files provide Chacha implementation in case
may_use_simd() returns false because in_interrupt() returns true.

Related to issue #4778, commit "lx_emul: track irq state changes"
2023-03-13 14:32:37 +01:00
Christian Helmuth
9ae4fc2371 dde_linux: explicitly list patch files
Using wildcards for selecting patch files clashes with files from
linux.port.
2023-03-13 14:32:37 +01:00
Stefan Kalkowski
6a7a30ceaa lx_emul: unify udelay implementation
Implement udelay for all architectures within common lx_emul code,
remove driver-specific version.

Always do busy looping in udelay and use cpu_relax()
like the original Linux code. Thereby, we profit from architecture specific
instructions (cpu cool down), and jiffies are updated if irqs are on.

Ref genodelabs/genode#4778
2023-03-13 14:32:37 +01:00
Stefan Kalkowski
50541c68ec lx_emul: shadow cpu_relax to update jiffies
There are rare use-cases where cpu_relax is used inside a busy loop
(i2c bus functions), which only will break when the jiffies counter
reaches a specific value.
Because of the cooperative scheduling done in lx_emul, no timer
interrupt will break such a loop. As a workaround, we check for
necessary jiffies updates inside cpu_relax if interrupts are enabled.

Ref genodelabs/genode#4778
2023-03-13 14:32:37 +01:00
Stefan Kalkowski
7e2c546d8e lx_emul: update jiffies during schedule
Whenever a new schedule decision is made in the Linux emulation layer,
we try to update the jiffies counter.

Ref genodelabs/genode#4778
2023-03-13 14:32:37 +01:00
Stefan Kalkowski
c90b61f571 lx_emul: track irq state changes
To be able to check for interrupts being on or off,
the enabling and disabling is tracked in lx_emul.
When interrupts get received, they have to be turned off.

Ref genodelabs/genode#4778
2023-03-13 14:32:37 +01:00
Stefan Kalkowski
eba2c8cf2f lx_emul: set timer irq task to highest priority
If a timer signal got received, first all time updates
have to be done, before other tasks get active.

Ref genodelabs/genode#4778
2023-03-13 14:32:37 +01:00
Stefan Kalkowski
2c1724d7f2 lx_emul: adjust start & stop tick behaviour
Do not start and stop idle ticking within the timer interrupt
routine, but do it around the whole Lx_kit scheduling, which
is always called when Linux code gets active again, either
because of backend signals, interrupts, or timing signals.

This commit implicitly reverts the (incomplete) solution of
issue #4550

Ref genodelabs/genode#4778
2023-03-13 14:32:37 +01:00
Roland Bär
b9b18c92d0 usb_host: deliver UTF-16 strings on request
Linux kernel static functions usb_string_sub() and usb_get_langid() were
made accessible to implement robust string rerieval.

Fixes #4756
Fixes #4757
Fixes #4772
2023-03-13 14:32:37 +01:00
Christian Helmuth
ea2584e2fb Fix usb_block.run and add to autopilot.list 2023-03-13 14:32:37 +01:00
Josef Söntgen
23cc96e661 wifi/pc: add firmware for the Intel AX210 2023-03-13 14:32:37 +01:00
Norman Feske
2e6dd010ae core: introduce 'Core' namespace
The namespace draws a clear line between the base library and the core
component.

It is declared at the new core-local header <types.h>, which is expected
to be included by all code of the core component. It is thereby a
natural place for kernel-agnostic general types like commonly used C++
utilities.

Fixes #4777
2023-03-13 14:32:37 +01:00
Josef Söntgen
487aad6db1 wifi: allow driver dump in error case
This commit implements dummies that would otherwise trigger a
'generated dummy' call that stops the driver.
2023-03-01 16:30:00 +01:00
Alexander Boettcher
98fa0a1ad2 wifi: don't use kzalloc directly
Avoid using wrong pointer when calling free_page() which causes
otherwise memory corruption.
2023-03-01 16:29:53 +01:00
Stefan Kalkowski
caef7d642a usb_block: enable WARN_STRICT_CONVERSION switch
Implicitely fixes problems with USB devices having more than 4G blocks.
Formerly the 16-Cmd LBA requests were silently casted to 32-bit.

Fix genodelabs/genode#4771
2023-03-01 16:28:55 +01:00
Christian Helmuth
e265cf6d49 depot: update recipe hashes 2023-02-27 08:22:51 +01:00
Roland Bär
470f07d462 Some documentation tweaks/cleanups
Fixes #4773
2023-02-27 08:22:50 +01:00
Christian Helmuth
a4d45921c6 Document event handling in acpi_event 2023-02-27 08:22:50 +01:00
Josef Söntgen
8145ff6303 qemu-usb: only copy data when packet succeeded
In case the packet is erronous the value of 'actual_size' can be
invalid and using it may lead to a page-fault due to out-of-bounce
access.

With this commit access is only performed on successful packets.

Fixes #4763.
2023-02-27 08:22:50 +01:00
Sebastian Sumpf
e2c334d6e4 linux: allow more workers when scheduling works
Workers are only summoned by the manager or when there are no workers on
a work queue. In case a work in front of a work queue depends on a work
behind it, a deadlock may occur. To solve this Linux spawns a rescue
worker using timers. Timing of Linux based drivers is currently reworked
and not reliable. Therefore, we increase the number of workers that are
spawned from 1 to 3 per work queue in order to resolve possible
deadlocks.

Fixes #4762
2023-02-27 08:22:50 +01:00
Alexander Boettcher
df27cc87b5 hw/x86: add suspend kernel syscall
using the ACPI mechanism. The syscall can be triggered solely via core's
RPC managing_system call.

Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
30c6feb86e hw/x86: re-init devices on resume
Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
1ea6708d84 hw/x86: prepare ACPI resume entry
Set wakeup pointer in FADT/FACS tables and prepare/place ACPI resume code
at application processors (AP) 16-bit entry. Exclude memory used for AP resume
from RAM range to avoid usage by Genode core in allocators.

Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
faf54244c4 hw/x86: keep cpu id after resume
The CPUs are woken all at once and up to now the IDs are assigned depending
on the arrival order, which is unfortunate for the resume case. Keep track
of once assigned IDs for CPUs, so that on resume the very same CPU id is given.
The APIC id is guaranteed to be fixed per CPU on suspend, but unfortunately
not dense packed.

Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
32b1aa605a hw/x86: add ACPI tables for resume
The ACPI table FACS and FADT are required to support ACPI suspend/resume. The
commits add the lookup of the ACPI table in bootstrap and the general usage
of the ACPI registers via the MMIO framework.

Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
dc1996d289 hw/x86: add interrupt controller re-init support
Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
1da71afbf3 hw: add Serial re-init/resume support
Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
5587476b4e hw: add Timer re-init/resume support
Add explicit init() to Timer infrastructure to re-initialize the hardware
based on the parameters given during constructing time of the timer object.

Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
1b5bfec8f9 hw: add CPU re-init/resume support
On resume the CPU state must be re-initialized, since all CPUs have been
potentially off (depending on sleep form) and lost state. Handle the halt
and suspend state explicitly by an extra Job implementation which can be
executed without holding the global kernel lock.

Issue #4669
2023-02-27 08:22:50 +01:00
Alexander Boettcher
a20a26b41b hw: add IPI type to flush and stop CPUs
as preparation before powering off the CPU

Issue #4669
2023-02-27 08:22:50 +01:00
Stefan Kalkowski
80453236c4 hw: don't depend on ARMv8 HCR, CPTR EL2 reg values
Instead of re-using the register values found in HCR_EL2 and CPTR_EL2
and setting single bits within them, define the complete content to
prevent inconsistent hardware/hypervisor state.

Ref genodelabs/genode#4759
2023-02-27 08:22:49 +01:00
Stefan Kalkowski
c5b9cabd89 vmm: enable effective C++ error switch
Several explicit casts could not be avoided yet, due to the missing
differentiation in between virtual and physical addresses that leads
to casting problems when using 32-bit ARM, and because the MMIO
register framework does not allow to return narrowed types of bitfields.

Apart from that, this commit fixes a switch-case fallthrough error in
Mmio_register::write.

Fix genodelabs/genode#4770
2023-02-27 08:22:49 +01:00
Stefan Kalkowski
adc594a7e6 os: remove conversion warnings/errors from virtio
The read_config and write_config functions in the generic virtio
headers used by all drivers lead to compiler warnings resp. errors
if effective-c++ switch is enabled. Moreover, the functions require
to define the access width as parameter. We can better turn them
into template functions using the value type to read resp. write to
derive the access width.

Ref genodelabs/genode#4344
2023-02-27 08:22:49 +01:00
Alexander Boettcher
ac69189e23 nova: support to re-enable IOMMU after ACPI resume
Issue #4669
2023-02-27 08:22:49 +01:00
Norman Feske
b044520344 Add missing includes of base/exception.h
This header used to be included implicitly by base/blocking.h, which
does no longer exist.

Issue #4768
2023-02-27 08:22:49 +01:00
Norman Feske
78b85339b0 vfs: buffer XML in <inline> file system
The use of 'Buffered_xml' removes the risk of the XML node's underlying
data to change during a component-config update.

Related to #4285
2023-02-27 08:22:49 +01:00
Norman Feske
6d25ffc70b Remove base/lock_guard.h
For Genode API users, the 'Mutex::Guard' is the way to go.
Special lock implementations can bring their own 'Guard' utilities.

Fixes #4769
2023-02-27 08:22:49 +01:00
Norman Feske
356506a67a base: remove base/blocking.h
This patch removes the obsolete exception type 'Blocking_canceled'.

Issue #4768
2023-02-27 08:22:49 +01:00
Norman Feske
32f9d1fceb os: remove server/input_event_bridge
This component was solely used during the transition of the
input-session to the event-session interface.

Fixes #4767
2023-02-27 08:22:49 +01:00
Norman Feske
b0e52ba7d4 util/misc_math.h: remove abs function
Fixes #4766
2023-02-27 08:22:49 +01:00
Norman Feske
e09941f310 Remove base/debug.h
Fixes #4765
2023-02-27 08:22:49 +01:00
Norman Feske
bdf47785b8 vfs: remove 'file_size' from read/write interfaces
The 'file_size' type denotes the size of files on disk in bytes. On
32-bit architectures it is larger than the size_t, which refers to
in-memory object sizes.

Whereas the use of 'file_size' is appropriate for ftruncate and seek, it
is not a suitable type for the parameters of read/write operations
because those operations refer to in-memory buffers.

This patch replaces the use of 'file_size' by size_t. However, since it
affects all sites where the read/write interface is uses, it takes the
opportunity to replace the C-style (pointer, size) arguments by
'Byte_range_ptr' and 'Const_byte_range_ptr'.

Issue #4706
2023-02-27 08:22:49 +01:00
Josef Söntgen
6e1517ca3c libdrm/lima: introduce disjunct contexts
Prior to this change the libdrm Lima implementation supported the
creation of multiple contexts where each context, however, was
treated as the same client like it was done in the Lima driver
itself.

With this commit each context becomes its own client while the
main context always performs all buffer object related allocation
and the other context import each needed BO before submitting.

Fixes #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
89f99df44d libdrm/lima: check buffer id in WAIT
Issue #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
66fedecf34 libdrm/lima: handle unknown buffer ids gracefully
Issue #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
46fc41ba50 libdrm/lima: rename Syncobj_space
Align the naming with the 'Gpu_context_space'.

Issue #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
909b25db57 libdrm/lima: refactor session and context handling
Merge 'Gpu_session' and 'Gpu_context' and create the main session
as context.

Issue #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
da32849ac2 libdrm/lima: move sync fd handling into DRM object
Converting from the sync-fd to the actual handle is internal
implementation detail.

Issue #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
401da72a86 libdrm/lima: remove try-catch from ioctl call
Remove the exception handling as at this point all exceptions should
have been handled internally already.

Issue #4760.
2023-02-27 08:22:49 +01:00
Josef Söntgen
b8d8ff6d4d libdrm/lima: use sync-fd range beyond libc's reach
Sync file-descriptors a purely virtual and are not known by the libc and
should be only accessed by 'drm_poll'. To prevent accidental access move
them to range never used by the libc fd allocator.

Issue #4760.
2023-02-27 08:22:48 +01:00
Stefan Kalkowski
c0e98f4481 base: fix conversion errors of smp timeout test
The cpu affinity index is an int no unsigned long within the interface
definition.

Ref genodelabs/genode#4344
2023-02-27 08:22:48 +01:00
Stefan Kalkowski
e6c64290fa libpng_static: silent strncpy warnings
Ref genodelabs/genode#4344
2023-02-27 08:22:48 +01:00
Norman Feske
b88951345f depot: recipe for pkg/stdin2out 2023-02-27 08:22:48 +01:00
Norman Feske
07e3e09652 util/string.h: add 'Const_byte_range_ptr'
The new 'Const_byte_range_ptr' type is suitable as argument type that
refers to a read-only byte buffer, e.g., the source buffer of a write
operation.
2023-02-27 08:22:48 +01:00
Christian Helmuth
73f7f8aef6 dde_linux: generalize kmalloc_order() implementation 2023-02-27 08:22:48 +01:00
Sebastian Sumpf
0a8ac9fe4d gpu/intel: don't copy sesion cap for onwership check
We determine the owner of a Vram object by the session cap of the
session that created the object. We should not copy this cap to other
places because this increases reference counting, that can become very
large with many objects. Therefore, we pass a wrapper 'Owner' object
containing the cap by reference.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
34b2a83b84 gpu_session: add notes to interface
Describe differences for Intel and Lima (Mali) based GPUs.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
f1bc791c22 gpu_session: rename Gpu::Virtual_address:va
rename 'va' into 'value' to stay consistent with other types.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
d10c7c31a4 black_hole: adjust to VRAM GPU session interface
issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
8279038da2 lx_emul: provide _raw_read_lock/unlock functions
Required by i.MX8's gpu driver. '_raw_read_lock' was already present but
not implemented, add it's counter part as well.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
56e7e2ad53 libdrm/lima+etnaviv: adjust to VRAM GPU session interface
Keep buffer abstraction by mapping one buffer to one VRAM object.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
47f1eaac2a gpu/intel: add VRAM support
Remove buffer abstraction and replace it by VRAM objects.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
f72cb2b69b ibdrm/iris: add VRAM support
Allocate 16MB or larger chunks and implement buffer abstraction for Iris
which possible share VRAM.

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
23b87929f5 libdrm/iris: remove unsused functions
* 'map_buffer', GTT mappings are currently not used by Iris
* 'set_tiling', tiling is currently not used by Iris because there are
  no GTT mappings

issue #4713
2023-02-27 08:22:48 +01:00
Sebastian Sumpf
3260c86d15 gpu_session: VRAM interface
Change the abstraction from buffers to video RAM (VRAM). The notion of
buffers can be provided at the client side (e.g., Mesa) and multiple
buffers can be there be associated to one VRAM area, thus saving
resources (meta data overhead) when allocating many buffers. A VRAM area
can also be mapped to one single buffer as before for clients or drivers
that do not take advantage of this feature.

issue #4713
2023-02-27 08:22:48 +01:00
Stefan Kalkowski
13453e3c68 hw: activate strict conversion checking in kernel
Fix genodelabs/genode#4753
2023-02-27 08:22:48 +01:00
Stefan Kalkowski
da0dbd901c base: fix conversion error in Bitset_2::get()
Ref genodelabs/genode#4753
2023-02-27 08:22:48 +01:00
Stefan Kalkowski
0212f94809 hw: eliminate -DNR_OF_CPUS, use constant instead
Fix genodelabs/genode#4752
2023-02-27 08:22:48 +01:00
Norman Feske
1d5fc3ef60 sculpt/depot: remove depot user trimpim
Fixes #4754
2023-02-27 08:22:47 +01:00
Norman Feske
c10904967b core: improve coding-style consistency 2023-02-27 08:22:47 +01:00
Martin Stein
5bdc88bf57 base-hw scheduler: sanitize access to invalid head
Issue #4755
2023-02-27 08:22:47 +01:00
Alexander Boettcher
c8cf33a251 sel4: flush vm pages on out of index pressure
re-create semantic as done before commit

"core: kernel-agnostic 'Mapping' type"

Issue #4751
2023-02-27 08:22:47 +01:00
Alexander Boettcher
d089e80906 sel4: handle non pagefault exceptions
by checking for it in core, submitting a signal (if registered) and not
replying instantly. Before this commit, an exception (a non page fault)
caused and endless "unknown exception" loop between originator and core.

This was handled before commit "core: kernel-agnostic 'Mapping' type" by
throwing an exception, which was with that commit not working anymore.

Fixes #4751
2023-02-27 08:22:47 +01:00
Sebastian Sumpf
79d389d812 base/ld: only assign .dynamic to the PT_DYNAMIC segment
Segment assignment stays valid for all sections following .dynamic,
which implies that .got and co also end up in the PT_DYNAMIC segment.
This is not intended.  Therefore, we move the .dynamic section before
bss and assign bss to the rw PT_LOAD segment only.

fixes #4750
2023-02-27 08:22:47 +01:00
Norman Feske
62af32270b depot: remove empty config from pkg/nano3d
This allows for routing the nano3d config to a ROM services like
dynamic rom.
2023-02-27 08:22:47 +01:00
Norman Feske
291beb1145 depot: recipe for pkg/dynamic_rom 2023-02-27 08:22:47 +01:00
Norman Feske
dbf02ac3c1 depot: add runtime pkg for cpu_load_display 2023-02-27 08:22:47 +01:00
Norman Feske
6e20ffb990 gems: simple oscilloscope for audio input 2023-02-27 08:22:47 +01:00
Norman Feske
fa167bcdc4 gems: screenshot trigger for virtual print button
The screenshot trigger displays a little red dot at the upper-left
corner of the screen. When touched or clicked-on, it generates an
artificial key-press-release sequence for the print key and disappears
for one second. In this time, a separate screenshot component can handle
the print key by capturing the screen without the red dot appearing in
the saved picture.
2023-02-27 08:22:47 +01:00
Norman Feske
d26770eb40 gems/gui_buffer.h: grammar fix in comment 2023-02-27 08:22:47 +01:00
Norman Feske
4653e2eb3b touch_keyboard: make background configurable
The touch-keyboard config accepts the new attributes 'opaque="yes"
and 'background=#112233' to control the dialog background. The
attributes are passed unmodified to embedded the menu view.
2023-02-27 08:22:47 +01:00
Norman Feske
611efd9921 sculpt_manager: increase fs_tool buffer size
This speeds up the use of the fs_tool when installing system images.
2023-02-27 08:22:47 +01:00
Norman Feske
791c389923 sculpt_manager: allow image, image-index download
Issue #4744
2023-02-27 08:22:47 +01:00
Norman Feske
6b3c7c9a6c sculpt_manager: 'File_operation_queue' enhancement
This patch add the support needed for implementing on-target
system-update functionality. The new 'empty' method is required for the
two-step procedure of updating image-index files - removing the old
index, followed by downloading the most current one. It is used to the
detect the completion of the first step.

Issue #4744
2023-02-27 08:22:47 +01:00
Norman Feske
60a089d795 sculpt_manager: 'Download_queue' enhancements
This patch reflects more details such as the percentage value for
downloads maintained in the download queue. This makes this information
easier to display at the GUI.

Issue #4744
2023-02-27 08:22:47 +01:00
Norman Feske
1f11e4b8db sculpt_manager: Popup_dialog::_scan_rom -> main
This change allows the consumption of the list of depot users by the
forthcoming system-update functionality.

Issue #4744
2023-02-27 08:22:47 +01:00
Norman Feske
46eb175b17 sculpt_manager: detailed storage progress messages
This patch replaces the generic "In progress..." message by slightly
more concrete information about the type of operation. This is useful to
distinguish the two steps during the expansion of a partition.
2023-02-27 08:22:47 +01:00
Norman Feske
677c8e828c depot_download,depot_query: support system images
This patch enhances the depot_download subsystem with support for
downloading and querying system images.

The installation ROM support the following two now download types:

  <image_index path="<user>/image/index"/>
  <image       path="<user>/image/<name>"/>

Internally, the depot-download subsystem employs the depot-query
component to determine the missing depot content. This component
accepts the following two new queries:

  <images      user="..."/>
  <image_index user="..."/>

If present in the query, depot_query generates reports labeled as
"images" and "image_index" respectively.

The also tracks the completion of each job depending on the depot-
query results, so that the final report contains a result for each
installation item requested. Prior this patch, the inactivity of the
depot-download manager (indicated by an empty state report) was
interpreted as success. But that prevents the proper association of
results and requested installation items.

Issue #4744
2023-02-27 08:22:47 +01:00
Norman Feske
b3bcab6c13 depot_query: split main.h from main.cc
This will allow for the implementation of 'Main' methods in .cc files.

Issue #4744
2023-02-27 08:22:47 +01:00
Norman Feske
866e84ec49 depot_query: supplement url to scanned user
The 'scan' query for depot users used to list the names of depot users.
However, the URL and existence of a pubkey is useful to know when
assembling a GUI menu from this list.

Issue #4744
2023-02-27 08:22:46 +01:00
Norman Feske
3355d14b65 sculpt_image.run script for creating system images
Issue #4744
2023-02-27 08:22:46 +01:00
Norman Feske
4de71549d4 sculpt: supplement build info as boot module
This allows us to reflect the information about the running image to the
user.

Issue #4744
2023-02-27 08:22:46 +01:00
Norman Feske
2986d46fd3 fs_tool: add <copy-all-files> operation
Related to issue #4744
2023-02-27 08:22:46 +01:00
Norman Feske
7ada79b5ca Don't use deprecated Readonly_file::read variants
Issue #4745
2023-02-27 08:22:46 +01:00
Norman Feske
61a7671de1 os/vfs.h: read loop in Readonly_file::read
This patch improves the Readonly_file::read method such that the
capacity of the specified buffer is used as upper bound for the read
operation instead of VFS-internal I/O buffer sizes. This relieves the
caller from implementing a read loop in most cases.

As a step away from C-ish use of the API, the patch deprecates the old
'read' method that takes the buffer as char *, size_t arguments.

Fixes #4745
2023-02-27 08:22:46 +01:00
Norman Feske
345b77cfc9 menu_view: use Expanding_reporter for hover report
This allows for arbitrary large hover reports.
2023-02-27 08:22:46 +01:00
Norman Feske
3447d0ccb9 menu_view: avoid flicker when enlarging the view
Each time when enlarging the menu view, a new 'Gui_buffer' is
constructed with the new size. At its contruction time, the default
reset background color is in effect, which is evaluated by
'reset_surface' as part of the construction. A custom reset color
takes effect only after the construction. Hence, when the Gui_buffer is
flushed to screen immediately at construction time, the gray default
becomes visible for a short time.

This patch changes the Gui_buffer to accept the reset background color
as construction argument so that it takes immediate effect.

Related to #4592
2023-02-27 08:22:46 +01:00
Christian Helmuth
21a9527686 pc/wifi: remove redundant Genode:: prefix 2023-02-27 08:22:46 +01:00
Christian Helmuth
de9ea43616 dde_linux: remove custom lx_backtrace (use lx_emul_backtrace) 2023-02-27 08:22:46 +01:00
Christian Helmuth
52fb4eee5f pc/wifi: restore optional MAC-address reporting
Issue #4133
2023-02-27 08:22:46 +01:00
Christian Helmuth
264ee999a1 acpi_event: generalize config for any key
Fixes #4748
2023-02-27 08:22:46 +01:00
Christian Helmuth
3403a91213 input: provide keycode-by-name lookup
The new utility returns a key code for a passed name and is implemented
by linear search, which is slow but sufficient in situations like config
updates.

Issue #4748
2023-02-27 08:22:45 +01:00
Alexander Boettcher
e8424e19fa vbox_share: increase resources for tcp_terminal 2023-02-27 08:22:45 +01:00
Christian Prochaska
f1b048c595 qt5: up-mix mono audio output data in QtWebEngine OSS backend
Fixes #4747
2023-02-27 08:22:45 +01:00
Christian Helmuth
e17d104c0a mk: restore compatibility to Make 4.1
The leading newline in the _capture function confused _filecontent,
which resulted in empty port hashes.

Fixes regression introduced in 437fd21ba0
(issue #4725).
2023-02-27 08:22:45 +01:00
Christian Prochaska
9dbaa150d6 gnu_build.mk: pass static libraries in '-l:' format
Fixes #4743
2023-02-27 08:22:45 +01:00
Alexander Boettcher
0724db2d80 sel4: avoid out_of* in several run scripts
caused by platform_drv and report_rom
2023-02-27 08:22:45 +01:00
Alexander Boettcher
d2f27a34f7 nova: avoid fault during thread migration
triggert by cpu_balancer.run on Qemu

Fixes #4742
2023-02-27 08:22:45 +01:00
Alexander Boettcher
93e26cae35 grub2: add small default font
Issue #4741
2023-02-27 08:20:46 +01:00
Christian Helmuth
84c5a7b0cd vfs_lwip: receive payload without breaking refcount
lwip uses a sophisticated reference-counting scheme in chains of pbufs,
which the former manual implementation of read() for TCP data broke.
Using pbuf_free_header() keeps the chain intact and also relieves our
implementation from the burden of "offset" maintenance.

Fixes #4722
2023-02-27 08:20:46 +01:00
Christian Helmuth
7858c00539 test/tcp: ascending integer mode
Add alternative (statically configurable) mode to fill the test data
with ascending integers for increased debugability.

Issue #4722
2023-02-27 08:20:45 +01:00
Christian Helmuth
297947bec7 Cleanup netty network tests
Issue #4722
2023-02-27 08:20:45 +01:00
Johannes Schlatow
4d0cb175da base-hw: use global timer on Cortex A9
genodelabs/genode#4360
2023-02-27 08:20:45 +01:00
Josef Söntgen
777b093cad sculpt_manager: add RTL8188EE FW routes
Issue #4714.
2023-02-27 08:20:45 +01:00
Josef Söntgen
578a8c9918 wifi/pc: add rtlwifi driver
Due to lacking hardware access the driver was test with one RTL8188EE
based device, namely [10ec:8179] (rev 01), only. As the access to the
PCI config space is restricted the driver loads the non power-saving
FW and the driver port is therefor only tested with that. The
accesses are documented should we choose to support them one way or
another later on.

The 'wifi.run' run script as well as Sculpt served as testing ground
where the driver worked fine so far.

Fixes #4714.
2023-02-27 08:20:45 +01:00
Josef Söntgen
e826095e71 legacy/lx_emul/usb: handle saturated submit queue
Check if we are able to submit the Usb packet before attempting to
allocate it. In case the queue is already full we wait until another
pending packet is freed.

Fixes #4701.
2023-02-27 08:20:45 +01:00
Josef Söntgen
25d0dc19d5 nvme_drv: provide get/set feature command
These admin commands are used to configure features of the NVMe device.

Issue #4715.
2023-02-27 08:20:45 +01:00
Josef Söntgen
00a6d1306c nvme_drv: allow for accessing admin cmd results
Up to now it was only checked if an issued admin command was processed
in a timely fashion. Otherwise it has been treated as failed.
However, the completion-queue entry was not examined and the caller was
not able to access the entry itself. Depending on the command, checking
the completion-queue entry might be necessary, e.g. GET/SET_FEATURE.

Issue #4715.
2023-02-27 08:20:45 +01:00
Josef Söntgen
9f9bed7aa8 nvme_drv: move PRP list helper construction
Since the 'Platform::Device' constructor will defer the creation until
the content of the devices ROM is valid performing the PRP list helper
creation afterwards should be done with valid IOMMU information.

Issue #4715.
2023-02-27 08:20:45 +01:00
Benjamin Lamowski
faf37b51e7 dde_linux: backport fix for use-after-free reported by GCC 12
On my system, compiling dde_linux fails with `-Werror=use-after-free`.
Backport the fix from mainline to get rid of the issue.

Fixes #4740
2023-02-27 08:20:45 +01:00
Stefan Kalkowski
bfa90ab3e8 vmm: make initramfs an optional feature
Fix genodelabs/genode#4723
2023-02-27 08:20:45 +01:00
Stefan Kalkowski
80687e702c vmm: implement VirtIO input model
Fix genodelabs/genode#4698
2023-02-27 08:20:45 +01:00
Stefan Kalkowski
85c8bd7d7e vmm: implement VirtIO GPU model
Ref genodelabs/genode#4698
2023-02-27 08:20:45 +01:00
Stefan Kalkowski
f2188bd397 vmm: silent several VirtIO config accesses
Ref genodelabs/genode#4698
2023-01-24 12:21:21 +01:00
Christian Helmuth
9de81369a7 libusb: retry configuration-descriptor retrieval
Some USB devices (e.g., webcams) fail to deliver their configuration
descriptor early after power-up. Testing revealed that retrying the
requests usually succeeds on second or third attempt.

Fixes #4739
2023-01-24 12:18:18 +01:00
Alexander Boettcher
4ab52aaf12 acpica: access ACPI IRQ via Platform "acpi" device
Issue #4679
2023-01-24 12:14:29 +01:00
Christian Helmuth
2353082bda pci_decode: report ACPI SCI IRQ in acpi device
Issue #4679
2023-01-24 12:14:23 +01:00
Christian Helmuth
53c2cff331 acpi: report ACPI tables and SCI IRQ
Issue #4679
2023-01-24 12:10:17 +01:00
Alexander Boettcher
661330a97a acpica: add dependency on acpi device
Issue #4679
2023-01-24 12:09:19 +01:00
Alexander Boettcher
dca71dbad9 pci_decode: add acpi device
Use it as point to defer clients (e.g. ACPI-CA) until platform driver could
claim all resources.

Issue #4679
2023-01-24 12:09:16 +01:00
Christian Helmuth
25eac6b9e6 depot: update recipe hashes 2023-01-24 12:07:33 +01:00
Norman Feske
3561ff90e9 sculpt_manager: remove unused Storage::dialog
This member variable remained unused since we moved the storage dialog
into the component graph.
2023-01-24 12:07:33 +01:00
Norman Feske
ffb8321e57 sculpt_test.run: add '-boot d' to Qemu args
When using '--include image/iso', we want to ensure that the virtual
machine boots from CD-ROM.
2023-01-24 12:07:32 +01:00
Christian Prochaska
ff8f7875f3 qt5: make physical screen size info configurable
Fixes #4733
2023-01-24 12:07:32 +01:00
Christian Prochaska
14483f64fd qt5: apply fix for QTBUG-83895
Fixes #4732
2023-01-24 12:07:32 +01:00
Sebastian Sumpf
437fd21ba0 mk: use _file_content instead of echo | cat
Use _file_content function to retrieve port hash instead of 'echo | cat'
construct that lead to 'Broken pipe' erros in GNU Make 4.4.

issue #4725
2023-01-24 12:07:32 +01:00
Tomasz Gajewski
d33139c40a enable ccache for reference Linux kernel
Genode build system allows to easily enable 'ccache' for builds. This
change allows to enable using 'ccache' also for build of reference
Linux kernel used during porting device drivers.

To enable 'ccache' it is enough to pass value of 'CC' variable when
executing Linux build but this build by default depends on time when it
is built which causes 'ccache' misses. To solve this issue additional
flags are passed to make build independent from time, current user and
host on which build is performed.

Issue #4718
2023-01-24 12:07:32 +01:00
Norman Feske
114238c248 sculpt_manager: query presets
This patch queries the files at config/presets/ in addition to
config/launcher using the existing launcher_query component.

Issue #4731
2023-01-24 12:07:32 +01:00
Norman Feske
88becbe29d sculpt: integration of optional presets
With the new 'presets:' tag, .sculpt files can now refer to deploy
configurations to be integrated in the presets/ subdirectory of the
config file system. Those files can thereby be used as preconfigured
system scenarios. Such a preconfigured scenario can be loaded at
runtime by copying the preset file to config/deploy.

Issue #4731
2023-01-24 12:07:32 +01:00
Alexander Boettcher
c06f5e2661 nova: flush on iommu context change (intel)
Fixes #4717
2023-01-24 12:07:32 +01:00
Alexander Boettcher
41865e6c30 nova: avoid oom fault on cross CPU
Fixes #4719
2023-01-24 12:07:32 +01:00
Alexander Boettcher
5f0ba7d722 intel_fb: handle rapid config change gracefully
In case of very rapid config ROM change (<300ms), the linux driver may still
be in progress of applying the previous change (e.g. switching connector on/off).

During this progress all tasks may become not runnable (waiting for IRQ/timeouts
until hardware state settles), the newest config ROM change/signal gets
dispatched, which lead to continuing the previous change request, but not
to re-starting/re-applying the new config change. To avoid this situation,
explicitly track whether a previous config change was finished and track if an
interim config change request came in. If so, re-start the lx_user
task with the newest config change.

Fixes #4721
2023-01-24 12:07:32 +01:00
Martin Stein
eba22b7551 nic_router: rework updating of TCP/UDP links
* Update links from forward rules only with forward rules and links from
  transport-routing rules only with transport-routing rules. Besides raising
  the performance of the code, this also fixes a former bug that allowed
  forward-rule links to falsely stay active because of a transport-routing
  rule that matched the client destination ip and port.

* Don't use good-case exceptions for updating TCP/UDP links on re-configuration
  of the router.

* Make conditions when to dismiss a forward rule easier to read.
  * Introduces != operator to the public Port class in the net library.

* Fix unnecessary log message that a link was dismissed when only a potentially
  matching forward rule turned out to be not matching.

* Apply Genode coding style to if statements with a single body statement.

Fix #4728
2023-01-24 12:07:31 +01:00
Martin Stein
845694bc44 nic_router: fix updating UDP/TCP links
This fixes a bug that was introduced by this earlier commit:

"nic_router: find forward rules w/o exceptions"

The NIC router used to falsely dissolve TCP/UDP connection states when
reconfiguring although the connection states were still legal according to the
new config. The reason was that the above mention commit nested lambdas but
missed to return from the last nesting level when having found a configuration
that legitimates the connection state.

Ref #4728
2023-01-24 12:07:31 +01:00
Benjamin Lamowski
641fadb3e9 base-hw: remove memory hole in bootstrap page table
Tests on qemu would fail when started with RAM sizes from 1025MiB to
2048MiB, because the the mapping hole in the page table from 1GiB to
2GiB would interfere with qemu's mapping addresses for ACPI.

Identity-map the complete first 4GiB of memory to catch all early
memory accesses during bootstrap.

Fixes #4724.
2023-01-24 12:07:31 +01:00
Norman Feske
79d8d1d557 sculpt_manager: Deploy::use_as_deploy_template
This patch simplifies the 'Deploy::update_managed_deploy_config'
interface by keeping an internal copy of the currently used deploy
template inside the 'Deploy' class. The template is updated whenever
the config/deploy file is modified.

This change weakens the coupling between the '_manual_deploy_rom' and
the '_deploy' subsystem, easing the upcoming implementation of the
switching between presets.
2023-01-24 12:07:31 +01:00
Norman Feske
bf231f7fca sculpt_manager: use update_list_model_from_xml
This patch replaces the use of 'List_model::Update_policy' types by
simpler 'update_list_model_from_xml' function calls.

Issue #4317
2023-01-24 12:07:31 +01:00
Norman Feske
39ca06114b sculpt_manager: keep launchers in 'Dictionary'
This patch replaces the direct use of an 'Avl_tree' by the modern
'Dictionary' utility.
2023-01-24 12:07:31 +01:00
Norman Feske
be7022dadc util/dictionary.h: alphabetically sorted for_each
This patch reverses the AVL-tree criterion to let 'for_each' traverse
the elements in alphabetical sorting order.

Issue #4610
2023-01-24 12:07:31 +01:00
Norman Feske
0e311845bf base-hw: don't show ROM modules at boot time
On complex scenarios like Sculpt on the phone, this change noticeably
reduces the boot time.

Issue #4705
2023-01-24 12:07:31 +01:00
Martin Stein
68afbbc0f0 base-hw scheduler test: print method
Adds befriended test-local wrappers for the classes Cpu_share and Cpu_scheduler
and adds a print method to the scheduler wrapper that prints the internal state
of the scheduler to the given output. Cpu_shares are referenced in the output
via a the IDs that the test uses to organize them. I.e., this corresponds to
how the CPU shares are named when calling the atomic steps the test is made of.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
f60a004cff base-hw scheduler test: rename test.cc main.cc
Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
20fea7fdd2 base-hw scheduler test: adapt to new behavior
This adapts the test to the changes that were applied to the scheduling scheme
by the following commits:

* base-hw scheduler: optimize quota depletion events
* base-hw scheduler: fix bug on removing head
* base-hw scheduler: fix ready method
* base-hw: optimize & cleanup scheduler

Part of that is that the test used to check whether the act of setting a share
ready outdates the head or not. However, with the current version of the
scheduler, this check is not possible anymore. We can merely check whether the
head is outdated after setting the share ready. So, among other adaptions, this
commit adapts the expectations of the test to the new semantics of the check.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
615dd377dd base-hw scheduler test: clean up
* Get rid of preprocessor macros.
* Introduce Main as class.
* Exit with -1 instead of endless loops on errors.
* Don't try to deal with error conditions, just print a message and exit
  with -1.
* Only one operation per line.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
0467b4aaf3 base-hw scheduler: optimize quota depletion events
This is an optimization for the case that a prioritized scheduling context
needs slightly more time during a round than granted via quota. If this is the
case, we move the scheduling context to the front of the unprioritized schedule
once its quota gets depleted and thereby at least ensure that it does not have
to wait for all unprioritized scheduling contexts as well before being
scheduled again.

Note that this introduces the possibility of undeserved starvation of
unprioritized scheduling contexts to the scheduling scheme. If there are
enough prioritized contexts that deplete their quota during a round,
they may cover up also the rest of the round with their unprioritized time
slices. If this happens every round, contexts without a priority/quota may
never get a turn. In the previous scheduling scheme, this could not occur as
the unprioritized schedule was completely independent from prioritized
schedules and rounds.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
f74962bdad base-hw scheduler: fix bug on removing head
The scheduler did not consider the consumed quota during a call to "update"
if the head that consumed the quota was removed from the scheduler. When this
occured, the internal round time did not advance as expected but remained at
its previous value untile the next call to "update" (without a removed head)
This commit introduces a new flag that is set only when the head gets removed
in order to detect and handle the situation correctly on the next call to
"update".

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
ab298b6337 base-hw scheduler: fix ready method
Setting the _need_to_schedule member in the 'ready' method of the scheduler
was not done correctly. At least, the _need_to_schedule was set true in
situations were the head was not outdated by the 'ready' operation.

Ref #4151
2023-01-24 12:07:31 +01:00
Stefan Kalkowski
1151706243 hw: rename functions of Ipc_node class signature
* Remove *request* in context of: wait, reply, send to shorten it.
* Use ready_to_* instead of can_*, which is regularily used in Genode's APIs
* Replace helping_sink with helping_destination, as destination is more common

Ref genodelabs/genode#4704
2023-01-24 12:07:30 +01:00
Stefan Kalkowski
fd3c70ec5b hw: mark threads as dead in case of ipc violations
The IPC protcol violations are:

* Sending to an unknown thread (cap)
* Waiting for messages if a reply hasn't happened yet

This silents threads that otherwise repeatedly cause kernel messages
about the violation.

Ref genodelabs/genode#4704
2023-01-24 12:07:30 +01:00
Stefan Kalkowski
fc690f1c47 hw: re-work the ipc node's internal state machine
* Split the internal state into incoming and outgoing message relations
* Avoid fragmenting of one state like formerly '_state' and '_help'
* Remove pointer to caller, use incoming FIFO instead

This commit fixes at least two bugs that were triggered by tests that
destroy threads in many different states, like run/bomb:

* The '_help' data member was not reset reliable in each situation where a
  helping relationship came to an end. However, when we fixed this bug alone
  in the old state model, the issues remained. The new state model fixes
  this bug as well.

* A thread sometimes referenced an already dead thread as receiver. This caused
  the kernel IPC code to access the vtable of an object that didn't exist any
  longer. Note that the two threads were not in direct IPC relationship while
  the receiver was destroyed, so, there must have been an intermediate node
  between them. Due to the complexity of this problem, we eventually gave up
  pin-pointing the exact reason in the kernel IPC code. The issue disappeared
  with the new state model.

Fix genodelabs/genode#4704
2023-01-24 12:07:30 +01:00
Josef Söntgen
5a558a64e1 gpt_write: use GPE LBA from header
When writing the GPT header, the tool always wrote the GPT entries
belonging to the primary header to LBA following the header. Normally
this is LBA 2 as the header is located in LBA 1. The GPT allows for
up to 128 entries that all in all cover 16 KiB of storage space.
However, on some systems, e.g. ARM-based machines, the bootloader can
be stored in this region. For this reason the GPT entries may be moved
to a different LBA.

This commit changes the tool to adhere to then given GPE LBA in header
when writing out the modified GPT data.

Fixes #4720.
2023-01-24 12:07:30 +01:00
Norman Feske
ddeaccf728 vfs: documentation of Vfs::Env::User
Issue #4706
2023-01-24 12:07:30 +01:00
Christian Prochaska
09c1a9cfc0 qt5: don't pass non-printable unicode values on key repeat
Fixes #4716
2023-01-24 12:07:30 +01:00
Norman Feske
25e4bcefbf vfs: remove 'Io_response_handler' interface
The old 'Io_response_handler::io_progress_response' interface has been
replaced by the 'Vfs::Env::User::wakeup_vfs_user' (issue #4697). The
remaining 'read_ready_response' method is now hosted in the
appropriately named 'Read_ready_response_handler'.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
74e6370187 cbe/vfs/trust_anchor_vfs.h: avoid 'Constructible' 2023-01-24 12:07:30 +01:00
Norman Feske
53b67810ba vfs/cbe_trust_anchor: Remove Io_response_handler
This patch keeps driving the internal state machines until no progress
can be made. This required fixing the return values of several execute
functions, which used to report progress while being in complete state.

Along the way, the patch removes default switch cases to ensure that all
states are covered.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
909c3571e3 vfs/cbe: Remove use of Io_response_handler
The patch also touches app/cbe_init because it depends on the
public cbe/vfs/trust_anchor_vfs.h header.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
6c79e95052 vfs_replay: Remove Io_response_handler
Note that this change has not been tested as we have no ready-to-use
run script stressing this component.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
f56883e238 cbe_init_trust_anchor: Remove Io_response_handler
Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
f4da21252b cbe_tester: Remove use of Io_response_handler
Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
bb904b9166 vfs: propagate I/O activity via 'wakeup_vfs_user'
This commit supplements the various I/O signal handlers of the VFS
plugins with calls of the new 'Vfs::Env::User::wakeup_vfs_user'
interface, which will subsequently replace the old 'Io_progress_handler'
(issue #4697).

Issue #4706
2023-01-24 12:07:30 +01:00
Stefan Kalkowski
767632e1af dde_linux: remove leftovers of legacy fec_nic_drv
Some relicts in `repos/dde_linux/lib`.

Ref #4651
2023-01-24 12:07:30 +01:00
Norman Feske
782fad0b41 vfs/lwip: remove 'blocked_handles' queue
The 'blocked_handles' queue was used to notify the VFS user via the
'io_progress_response' mechanism. This is now covered by the
'wakeup_vfs_user' interface introduced in issue #4697.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
9a2c03d2c6 vfs: remove Read_result::READ_ERR_INTERRUPT
The error condition was too vague and thereby remained unused in
practice.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
ba78cf72ae vfs: remove Read_result::READ_ERR_AGAIN
The condition is covered by READ_ERR_WOULD_BLOCK.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
1aba073e32 vfs: remove File_io_service::General_error
Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
a1fb51e050 vfs: remove File_io_service::register_read_ready
Issue #4706
2023-01-24 12:07:30 +01:00
Christian Helmuth
e483fc2525 nova: remove frame size compiler warnings 2023-01-24 12:07:30 +01:00
Christian Helmuth
89b0eca383 wm: ensure eight views fit into slab block
Issue #3834
2023-01-24 12:07:29 +01:00
Christian Helmuth
bccc57bb29 Adapt run scripts for Intel Xe GPU 2023-01-24 12:07:29 +01:00
Christian Prochaska
0c465fbb4d trace session: fix double quota accounting
Fixes #4707.
2023-01-24 12:07:29 +01:00
Christian Helmuth
b4f6f796d6 Clear board/pc/devices
Information about PS/2 and PIT where moved to app/pci_decode in the
following commit.

  pci_decode: report devices from ACPI info

We still provide an empty <devices> node as the file itself is used by
platform agnostic run scripts.
2023-01-24 12:07:29 +01:00
Norman Feske
0fefee804c vfs: remove File_io_service::ioctl interface
This interface has been obsoleted by the use of pseudo files,
implemented in the context of issue #3519.

Issue #4706
2023-01-24 12:07:29 +01:00
Stefan Kalkowski
08c56e61e1 hw: avoid overhead for cache maintainance
When running on x86, and riscv never enter the kernel for cache maintainance,
but use the dummy implementation of the generic base library instead.

On ARMv8 it is not necessary to enter privileged mode for cache cleaning, and
unification of instruction/data cache, but only for invalidating cache lines
at all levels, which is necessary for the use cases, where this function it
needed (coherency of DMA memory).

Fix genodelabs/genode#4339
2023-01-24 12:07:29 +01:00
Josef Söntgen
66fd027b96 base-hw: introduce 'cache_line_size' call
This call is used to query the cache line size of the underlying CPU.
For now it is only implemented and used by 'arm_v8' platforms.

It does not distinguish between D-/I-cache sizes and always uses the
smallest size. Furthermore it does not account for any discrepancy
in 'big.little' CPUs.

Issue #4339.
2023-01-24 12:07:29 +01:00
Josef Söntgen
e8f748cfed base-hw: unprivileged cache maintenance on ARMv8
Set 'Sctlr_el1::Uci' bit to allow for executing cache clean and
invalidate instruction from user space.

Issue #4339.
2023-01-24 12:07:29 +01:00
Stefan Kalkowski
8fe7fa5532 hw: don't take the log backend's mutex in kernel
To prevent the kernel to deadlock, or call itself with a syscall when
using a lock potentially hold by a core thread, the log console's
backend for core (hw) gets replaced by a specific variant that checks
whether it runs in the kernel context before using the mutex.

Fix genodelabs/genode#3280
2023-01-24 12:07:29 +01:00
Christian Helmuth
b59ec55d50 lx_emul: provide irqsave/restore write-lock functions 2023-01-24 12:07:29 +01:00
Christian Helmuth
6d14f5442e lx_emul: provide more pci functions
- pci_dev_present() based on devices on bus
- pci_request_regions() as dummy
- pci_release_regions() as dummy
2023-01-24 12:07:29 +01:00
Norman Feske
0fa683f244 vfs/cbe_trust_anchor: add sanity check
This patch adds a null-pointer check to the '_close_handle' method,
which triggers when using the vfs_cbe.run script in interactive mode.
2023-01-24 12:07:29 +01:00
Norman Feske
ca0d3757cc vfs: make 'File_io_service::read_ready' const
... and replace pointer argument to const reference.

Issue #4706
2023-01-24 12:07:29 +01:00
Martin Stein
1b1a9ca95c nic_router: fix bad connection states on IP change
When a domain receives a new dynamic router IP address and that domain has
active connection states (TCP/UDP/ICMP) from another domain with NAT applied,
the connection states used to stay active while becoming obsolete. They
become obsolete because their identification and their packet processor
use the old routers IP address due to NAT.

One consequence was that connections became dysfunctional when the server
domain received a new dynamic router IP address. Request packets were still
routed from client to server, but when entering the server, their source IP
address was the outdated router address. Consequently, the server responses
used the outdated address as destination and the router dropped the responses
because it did not know this address anymore.

This commit fixes the problem by letting a domain destroy all its connection
states that were initiated from within other domains whenever it detaches from
its current IP configuration.

Strictly speaking, it is not necessary to destroy all connection states, only
those that the domain applies NAT to. However, the Genode AVL tree is not built
for removing a selection of nodes and trying to do it anyways is complicated.
So, for now, we simply destroy all connection states.

Note that the other way around was handled correctly already. When a domain
detaches from its IP config, all interfaces of that domain destroy all the
connection states they created (towards other domains).

Fixes #4696
2023-01-24 12:07:29 +01:00
Martin Stein
7a7cac57d9 nic_router: futile ip config updates on dhcp renew
If the IP config does not change on updates to the router IP config of a domain
change (a common case on DHCP RENEW), prevent detaching from the old config and
attaching to the new one. Because this would not only create unnecessary CPU
overhead but also force all clients at all interfaces that are listening to
this config (via config attribute 'dns_config_from') to restart their
networking (re-do DHCP).

Ref #4696
2023-01-24 12:07:29 +01:00
Christian Prochaska
68ba648897 libdrm/lima: fix double file descriptor close
Fixes #4703
2023-01-24 12:07:29 +01:00
Christian Prochaska
16ce6b7acc mesa/lima: don't call 'close()' for non-libc fd
Fixes #4702
2023-01-24 12:07:29 +01:00
Sebastian Sumpf
2c92fc4b6f vbox6: add null pointer check for clipboard
Check 'pv == nullptr' in 'ShClSvcImplWriteData' and return
VERR_INVALID_POINTER if invalid (as is done, for example, in the X11
implementation).

issue #4666
2023-01-24 12:07:29 +01:00
Christian Helmuth
41d0c89a52 libc: remove misleading SNDCTL_DSP_RESET error message
Fixes #4676
2023-01-24 12:07:29 +01:00
Norman Feske
e5272b65a1 vfs: remove unused Fs_file_system::_read method 2023-01-24 12:07:29 +01:00
Josef Söntgen
8384d7b5ed run/acpica: fix devices report route
Issue #4679.
2023-01-24 12:07:29 +01:00
Josef Söntgen
794b019a8a sculpt/launcher: add top launcher 2023-01-24 12:07:29 +01:00
Josef Söntgen
aed3b6c6be Add test-audio_out pkg recipe 2023-01-24 12:07:29 +01:00
Josef Söntgen
14d0b72f52 black_hole: add report session support 2023-01-24 12:07:28 +01:00
Josef Söntgen
03165c96cc Add cpu_burner pkg recipe 2023-01-24 12:07:28 +01:00
Josef Söntgen
a96c7ebd8d cpu_burner: only use timer when not 100 perecent 2023-01-24 12:07:28 +01:00
Josef Söntgen
916d45b450 os: add top pkg recipe 2023-01-24 12:07:28 +01:00
Christian Helmuth
a16eeeec5d nova: set initial TSC after all CPUs are ready
Issue #4669
2023-01-24 12:07:28 +01:00
Norman Feske
2a1240d1e9 base: provide generic cpu/string.h
This patch uses the formerly x86-specific cpu/string.h for all
architectures if no spec/<arch> variant exists.

Issue #4456
2023-01-24 12:07:28 +01:00
Norman Feske
0ebb572f48 pkg/test-libc_connect_lwip: increase server RAM 2023-01-24 12:07:28 +01:00
Norman Feske
ff2176a586 vfs,libc: support write fds in select
By adding a 'write_ready' interface following the lines of the existing
'read_ready', VFS plugins become able to propagate the (de-)saturation
of I/O buffers to the VFS user. This information is important when using
a non-blocking file descriptor for writing into a TCP socket. Once the
application observes EAGAIN, it expects a subsequent 'select' call to
return as soon as new I/O buffer space becomes available.

Before this patch, the select call would always return under this
condition, causing an unnecessarily busy write loop.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
5ad98f2b7c vfs,libc: introduce Vfs::Env::User interface
The new interface is meant to replace the 'Vfs::Io_response_handler'.
In contrast to the 'Io_response_handler', which had to be called
on a 'Vfs_handle', the new interface does not require any specific
'Vfs_handle'. It is merely meant to prompt the VFS user (like the libc)
to re-attempt stalled I/O operations but it does not provide any
immediate hint, about which of the handles have become ready for
reading/writing.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
cf87b0fadb vfs: simplify File_io_service::write return values
This patch removes the 'Insufficient_buffer' exception by returning the
WRITE_ERR_WOULD_BLOCK result value instead. It also eliminates the
superfluous WRITE_ERR_AGAIN and WRITE_ERR_INTERRUPT codes.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
d9f5dda322 lwip: increase TCP send buffer 32->80 packets
Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
0584ac195c curl: increase maximum write-buffer size
The original size of 16K impedes the batched processing of network
packets. Changing the value to 256K reduces the number of context
switches when downloading large files and thereby improves the
throughput by more than 25% (base-hw on qemu_x86_64, using fetchurl
to download a file of 100 MiB via the NIC router from lighttpd).

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
8a9974b6f9 vfs/lwip: deferred wakeup of NIC server
This patch fosters the batching of network packets transferred by the
lwIP stack over the NIC connection. It replaces the eager submission of
the packet-stream's data-flow signals by explicit wakeup notifications.

The commit also increases the NIC session's buffer size from 128 to 1024
packets.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
60175631df vfs/lwip: remove obsolete mutexes
Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
5fdacae88b vfs: remove obsolete mutexes
...and tighten constness in adjacent code parts.

The VFS-internal synchronization via mutexes is no longer needed because
the access to the VFS is serialized by the VFS client, i.e., the libc.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
fcf5fcd58c libports: remove stand-alone variant of lwIP
Since the lwip library is used only by the vfs_lwip plugin, this patch
moves the Genode-specific support code local to the VFS plugin, easing
further simplification and allowing for a tighter integration with the
VFS plugin.

The recipes for api/lwip and src/vfs_lwip stay separate as both parts
use different licenses.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
e9541605ab ports: lighttpd_fetchurl.run script
This networking scenario is useful for analysing and optimizing the
interplay of the VFS, libc, TCP/IP, and the NIC router. It downloads a
file via fetchurl from lighttpd, both of which are hosted on a virtual
network.

Issue #4697
2023-01-24 12:07:28 +01:00
Norman Feske
7d8d4f4532 vfs,libc: deferred wakeup of remote peers
This patch facilitates the batching of I/O operations in the VFS library
by replacing the implicit wakeup of remote peer (via the traditional
packet-stream interface like 'submit_packet') by explicit wakeup
signalling.

The wakeup signalling is triggered not before the VFS user settles down.
E.g., for libc-based applications, this is the case if the libc goes
idle, waiting for external I/O.
In the case of a busy writer to a non-blocking file descriptor or socket
(e.g., lighttpd), the remote peers are woken up once a write operation
yields an out-count of 0.

The deferring of wakeup signals is accommodated by the new 'Remote_io'
mechanism (vfs/remote_io.h) that is designated to be used by all VFS
plugins that interact with asynchronous Genode services for I/O.

Issue #4697
2023-01-24 12:07:27 +01:00
Norman Feske
9421a449ab test/libc_many_writes for examining write batching
This test reveals the patters of the batching of consecutive write
operations on a file-system session. It issues 100 writes of one byte
each, which should ideally result in large batches of operations
submitted to the file-system session at once.

The run script performs the write operations through a chain of two VFS
servers, thereby exercising the write batching of both the libc and the
intermediate VFS server.

Issue #4697
2023-01-24 12:07:27 +01:00
Norman Feske
6edede0db9 server/vfs: facilitate batching of requests
By replacing the calls of 'acknowledge_packet' and 'get_packet' with
'try_ack_packet' and 'try_get_packet', we avoid the implicit triggering
of data-flow signals. Instead, the VFS server now relies on explicit
calls of the packet stream's 'wakeup' interface.

Issue #4697
2023-01-24 12:07:27 +01:00
Norman Feske
a15c894385 file_system_session: increase TX_QUEUE_SIZE to 32
The change of the queue size from 16 to 32 has negligible costs (4 KiB
instead of 2 KiB for the packet-stream queues) while facilitating the
batching of many small consecutive write operations.

Issue #4697
2023-01-24 12:07:27 +01:00
Norman Feske
9c57157e44 Audit VFS-plugin improvements
- Log read and write operations
- Fix leaf_path implementation
- Support queue sync

Issue #4697
2023-01-24 12:07:27 +01:00
Norman Feske
9a662249eb vfs_cbe_init.run: adapt to use of libcrypto 2023-01-24 12:07:27 +01:00
Christian Helmuth
772f89e77f linux.port: xhci patch to fix "unknown event type 37"
Issue #4678
2023-01-24 12:07:27 +01:00
Christian Helmuth
8661936d7d base: aquire context mutex in local_submit()
Some signal-heavy scenarios (e.g., libc_integration) produced the
following warning that hinted a data race on signal data in the context
object.

  Warning: returning signal with num == 0

The cause was the use of Signal_context::local_submit() in the libc
introduced in

  424ed1b79a libc: remove Reconstructible / use local_submit in kernel

in combination with a missing context-mutex aquisition resulting in a
data race on Signal_context::_curr_signal.

Issue #3923
2023-01-24 12:07:27 +01:00
Alexander Boettcher
377f2166a1 nova: support detection of Intel P & E CPUs
Fixes #4694
2023-01-24 12:07:27 +01:00
Christian Helmuth
83ac80460e depot: update recipe hashes 2022-12-05 16:37:21 +01:00
Martin Stein
f10c470969 sculpt_manager: fix router label lookup
The commit "sculpt_manager: relax nic_drv policy label" introduced the use of
the "label_prefix" attribute instead of "label" for the uplink policy in the
NIC router. However, it missed an appropriate adaption of the lookup of that
attribute when the Sculpt manager has to decide which uplink is used in a
manually managed router config. This caused the uplink to disappear whenever a
user created a manually managed router config. This commit fixes the problem.

Issue #4660
Fixes #4695
2022-12-02 09:54:33 +01:00
Norman Feske
f3fc11713a sculpt: re-enable inspect view by default
The inspect view got accidentally disabled by commit "sculpt: make graph
features configurable".
2022-12-01 13:51:58 +01:00
Christian Helmuth
4c5db31110 base: ld-<platform>.abi.so depends on symbol.map
This prevents errors like the following during parallel builds.

      MERGE    ld-hw.abi.so
  /usr/local/genode/tool/21.05/bin/genode-arm-ld:symbol.map:0: syntax error in VERSION script
2022-12-01 11:47:32 +01:00
Christian Helmuth
aa2f61fa0e depot: update recipe hashes 2022-11-30 14:02:24 +01:00
Christian Helmuth
b033b30f95 depot: update recipe hashes 2022-11-29 12:32:49 +01:00