Commit Graph

8090 Commits

Author SHA1 Message Date
Norman Feske
25ae54223a os/part_block: simplify split block-I/O handling
Issue #4474
2022-04-13 14:08:46 +02:00
Norman Feske
b3678f44b7 libports/fatfs: handle split block I/O jobs
Issue #4474
2022-04-13 14:08:40 +02:00
Norman Feske
68af13bb34 os/vmm: handle split block I/O jobs
Issue #4474
2022-04-13 14:08:34 +02:00
Norman Feske
7d6c592417 vfs/rump: handle split block I/O jobs
This patch fixes a potential data corruption issue that could occur when
issuing large I/O requests to vfs/rump, which don't fit into the default
block I/O buffer of 128 KiB. Note that we haven't observed the problem
in practice (Sculpt hosts vfs/rump in a dedicated vfs server, which
fragments requests) but spotted the issue while reviewing the code. We
could trigger problem by explicitly changing the I/O buffer size to 32
KiB.

Issue #4474
2022-04-13 14:08:25 +02:00
Norman Feske
d815322efe os: simplify split block operations
This patch changes the meaning of the 'offset' parameter of the
'produce_write_content' and 'consume_read_result' hook functions.
The value used to reflect the absolute byte position but in practice,
a job-relative byte offset is desired.

Issue #4474
2022-04-13 14:08:15 +02:00
Christian Helmuth
8ece236635 depot: update recipe hashes 2022-04-13 11:54:46 +02:00
Christian Helmuth
a45aabe68c usb_block: handle block requests in Signal_handler only
Before this commit, the block-request handler was implemented as
Io_signal_handler and, additionally, the USB driver called the
block-request handler on request completion directly on I/O level. This
is generally a bad idea because I/O handlers should avoid to have direct
global side effects. In contrast, application logic should be
implemented in way that it consumes atomic state changes after I/O
completed. Now USB I/O completion locally submits a signal to the
block-request Signal_handler.
2022-04-13 09:29:06 +02:00
Alexander Boettcher
2ec6a8249a pc: intel display driver: avoid sysfs related hang
Issue #4450
2022-04-13 09:29:06 +02:00
Sebastian Sumpf
2a47379ab5 vbox6: display cause of error on failed 'initFromSettings'
Use 'ErrorInfoKeeper' to retrieve current error from XPCOM service and
log message.

fixes #4473
2022-04-13 09:29:06 +02:00
Christian Prochaska
f91ece78e0 dde_rump: move periodic sync into rump kernel thread
Issue #4459
2022-04-13 09:29:06 +02:00
Christian Prochaska
d8211b65a5 dde_rump: fix clock functions
Issue #4459
2022-04-13 09:29:06 +02:00
Christian Prochaska
95aba3feef dde_rump: dispatch I/O signals in Timed_semaphore
Issue #4459
2022-04-13 09:29:05 +02:00
Christian Prochaska
af80ecb651 dde_rump: check blocking condition right before blocking
Issue #4459
2022-04-13 09:29:05 +02:00
Christian Helmuth
2da57613bf depot_deploy: support usb service provider
Now, Usb sessions can be effectively routed to the black-hole component
in Sculpt.

Issue #4419
2022-04-13 09:29:05 +02:00
Norman Feske
4dbe1588a6 sculpt: relax heartbeat rate
This patch reduces the response time of supposedly stuck situations like
an unresponsive part_block component. First, it reduces the heartbeat
rate from 1 to 2 seconds to make it consistent with the frequency of
state reports. Second, it allows up to four skipped heartbeats until
regarding the situation as stuck. With those changes, the prolonged
initialization sequence of a USB ZIP drive succeeds with Sculpt.
2022-04-13 09:29:05 +02:00
Christian Helmuth
02693734d3 black_hole: increase RAM quota in test-black_hole
Issue #4419
2022-04-13 09:29:05 +02:00
Martin Stein
b9141f98af test/black_hole: fix "packet alloc failed"
The Uplink_test used to end in an uncaucht exception about a failed packet
allocation on several x86_32 platforms.

* Destruct and re-construct the corresponding TX packet allocator during a
  link-down-up step in the Uplink test. Fixes the exceptions but results in a
  never ending test.
* Decouple the link-down-up steps from the handling of packet stream signals
  by simply triggering it with a local periodic timeout of 1 sec period.
  This prevents that the Uplink_test never finishes because it destructs the
  Uplink connection too often.
* The test finishes not before at least 3 link-down-up steps were executed.
* Replace the Allocator_avl's used for the TX packet allocators of the Nic
  and Uplink Connection with the better suited Nic::Packet_allocator.

Ref #4419
2022-04-13 09:29:05 +02:00
Martin Stein
6a61b60a5d black_hole: serve real USB sessions
* The server now answers session requests with a session instead of an
  exception#
* The test expects a session but doesn't access it so far

Ref #4419
2022-04-13 09:29:05 +02:00
Alexander Boettcher
40a5eabf88 pc: shadow schedule_timeout in intel_fb_drv
Issue #4450
2022-04-13 09:29:05 +02:00
Christian Helmuth
db90656483 vbox6: sync capslock state on boot / LED change
Thanks to Peter for the initial patch.
2022-04-13 09:29:05 +02:00
Alexander Boettcher
9965b2b72a pc: disable dsb unit in intel_fb_drv (gen12)
The error message
"Command buffer creation failed" in intel_dsb.c repeatedly appears
during connector hotplug. Since the driver works also without this DMA offload
optimization, disable the functionality.

Issue #4450
2022-04-13 09:29:05 +02:00
Martin Stein
ecd4006514 black_hole: initial support for Usb service
The service is merely announced but trying to request a session always causes a
Service_denied exception. This helps in scenarios where the client is
won't open a session anyway but expects the service to be available. This is
considered a temporary solution.

Ref #4419
2022-04-13 09:29:05 +02:00
Norman Feske
78d7a08618 wm: hide child views if top-level view vanishes
This patch handles the corner case of switching virtual desktops while
child views are visible. Examples of such child views are tool tips,
pull-down menus, or the graph of the top-view utility. The switch to
another virtual desktop would implicitely turn the child views into
top-level views of the root nitpicker GUI server until switching back
to the original virtual desktop.

The patch implements the expected behavior of hiding all child views
that belong to a disappearing top-level view.
2022-04-13 09:29:05 +02:00
Christian Helmuth
d21464399f vfs_rump: use dynamic_cast for safe downcasts
As it stands, the implementation requires minimal reflection measures to
implement correct cleanup procedure. static_cast<> cannot be used as it
does not implement runtime type casting as dynamic_cast<> does.
2022-04-13 09:29:05 +02:00
Christian Helmuth
8a4f4fcea9 vfs_rump: reflect resource shortage as return values
The function Vfs::Directory_service::watch() is not expected to throw
Out_of_ram/Out_of_caps but use dedicated Watch_result errors.
2022-04-13 09:29:05 +02:00
Christian Helmuth
eb895975e2 lib/vfs: clear BUILD_ARTIFACTS in dummy targets 2022-04-13 09:29:05 +02:00
Norman Feske
79279b93fb vfs server: fix dangling alloc on watch failure
This patch reverts the vfs-watch-handle creation whenever the subsequent
allocation of the VFS server's 'Watch' object fails. This can happen
when the session RAM or cap quota is depleted.

Fixes #4472
2022-04-13 09:29:05 +02:00
Christian Helmuth
df1767b784 vbox6: tidy up devxhci poweroff
The issue came apparent with Windows Guests and USB passthrough of
smart-card readers. If the VM is powered off, PDMR3Term cleans up all
devices incl. (first) acpi and (later) devxhci. The latter used a
dangling reference to ACPI structs in a indirect call to
apicIsLogicalDest() from xhciR3Destruct().

  VMMR3_INT_DECL(int) PDMR3Term(PVM pVM)
      virtualbox6/src/VBox/VMM/VMMR3/PDM.cpp:817

      "apic" (pDevIns->pReg->szName)

          static void apicR3TermState(PVM pVM)
              virtualbox6/src/VBox/VMM/VMMR3/APIC.cpp:1235

      "qemu-xhci" (pDevIns->pReg->szName)

          static DECLCALLBACK(int) xhciR3Destruct(PPDMDEVINS pDevIns)
              repos/ports/src/virtualbox6/devxhci.cc:431

          void usb_detach(USBPort *port)
              <qemu-usb>/src/lib/qemu/hw/usb/core.c:70

          static void xhci_port_notify(XHCIPort *port, uint32_t bits)
              <qemu-usb>/src/lib/qemu/hw/usb/hcd-xhci.c:2592

          static DECLCALLBACK(void) pciSetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel, uint32_t uTagSrc)
              virtualbox6/src/VBox/Devices/Bus/DevPCI.cpp:398

          static bool apicIsLogicalDest(PVMCPUCC pVCpu, uint32_t fDest)
              virtualbox6/src/VBox/VMM/VMMAll/APICAll.cpp:797

The fix removes our Qemu library reset from xhciR3Destruct() and
registers xhciR3Reset() as PowerOff hook.

Thanks to Raphael for the thorough investigation.
2022-04-13 09:29:05 +02:00
Christian Helmuth
e345b56719 vbox6: remove redundant ahci/serial patches
The issue alleviated by the patches was fixed by

  5fed1641a4 virtualbox6: reduce 'Vm_connection' priority

Issue #4361
2022-04-13 09:29:05 +02:00
Norman Feske
ddc83df4b6 sculpt: support leitzentale GUI on 2560x1440
The quota adjustments prevent the leitzentrale's decorator from running
out of RAM, and allow the nitpicker GUI server to preserve buffer
content during resize (reducing flickering artifacts) when using a
screen resolution up to 2560x1440.
2022-04-13 09:29:04 +02:00
Alexander Boettcher
daa6195732 pc: report all modes by intel display driver
Issue #4450
2022-04-13 09:29:04 +02:00
Norman Feske
0c5d8f1156 depot: exclude plugins from vfs src archive
This fixes the following warning when building the binary archive:

  Library-description file vfs_capture.mk is missing
  Library-description file vfs_tap.mk is missing
2022-04-13 09:29:04 +02:00
Sebastian Sumpf
7a06a6ac59 legacy_platform_drv: update quotas on 'attach_dma_mem'
'Platform::Device_pd::attach_dma_mem' may lead to insufficient resources
for meta data, which is reflected to the client via 'Out_of_caps' or
'Out_of_ram'. In case the client upgrades its session the quotas need to
be passed to core as done by
'Platform::Device_pd::Expanding_region_map_client::attach'.

issue #4451
2022-04-13 09:29:04 +02:00
Sebastian Sumpf
abc0bf3220 gpu/intel: account resources using 'avail_' not'used_'
Use 'avail_caps' and 'avail_ram' for resource guards because 'used_caps'
and 'used_ram' do not account for resources given to the platform
driver. This lead to incorrect resource accounting by the GPU
multiplexer.

issue #4451
2022-04-13 09:29:04 +02:00
Christian Helmuth
fd9648f919 vfs/block: correct transfer size allocation
The calculations of packet_size and packet_count in the block_io() did
not consider rounding errors. This resulted in diverging values over
several bisecting operations (/= 2) and wrongly-size packet allocations
as well as memcpy operations.

Related to #2263 (comments about partial block accesses and
_block_io()).

Fixes #4471
2022-04-13 09:29:04 +02:00
Christian Helmuth
dedcd0e294 vbox6: silence debug log in runtime 2022-04-13 09:29:04 +02:00
Josef Söntgen
2e47eb6fb9 dde_linux: use new wifi driver in uplinks test
Issue #4455.
2022-04-13 09:29:04 +02:00
Martin Stein
ef8c98cb71 nic_router: merge packet stream signal handlers
The NIC router used to handle each type of packet-stream signal with a distinct
method in the Interface class. However, merging those methods has advantages.

It ensures that sent packets that were already acknowledged by the counter side
are always released before handling received packets. This frees packet stream
memory which facilitates the potential allocation of response packets while
handling received packets. Furthermore, it simplifies the code and reduces the
number of entry points into the router.

This commit also removes the installation of signal handlers at packet streams
for events that are of no interest for the router (TX-ready-to-ack /
RX-ready-to-submit at NIC sessions and RX-ready-to-ack / TX-ready-to-submit at
Uplink sessions).

Fixes #4470
2022-04-13 09:29:04 +02:00
Christian Helmuth
7e2cfc30f0 sculpt: version 22.04 2022-04-13 09:29:04 +02:00
Christian Helmuth
520a08b205 Remove pkg runtime for pc_wifi_drv/legacy_pc_wifi_drv
Both runtimes were broken due to missing requirement for "Uplink"
service and thus unused.

Issue #4455
2022-04-13 09:29:04 +02:00
Josef Söntgen
b6471a83aa ports: use new wifi driver in netperf
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
dd09e900c0 sculpt: use pc_wifi_drv
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
e7e7893f22 pc: update wifi driver
The driver falls in line with the previous 'legacy_wifi_drv' component
where the ported wireless LAN stack and device driver is encapsulated
in a library. This library in return is used by the 'Libc::Component'
providing the necessary environment for the 'wpa_supplicant'.

In constrast to the old driver a 'wifi' VFS plugin is in charge of
initalizing the 'Lx_kit::Env' prior to executing any static
constructors.

Fixes #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
8056811b4f Rename wifi_drv to legacy_wifi_drv
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
0bd1a53326 dde_linux: add linux-firmware port
Move 'linux-firmware' portion from 'dde_linux' into its own port,
while it is used by the upcoming new WLAN driver keep it in place
for the legacy one.

Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
838bae964b pc: update framebuffer/intel for new Linux config
This is needed because now 'kobject_uevent.c' pulls netlink related
code in.

Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
c9d9ec0d63 pc_linux: add wlan stuff to config
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
0a6baff26d pc: extended pc_linux api archive for wifi driver
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
56427da393 wifi: add interface query functions
Various libraries, like libnl and wpa_driver_nl80211, used hardcoded
values for the interface index (ifindex) and name (ifname).
To accomdate the legacy as well as the upcoming new driver we add
functions to query these information where at least the index differs.

Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
c1fea8c002 wpa_supplicant: remove hard lx_printf dependency
Not needed and breaks 'pc_wlan_drv'.

Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
447f3fcb35 libnl: use MSG_DONTWAIT
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
f5eddce1d1 wifi/socket_call: add MSG_DONTWAIT
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
24c0bb95ef pc_lx_emul: allow for being used in a library
The location of the used 'source.list' file is hard-coded and will not
work when the ported driver is implemented as a shared library. For
this use-case provide means to set the location differently.

Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
7cd8285251 pc_lx_emul: use page alloc shadow implementation
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
b2e11f1e9e pc_lx_emul: add __put_user
Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
edb08770dc lx_emul: initialize task members needed by network
Those members are access via static inline functions in the network
core code and from certain protocols, e.g. AF_NETLINK.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
77cdceabaa lx_emul: add additional atomic64 functions
Needed by the WLAN driver on x86_32.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
0c617366e5 lx_emul: get pid from task
Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
4b43b5c1c1 lx_kit: handle %hu specifier in console
Prevent '<warning unsupported format specifier>' when encountering
'%hu'.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
ffea0bf857 lx_kit: remove execution of static ctors
In case where the ported driver or protocol stack is executed from
an already managed environment, e.g. the libc, the execution
of the static constructors will be performed at the appropriate
time.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
aa7303f19f nic_router: drop ARP requests when unconfigured
Whenever the nic_router encounters ARP requests on an interface
that does not have a valid IP config it will ignore them. However,
When increasing the verbosity of the component for diagnostic
purposes the resulting 'Bad network protocol' message is misleading.

Issue #4455.
2022-04-13 09:29:03 +02:00
Christian Prochaska
80f85a854c qt5: fixes and improvements for WebRTC support
Fixes #4453
2022-04-13 09:29:03 +02:00
Christian Prochaska
6c2ac345fd Add 'webcam_vfs' run test
Issue #4458
2022-04-13 09:29:03 +02:00
Christian Prochaska
6a874498f7 vfs: implement plugin for 'Capture' session
Fixes #4458
2022-04-13 09:29:03 +02:00
Martin Stein
9de4ecf8b6 run/nic_router_dhcp: DHCP RENEW and some fixes
* Test DHCP RENEW by the test client in the unmanaged variant.
* Add event IDs to log output of test client in order to prevent false positive
  result in the managed variant.
* Let managed and unmanaged variant have separate string patterns for
  'run_genode_until' because they already had different output and it will
  differ even more as we don't want to test DHCP RENEW with the managed
  variant.
* Delay first test client DHCP in order to fix unexpected sporadic initial IP
  config.
* Remove some unnecessary code from the run script

Fixes #4460
2022-04-13 09:29:03 +02:00
Martin Stein
7fc20e9ae8 NIC router: update IP config on DHCP RENEW/REBIND
The NIC router did update the IP config of a domain on a completed DHCP
REQUEST but not on completed DHCP RENEW or DHCP REBIND. Thus, it didn't adapt
to "real" DHCP servers (not NIC router servers) that got restarted with a
changed configuration by the means of RENEW/REBIND. The commit fixes this.
Note, that testing this is complicated as we don't have the necessary
infrastructure (we cannot simply use the DHCP server of the NIC router as this
would apply a link down/up sequence in order to let the client restart DHCP)

Ref #4460
2022-04-13 09:29:03 +02:00
Sebastian Sumpf
f085fc9dd2 libdrm/iris: free objects in Drm_call destructor
Make sure to remove all buffers, sync objects, and contexts during
destruction.

Fixes #4466
2022-04-13 09:29:03 +02:00
Sebastian Sumpf
d4390adb68 mesa: use 'strdup' for driver names
The 'iris' and 'etnaviv' strings are freed using 'free' by mesa.

issue #4466
2022-04-13 09:29:03 +02:00
Sebastian Sumpf
da1ef67064 base: Allocator_avl cleanup meta data
After reverting unused ranges during allocator destruction
'_meta_data.free_empty_blocks' may lead to more unused ranges because
meta data blocks maybe freed where the meta data for the blocks is
managed by other meta data blocks. This leads to dangling allocation
warnings which are caused by meta data. Therefore, we call
'_revert_unused_ranges' and 'free_empty_blocks' until no more ranges
can be freed.

issue #4466
2022-04-13 09:29:03 +02:00
Christian Helmuth
904c8e3636 vbox6: disable asseertions in depot pkg
Issue #4464
2022-04-13 09:29:03 +02:00
Alexander Boettcher
6994354b8f platform(x86): avoid multiple assignment messages
The new ported linux drivers multiple times trigger this assignment,
whereby exactly one time is sufficient.

Issue #4416
Issue #4450
Issue #4455
2022-04-13 09:29:03 +02:00
Josef Söntgen
1dc92c49ed genode_c_api/usb: report iface class and protocol
Enrich the device report with interface class and protocol information
for the current active setting of the device.

Fixes #4463.
2022-04-13 09:29:03 +02:00
Alexander Boettcher
664676a2b4 intel/gpu: support 64bit pci bars
by using the io_mem RPC of the platform session instead of parsing the
bar resources manually. This commits avoids and breakage on systems where
the Intel graphic cards just uses 64bits with addresses above 4G.

Issue #4450
2022-04-13 09:29:03 +02:00
Johannes Schlatow
e955444302 ports/coreutils: ignore inodes when copying
genodelabs/genode#4461
2022-04-13 09:29:03 +02:00
Johannes Schlatow
410099df70 base/memset: speedup implementation
Compared to the bytewise memset, a wordwise memset (or even multi-word)
achieves a speedup of ~6.

On Zynq-7000/Cortex-A9:
317 MiB/s -> 2040 MiB/s

On base-linux x86_64:
3580 MiB/s -> 23700 MiB/s

genodelabs/genode#4456
2022-04-13 09:29:03 +02:00
Johannes Schlatow
9409f814a4 memcpy (x86): implement memcpy_cpu
By changing the bytewise copy into a wordwise copy, we get a speedup of
~3 (on base-linux x86_64).

genodelabs/genode#4456
2022-04-13 09:29:02 +02:00
Johannes Schlatow
0104a74028 memcpy (arm): cache align and use pld for speedup
Preloading a few cache lines ahead brings a significant speedup in
memcpy throughput. Note, the particular (optimal) value was empirically
determined on a Cortex-A9 (Zynq-7000) SoC @ 666Mhz. It is best combined
with L2 prefetching enabled (including double linefills and prefetch
offset 7). Yet, even without L2 prefetching this seems to be the sweet
spot.

genodelabs/genode#4456
2022-04-13 08:08:01 +02:00
Johannes Schlatow
4dcc095e5e memcpy (arm): remove unused vfp implementation
The implementation is not in use any more. Furthermore, on typical ARM
cores such as the Cortex-A9, the cached read appears to be the
bottleneck rather than instruction density. On a Zynq-7000 SoC, the vfp
implementation performed significantly worse than the standard load/store
multiple implementation with preloading.

genodelabs/genode#4456
2022-04-13 08:08:01 +02:00
Johannes Schlatow
052c33fc8c test/cache: refine test pattern
- run multiple access patterns (touch words, touch lines, memcpy)
- add make file for linux

genodelabs/genode#4454
2022-04-13 08:08:01 +02:00
Johannes Schlatow
5a0e22eb98 test/memcpy: tweak test timing
add some log calls to give run script a bit more time to catch the next
output

genodelabs/genode#4454
2022-04-13 08:08:01 +02:00
Johannes Schlatow
92bcc50c0a test/memcpy: test with a more consistent alignment
On some platforms, the page index affects the measurements.

genodelabs/genode#4454
2022-04-13 08:08:01 +02:00
Johannes Schlatow
07736d1689 test/memcpy: fix optimistic results on Linux
When executed on Linux, the test was impaired by the copy-on-write
optimisation since the source buffer was never initialised. By default,
Linux only maps a zeroed page until the first write access to the page
occurs. Since the source buffer was never written, the corresponding
page was always present in the physically-indexed data cache. In
consequence, the test merely measured write performance (similar to memset).

genodelabs/genode#4454
2022-04-13 08:08:01 +02:00
Johannes Schlatow
62f37c5b1b test/memcpy: disable Thumb when compiled on linux
genodelabs/genode#4454
2022-04-13 08:08:01 +02:00
Johannes Schlatow
85daf1b3b2 cpu_bench: disable Thumb when compiled on linux
genodelabs/genode#4454
2022-04-13 08:08:01 +02:00
Johannes Schlatow
d372afd81e base-hw: add bitfield to pl310
Enabling double linefills improves memcpy throughput.

genodelabs/genode#4456
2022-04-13 08:08:01 +02:00
Christian Helmuth
d1f9434fd5 qemu-usb: send usb ctrl transfers with timeout
Send usb ctrl transfers with one second timeout as some devices (e.g.,
smartcard readers) do not response to certain control transfers.

Thanks to Peter for the investigation.
2022-04-13 08:08:00 +02:00
Alexander Boettcher
00479aea29 lx_emul(x86): shadow cpu_relax to advance jiffies
The i2c code has a busy loop (see commit for the location), which expects that
the jiffies advances without a cooperative scheduling decision.

Issue #4450
2022-04-13 08:08:00 +02:00
Christian Helmuth
18c5f1e90d tool/run: improve disk image size automatic
Set disk size to 1.5 times the run folder size and shrinked later to
real content.

Thanks to Roland for the patch.
2022-04-13 08:08:00 +02:00
Christian Helmuth
108fe84f5a Remove SIGNAL/CAP/RAM services from run scripts
Related to #2407
2022-04-13 08:08:00 +02:00
Christian Helmuth
77b572f36a platform: distinct USB4 from other USB PCI devices
Our usb_host driver supports UHCI, OHCI, EHCI, and XHCI host
controllers. The USB4 host interface / Thunderbolt is currently not
supported and must therefore not be passed to the USB host driver.
2022-04-13 08:08:00 +02:00
Christian Helmuth
1b4cd93dc2 lx_kit/x86: clamp PCI interrupt PIN to 1
If any PCI device reports 0 as interrupt PIN, drivers may try to force
MSI setup (e.g., xhci). So, we clamp the interrupt PIN to 1 to let
drivers finish initialization and don't bother the platform driver.
2022-04-13 08:08:00 +02:00
Josef Söntgen
afe02efb8f pc_usb_host: implement 'dma_pool_destroy'
Encountered on the Fuji5 where for reasons currently unknown the
first xHCI HC (0:0d.0) could not be initialize due to incomplete
interupt informations. The other HCs appear to work fine (tested
with a USB low-speed mouse).
2022-04-13 08:08:00 +02:00
Josef Söntgen
c6cc43f0e4 lx_kit/x86: use virtual information for PCI
This commit removes all physical notions from the information given
to the Linux kernel regarding PCI BARs.

With the exception for the host bridge that needs to be located at
'0:00.0' as required by the Intel FB driver, all other devices are
announced at the PCI BUS in an ascending order.

Additionally the MMIO regions start at 1 GiB and are capped at 32 bit
to prevent unnecessary access to 64 bit addresses.
2022-04-13 08:08:00 +02:00
Christian Helmuth
1c79c95868 acpi_drv: skip tables outside predefined region
With this fix, the driver no longer aborts on the Tigerlake notebook and
just skips the out-of-region ACPI table. Issue #4452 is not fixed by
this commit, but in this specific case the table is not used anyway.
2022-04-13 08:08:00 +02:00
Sebastian Sumpf
49b8232ebd libdrm: simplify resource accounting
Upgrade to the well known worst cases by the GPU multiplexer. Do not
keep track of resources locally, in case resources are exceeded the
remain so anyway.

issue #4451
2022-04-13 08:08:00 +02:00
Sebastian Sumpf
105e82ad84 gpu/intel: check resources before any operation
Check if there are a least 4 caps + 2MB (heap) + possible buffer size
available before any resource allocation. Only account resources that are
actually used.

issue #4451
2022-04-13 08:08:00 +02:00
Christian Helmuth
c1c94d37d7 microcode_intel: update to version 20220207 2022-04-13 08:08:00 +02:00
Alexander Boettcher
c0560ab0cb pc: update intel display driver
Fixes #4450
2022-04-13 08:08:00 +02:00
Alexander Boettcher
7813fca946 gpu/intel: report all devices via next_device
The former implementation relied on the behaviour of how the old
intel fb driver requested the pci devices. The new lxkit however actually
really want to have all available pci devices.

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
2548830140 pc_linux: add ACPI config
required by the upcoming update of the intel display driver. Make this addition
explicit, because it triggers adjustment also on the new pc_usb_host_drv.

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
6d924d3285 lx_kit(x86): restrict usb heuristics to usb
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
cda0fafbd1 lx_emul: remove sw_width/height from common_dummies
required by the new upcoming intel display driver. Make the step explicit,
because it needs adjustment on the new usb driver as well.

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
b6c1b7806b lx_kit: io_mem_map with write combined support (x86)
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
6f64917e8f lx_emul: add ioremap_cache/_wc to shadow/asm/io.h
used by intel_fb for write combined allocation

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
8dbcda9943 lx_emul: x86_32 shadow header adaptations
required for upcoming intel display driver in 32bit

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
7c3f010cd6 lx_emul: shadow asm/uaccess_32/64.h
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
cdf1b39c5e lx_emul: shadow asm/special_insns.h
wbinvd is not supported in user mode

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
88a6a9d628 lx_emul: add missing fpu/api.h to shadow pgtable.h
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
279f038b9e lx_emul: shadow asm/cpufeature and asm/page_64
Issue #4450
2022-04-13 08:07:58 +02:00
Josef Söntgen
fd8df3a623 lx_emul: handle page refcount 2022-04-13 08:07:58 +02:00
Alexander Boettcher
4474460377 lx_emul: __alloc_pages support in shadow/mm/page_alloc.c 2022-04-13 08:07:58 +02:00
Alexander Boettcher
a222df31ba platform_drv(x86): avoid exception in alloc_dma
If size is zero, the platform goes out of service by:

[init -> platform_drv] Error: Uncaught exception of type 'Genode::Ram_allocator::Denied'
[init -> platform_drv] Warning: abort called - thread: e

Issue #4450
2022-04-13 08:07:58 +02:00
Alexander Boettcher
dd10e5d977 intel_fb: move to legacy_intel_fb
Move the depot recipe and consistently name the old drivers with a legacy_
prefix as done with the old usb_host driver.

Issue #4450
2022-04-13 08:07:58 +02:00
Christian Helmuth
1a2677ebe6 dde_ipxe: update Intel NIC support list from upstream
Also, the repository URL was adapted to the permanent redirect to github
to prevent the following warning.

  dde_ipxe  download http://git.ipxe.org/ipxe.git
  dde_ipxe  git Cloning into 'src/lib/dde_ipxe'...
  dde_ipxe  git warning: redirecting to https://github.com/ipxe/ipxe/
  dde_ipxe  update src/lib/dde_ipxe
2022-04-13 08:07:58 +02:00
Christian Helmuth
ad4fb2b088 nova: fix IOTLB flush for global mode
Issue alex-ab/nova#6
2022-04-13 08:07:58 +02:00
Christian Helmuth
c56ac3e909 nova: support extended addresses in FADT
Issue alex-ab/nova#5
2022-04-13 08:07:58 +02:00
Martin Stein
50fc2aa251 black_hole: provide Gpu service
Ref #4419
2022-04-13 08:07:58 +02:00
Martin Stein
046ebc3d34 black_hole: provide ROM service
Ref #4419
2022-04-13 08:07:58 +02:00
Norman Feske
bb26a986e6 sculpt: add trace_logger as optional launcher
This patch adds the trace-logger utility to the default set of packages
along with an optional launcher. With this change, only two steps are
needed to use Genode's tracing mechanism with Sculpt:

- Add 'trace_logger' to the 'launcher:' list of the .sculpt file

- Either manually select the 'trace_logger' from the '+' menu,
  or add the following entry to the deploy configuration:

    <start name="trace_logger"/>

By default, the trace logger is configured to trace all threads
executed in the runtime subsystem and to print a report every 10
seconds. This default policy can be refined in the launcher's <config>
node. Note that the trace logger does not respond to configuration
changes during runtime. Changes come into effect not before restarting
the component.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
3394f97f86 trace_logger: make output format more concise
This patch changes the output format of the trace logger to become
better suitable for human consumption. For example, when instrumenting
the VFS server in Sculpt using the GENODE_TRACE_TSC utility, the
trace logger now generates tabular output as follows.

  Report 4

  PD "init -> runtime -> arch_vbox6 -> vbox -> " ----------------
   Thread "vCPU"           at (0,0)  total:12909024 recent:989229
   Thread "vCPU"           at (1,0)  total:5643234  recent:786437

  PD "init -> runtime -> ahci-0.fs" -----------------------------
   Thread "ahci-0.fs"      at (0,0)  total:910497   recent:6335
   Thread "ep"             at (0,0)  total:0        recent:0
    71919692932: TSC process_packets: 8005M (4998 calls, last 4932K)
    71921558516: TSC process_packets: 8006M (4999 calls, last 1596K)
    71922760220: TSC process_packets: 8007M (5000 calls, last 1006K)
    71929853586: TSC process_packets: 8009M (5001 calls, last 1840K)
    71931315246: TSC process_packets: 8011M (5002 calls, last 1253K)
    72127999920: TSC process_packets: 8016M (5003 calls, last 5606K)
    72129568198: TSC process_packets: 8018M (5004 calls, last 1345K)
    77161908178: TSC process_packets: 8029M (5005 calls, last 11349K)
    77643225736: TSC process_packets: 8029M (5006 calls, last 217K)
    89422100594: TSC process_packets: 8035M (5007 calls, last 5656K)
    89422123632: TSC process_packets: 8035M (5008 calls, last 1342)
   Thread "signal handler" at (0,0)  total:36329    recent:3001
   Thread "signal_proxy"   at (0,0)  total:51838    recent:13099
   Thread "pdaemon"        at (0,0)  total:97184    recent:332
   Thread "vdrain"         at (0,0)  total:1266     recent:286
   Thread "vrele"          at (0,0)  total:1904     recent:516

  PD "init -> runtime -> nic_drv" -------------------------------
   Thread "nic_drv"        at (0,0)  total:34044    recent:897
   Thread "signal handler" at (0,0)  total:369      recent:142

  ...

Subjects that belong to the same PD are grouped together. The formerly
optional affinity and activity options have been removed. Those
information are now unconditionally displayed. The trace entries
belonging to a thread appear as slightly indented.

The patch also updates the coding style, avoiding excessively long
lines.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
f7270c44cb trace_logger: omit inactive subjects by default
This patch reduces repetitive log output by omitting inactive trace
subjects from the log output. The information about all subjects can
still be dumped by setting 'verbose="yes"'.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
ceb91732bf trace_logger: update state after adding subjects
This patch splits the creation and updating of monitor objects into two
stages. The creation of a monitor object changes the state of the
associated trace subject. The patch ensures that the new state is
captured by the update of the monitor object.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
be0a1742ac base: distinct TRACED from ATTACHED trace subjects
This patch makes the trace-subject state as reflected to the trace
monitor more accurate.

Until now, a subject could be in UNTRACED or TRACED state. In reality,
however, there exists an intermediate state after the trace monitor
called 'trace' for the subject but before the subject locally activated
the tracing (done when passing a trace point). This intermediate state
was reflected as UNTRACED. Consequently, threads that never pass a trace
point (e.g., just waiting for I/O) would remain to appear as UNTRACED
even after enabling its tracing by the trace monitor. This is confusing.

This patch replaces the former UNTRACED and TRACED states by three
distinct states:

  UNATTACHED  prior any call of 'trace'
  ATTACHED    after a trace monitor called 'trace'
              but before the tracing is active
  TRACE       tracing is active

Fixes #4447
2022-04-13 08:07:58 +02:00
Norman Feske
f3984ba5a9 base: declare build artifact for core
This is a generalization of the recent commit "base-hw: declare build
artifact for core".
2022-04-13 08:07:58 +02:00
Norman Feske
34a3209e9b base/log.h: add GENODE_TRACE_TSC
The new macros GENODE_TRACE_TSC and GENODE_TRACE_TSC_NAMED complement
the existing GENODE_LOG_TSC and GENODE_LOG_TSC_NAMED macros to simplify
TSC measurements at a low overhead of the trace mechanism.
2022-04-13 08:07:57 +02:00
Norman Feske
232a45bc14 os: add util/formatted_output.h utilities
The utilities of the new util/formatted_output.h header complement the
existing base/output.h with the text-formatting support needed to
produce tabular output.

Fixes #4449
2022-04-13 08:07:57 +02:00
Christian Helmuth
bde3be787e qemu-usb: fix device endpoint update
First, the endpoint update has to comply with the current alternate
settings of all interface, which are stored in USBDevice::altsetting[]
(one value per interface). Second, a SET_INTERFACE control request via
Packet_type::ALT_SETTING must update USBDevice::altsetting for the
interface.

Now, USB devices with multi-setting interface like the Joulescope JS110
with mixed bulk/isochronous endpoints are supported.
2022-04-13 08:07:57 +02:00
Christian Helmuth
c5f9e61d3a driver_manager: adapt config attributes for usb_host 2022-04-13 08:07:57 +02:00
Norman Feske
26acd6c65a sculpt: suppress non-critical warning 2022-04-13 08:07:57 +02:00
Norman Feske
33c71d1d2c usb_host: change error to warning message
An insufficient session quota as offered by a USB client is not an
erroneous situation of the USB driver.
2022-04-13 08:07:57 +02:00
Norman Feske
b4aa0a20dd os: refine default USB session quota
This commit adjusts the value such that USB sessions requested by
VirtualBox6 on Sculpt OS can get established on the first try without
invoking the session-retry mechanism. This reduces the number of
diagnostic log messages like:

 Error: Insufficient 'ram_quota',got 6296372 need 6297928
2022-04-13 08:07:57 +02:00
Norman Feske
fa5f8dbd55 sculpt: reduce NIC driver CPU quota
The value of 50% as assigned by commit "sculpt: add basic support for
i.MX8 Quad EVK" leaves too little room for other components of the
runtime subsystem. With the adjustements of commit "sculpt: assign CPU
quotas" the sum exeedcs 100%. Hence this commit tunes down the value to
sensible 10%.
2022-04-13 08:07:57 +02:00
Norman Feske
a9022d8451 sandbox: improve CPU-quota accounting
The existing assignment of CPU quotas did not anticipate the dynamic
reconfiguration of init. It merely tracked the available CPU quota by
deducing the consumed amount from a global variable but never
replenished the value. This worked for static scenarios but failed in
situations where components are dynamically re-started.

So far this deficiency remained detected because CPU quotas were not
used in highly dynamic systems like Sculpt OS. However, this has
recently changed by commit "sculpt: assign CPU quotas".

The patch improves the accounting by mirroring the existing handling of
RAM and cap quotas. Note that the CPU-quota accounting is still rather
limited. In particular the dynamic rebalancing is not yet supported.

Issue #4445
2022-04-13 08:07:57 +02:00
Christian Helmuth
d182b20705 build: ensure rules with pipes might fail
.SHELLFLAGS is extended by option pipefail to make pipes fail if any pipe
element fails. As .SHELLFLAGS is exported into sub-make instances it
must be unexported before calling third-party build systems recursively.
2022-03-21 13:43:13 +01:00
Christian Helmuth
7da691b52a pc/usb: defer startup until config is available
The commit also adds lx_kit/initial_config.h as utility.
2022-03-21 13:42:17 +01:00
Norman Feske
e3706837b9 VFS server: foster batching of acknowledgements
With the consolidation of the file-system session's signal handlers
implemented by commit "file_system_session: merge ack and submit sigh",
we can now change the VFS server to produce batches of acknowledgements
before explicitly waking up the client. (in contrast to the traditional
'acknowledge_packet', the new 'try_ack_packet' triggers no signal)

Issue #4388
2022-03-21 13:42:17 +01:00
Johannes Schlatow
f4d0f1624a test/trace: use for_each_new_entry
genodelabs/genode#4434
2022-03-21 13:42:17 +01:00
Johannes Schlatow
c763890f04 trace_buffer: partition trace buffer
Split the trace buffer into two partitions in order to prevent overwriting
of entries when the consumer is too slow. See file comment in buffer.h.

genodelabs/genode#4434
2022-03-21 13:42:16 +01:00
Johannes Schlatow
edc46d15f8 trace_buffer: revise trace buffer implementation
This commit simplifies the current implementation by overloading the
length field with a padding indicator in addition to the zero-length
head entry. This simplifies the iteration semantics as it eliminates
the need for determining whether a zero-length entries is the actual
head of the buffer or a padding at the buffer end.

genodelabs/genode#4434
2022-03-09 12:08:02 +01:00
Johannes Schlatow
d24552f5e2 trace/policy: fix event size in log_output
Returning 0 for max_event_size() can lead to writing out of buffer bounds.

Fixes genodelabs/genode#4435
2022-03-09 12:04:44 +01:00
Stefan Kalkowski
e95f0a409d lx_emul: add implementation for Genode's USB C-API
Fix #4444
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
9713014130 dde_linux: add virt_linux lx_emul flavor
To support device-less protocol-stacks only ports, we can use a
Virt I/O Linux kernel flavor, and export the lx_kit/lx_emul parts
not depending on platform API and devices.

Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
35cf8aada4 lx_emul(x86): fill zero page with zeroes
Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
13c4abf4ad lx_emul: add static_cpu_has macro to shadow header
Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
0fa695dbd7 lx_kit/lx_emul: make memory backend configureable
* Drivers have to use lx_kit/memory_dma.cc
* Protocol-stacks use lx_kit/memory_non_dma.cc
* Moreover the device-dependent lx_emul parts get removed
  from the common lx_emul import rules

Fix #4443
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
d473bed4b7 platform api: export dma buffer capability
Ref #4443
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
5c71a8d74d lx_emul: extract common lx_emul import makefile
Fix #4442
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
b80146a6f7 genode_c_api: unify shared dataspace callbacks
* Unifies the declaration of callbacks which manage driver/client
  shared dataspaces
* Move the Linux driver-specific callback implementation to the
  lx_emul library from the PC's USB host driver

Fix genodelabs/genode#4439
2022-03-09 10:55:16 +01:00
Norman Feske
b1e2e654a9 sculpt: support uplink and event service providers
This patch enhances Sculpt with the ability to route uplink and event
sessions to the optional black-hole component.

Issue #4419
2022-03-08 15:48:53 +01:00
Christian Helmuth
a941dfe7b2 gpt_write: adapt to changed packet stream blocking semantics
Issue #4390
2022-03-08 15:37:04 +01:00