Commit Graph

9841 Commits

Author SHA1 Message Date
Norman Feske
fa68325a57 base-hw: streamline extraction of depot archives
This patch simplifies the packaging of the base-hw kernel for a given
board, in particular when the board support is hosted as an external
repository such as genode-world. Regardless of where the board-support
is hosted, the content.mk file becomes as simple as:

  include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc

The board name is automatically inferred from the path of the src
recipe. The architecture is determined from board/<name>/arch files,
following the pattern of the image_link_address. The attempt to build a
base-hw-<board> binary archive for the wrong architecture is now
gracefully handled by skipping all targets (using the REQUIRES
mechanism).

Besides the improved convenience, the patch results in depot archives
that are much closer tailored to the actual board by omitting files for
architectures that are not used by the board. E.g., the src/base-hw-pc
archive does not contain any ARM-related content.

The patch also restores the package builds for core/bootstrap object
files as a follow-up fix of "base: remove SPEC variables of boards",
which happened to left 'BOARD' undefined in the src archives.

Fixes #4019
2021-02-23 12:02:45 +01:00
Josef Söntgen
1b77cb3832 qemu-usb: add ring-buffer for ISOCH OUT transfers
Be more in line with the original host implementation in Qemu and
buffer transfers. Having transfers in-flight helps to smoothen playback
in case other components utilize the CPU.

Issue #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
19d9409a34 qemu-usb: adapt ISOCH IN handling for audio
Linux as well as Windows guests want queue to a varying number of
transfers, where each transfer only covers one transaction (iso frame).
The best results were obtained by following that behaviour rather
than queuing multiple iso frames per requests (like is done with OUT
transfers).

The number of requests queued is increased to 32 while the number of
packets per reques is decreased to 1.

Issue #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
9918a8f88d qemu-usb: update port to 5.2.0
The contrib code is updated from 2.4.1 to version 5.2.0 and the used
device-model is changed to QEMU xHCI. Due to this change older guests
OSes, namely Windows 7, that relied on the NEC xHCI device-model will
not work anymore.

The 'Qemu::Controller' interface was extended by an 'info' method, which
returns the vendor and product ID. This allows for removing the
hard-coded values in the VirtualBox glue code.

Issue #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
a6f0b05834 usb_host: properly handle ISOC read requests
* Update the 'packet_size' information with the actual length for
  each isoc frame to be able to handle short reads at the client side.

* Copy the whole transfer buffer because the host controller stores
  the data at the original offsets, i.e., the buffer is not densely
  packed.

Fixes #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
b51ae104c2 qemu-usb: use bounce buffer to access DMA memory
The former implemention assumed that the guest physical memory is
mapped continously. This, however, is not true. Writing larger
files to an USB stick with a Windows 10 guest would therefore lead
to data corruption.

The current implementation uses a bounce buffer to copy the data
to and from the guest physical memory and leaves dealing with the
memory mappings entirely up to the VMM.

Fixes #4017.
2021-02-23 12:02:44 +01:00
Martin Stein
23620942bf usb_net: allow calling netif_stop_queue dummy
When the usb_net_drv was introduced in ports/run/netperf.inc, the
netperf_lxip_usb test on x86_64/hw/pc triggered the calling of the
netif_stop_queue dummy at
contrib/<DDE_LINUX>/src/drivers/usb_net/drivers/net/usb/usbnet.c:1464. As
netif_start_queue was also a dummy and allowed to be called, we tried allowing
calls to the netif_stop_queue dummy as well which fixed the
netperf_lxip_usb test on x86_64/hw/pc.

Ref #3961
2021-02-23 12:02:44 +01:00
Norman Feske
a99f6a81b6 libc: clone 'environ' pointer value after fork
The 'environ' pointer is a global variable that must be considered as
part of the application state. It must be copied from the parent to the
child process during fork. Otherwise, a child returning from fork is
unable to access environment variables before invoking execve. The
actual environment variables and their values are already captured
because they reside at the application heap, which is cloned from the
parent. So the copied 'environ' pointer refers to valid data.

Fixes #4015
2021-02-23 12:02:44 +01:00
Sebastian Sumpf
fd0e6685fc riscv: Use Qemu and update to ISA v1.10
- remove Spike/BBL support in favour of Qemu (>=4.2.1)
- add 'riscv_qemu' board, remove 'spike' board'
- update to privileged ISA v1.10 (from v1.9.1)
- use direct system calls for privileged core threads (they call into
  the kernel and don't use mode changing system calls, i.e. 'ecall',
  semantics)
- use 'OpenSBI' semtantics for SBI calls (to machine mode) instead of
  BBL

issue #4012
2021-02-23 12:02:44 +01:00
Alexander Boettcher
18e282ab8a allocator_avl: avoid false dangling warnings
By first removing unused ranges, implicitly meta data allocations are freed
up. This leads to more unused slab blocks and freed up meta data allocations
in the avl tree.

Issue #4014
2021-02-23 12:02:44 +01:00
Alexander Boettcher
1e84b46c3f slab: add option to free empty blocks
explictly by a method

Issue #4014
2021-02-23 12:02:44 +01:00
Martin Stein
19d0142e10 ports/recipes/src: usb_net_drv
Ref #3961
2021-02-23 12:02:44 +01:00
Martin Stein
983a18d06e ports: rename *_usb30.run *_usb.run
Ref #3961
2021-02-23 12:02:43 +01:00
Christian Prochaska
f654e6f02d usb_host_drv: dwc_otg stability improvements
- improve NYET error handling
- use split interrupt transaction hack
- clear TT buffers in error situations

Issue #3247
2021-02-23 12:02:43 +01:00
Sebastian Sumpf
cb2e27f8e4 riscv: Fix link errors for Genode nightly
- add .got filter rule for trace policies, otherwise ld raises a
  segmentation fault
- force soft-float for binary sources (SRC_BIN)

issue #4012
2021-02-23 12:02:43 +01:00
Alexander Boettcher
c58acd0b2b allocator_avl: avoid memory leakage
Fixes #4013
2021-02-23 12:02:43 +01:00
Alexander Boettcher
26506673c4 seoul-auto: limit to one CPU on Qemu
Issue #3965
2021-02-23 12:02:43 +01:00
Norman Feske
df38140ed6 base-pistachio: coding style 2021-02-23 12:02:43 +01:00
Norman Feske
9633a0a524 wm.run: increase RAM quota for wm_backdrop
Overcomes a startup issue of the wm_backdrop component on base-linux:

[init] child "wm_backdrop" requests resources: ram_quota=10855936
2021-02-23 12:02:43 +01:00
Norman Feske
7d568247e3 wm: fix deadlock in destroy-view handling
The deadlock reported in #3236 could be reproduced via the wm.run script
and the modification of test/nitpicker in commit "nitpicker: fix destroy
with invalid handle" by clicking on the testnit entry of the launchpad.

This patch fixes the deadlock by releasing the locked pointer early in
the destruction path, which is legitimate as the wm is single-threaded.

Fixes #3236
2021-02-23 12:02:43 +01:00
Norman Feske
b5fb37ddee nitpicker: invalidate dangling hovered ptr
This patch adds the missing invalidation of the _hovered pointer to
User_state::forget, which is required to cover the situation where the
owner of the hovered view vanishes.

Fixes #4011
2021-02-23 12:02:43 +01:00
Alexander Boettcher
d29b843a0f dde_ipxe: improve throughput for Realtek devices
By increasing the ring descriptor count the throughput increased from
few kB/s to the range of MB/s.

Issue #3939
2021-02-23 12:02:43 +01:00
Alexander Boettcher
8958c769ab dde_ipxe: poll once again on irq without rx packets
This quirk is required for Realtek devices.

Fixes #3939
2021-02-23 12:02:43 +01:00
Christian Helmuth
210f5073e3 platform_drv.inc: check board=pc not spec=x86
Fixes run scripts for Linux/x86.
2021-02-23 12:02:43 +01:00
Martin Stein
ef88d05f2b os: api/net archive
Ref #3961
2021-02-23 12:02:43 +01:00
Alexander Boettcher
d6a5a66623 vbox5: enable 64bit SVM support
Fixes #3965
2021-02-23 12:02:42 +01:00
Alexander Boettcher
d186e4361e Measure TSC variance of CPUs in test-smp
Issue #3965
2021-02-23 12:02:42 +01:00
Emery Hemingway
2acfacb639 genode_dyn.ld: do not emit PHDR segment
Recent versions of binutils check that PHDR segments are covered
by a LOAD segment. In this case the unloaded PHDR segment can be
ommited.

Fix #4003
2021-02-23 12:02:42 +01:00
Alexander Boettcher
696d8f030f libgmp: avoid undefined gmpn_*_2 symbols (x86_64)
__gmpn_addmul_2
__gmpn_mul_2

Fixes #4001
2021-02-23 12:02:42 +01:00
Alexander Boettcher
e3233a4824 ldso: turn deadlock message into Linker message
Issue #3991

[init -> ...] Error: LD: jump slot relocation failed for symbol: 'XYZ'
[init -> ...] Error: deadlock ahead, mutex=0x161860, return ip=0xeb870

turns into:

[init -> ...] Error: LD: jump slot relocation failed for symbol: 'XYZ'
[init -> ...] Error: Uncaught exception of type 'Linker::Not_found'
[init -> ...] Warning: abort called - thread: ep

Fixes #4002
2021-02-23 12:02:42 +01:00
Christian Prochaska
5c5d16f524 ports: add 'vbox5_genode_usb_hid_raw' run script
Fixes #4009
2021-02-23 12:02:42 +01:00
Christian Prochaska
c16611dff2 usb_hid_raw.run: add "Timer" service route
Fixes #4008
2021-02-23 12:02:42 +01:00
Christian Prochaska
33406940f3 usb_hid_drv: stability improvements
Fixes #4007
2021-02-23 12:02:42 +01:00
Christian Prochaska
e1698cf200 dde_linux: fix possible memory leak in wait queue implementation
Fixes #4006
2021-02-23 12:02:42 +01:00
Christian Prochaska
2670ae399b usb_host_drv: improve error handling
Fixes #4005
2021-02-23 12:02:42 +01:00
Christian Helmuth
91a7fb1da7 cxx: localize operator new(unsigned long) in supc++.o
Otherwise, base code in ld.lib.so may accidentally use 'new' without
passing an allocator.
2021-02-23 12:02:41 +01:00
Martin Stein
a9c4ebc9e9 drivers/nic/mode: exception on malformed values
Ref #3961
2021-02-23 12:02:41 +01:00
Norman Feske
e3783b00bb coding_style.txt: initializers, control flow 2021-02-23 12:02:41 +01:00
Norman Feske
493924a35e base-hw: coding style
Improve consistency with the other base repositories, in particular

- Indentation of class initializers
- Vertical whitespace around control-flow statements
- Preferably place control-flow statements (return, break, continue) at
  beginning of a line
- Placing the opening brace of a namespace at the end of line
- Placing the opening brace of a class at a new line
- Removing superfluous braces around single statements
- Two empty lines between methods/functions in implementation files
2021-02-23 12:02:41 +01:00
Norman Feske
cbae9bc1c8 Add ccache support to build system
This patch simplifies the use of ccache with the build system. Up until
now, each developer had to set up the ccache hooks manually, adjust the
PATH variable, and customize the etc/tools.conf in each build directory.
With the patch, ccache can be enabled by un-commenting a single line in
the etc/build.conf file.

Fixes #4004
2021-02-23 12:02:41 +01:00
Norman Feske
8cc2662aac Remove support for the Muen separation kernel
Fixes #3995
Fixes #3994
2021-02-23 11:55:44 +01:00
Christian Helmuth
af9ab9190b sd_card_bench.run: add missing braces
This is a follow-up fix for "base: remove SPEC variables of boards (fix #3971)".
2021-02-23 11:53:59 +01:00
Christian Helmuth
14db22c77c nic_router.run: disable test 2 UDP
Issue #3992 is still pending but has low priority, so disable the test
to reduce the noise and increase the chance to spot independent
regressions.
2021-02-23 11:53:42 +01:00
Martin Stein
691be92046 Don't use the NIC server mode of NIC drivers
Issue #3961
2021-02-23 11:53:41 +01:00
Christian Helmuth
9f3c5d92b3 base: cleanup Noncopyable declarations/coding style 2021-02-23 11:51:57 +01:00
Josef Söntgen
36b55e065a usb_host: check ep pointer before using it
The Usb session allows for submitting packets even when the interface
in question is not yet enabled. Enabling an interface will configure
the udev members properly and is normally done implicitly during
processing of an 'ALT_SETTING' packet.

In case the interface was not enabled this leads to a page-fault in
the USB host-controller driver as 'ep' is NULL.

Fixes #3999.
2021-02-23 11:51:57 +01:00
Alexander Boettcher
6789ce8b83 platform_drv(x86): support dynamic reconfiguration
Fixes #3989
2021-02-23 11:51:39 +01:00
Norman Feske
a981fb864c depot: update recipe hashes 2021-01-25 14:00:43 +01:00
Norman Feske
c4cf9b6e6d base-hw: introduce board-property directories
This patch moves the bootstrap-link-address information from the
tool/run/boot_dir/hw file to board-specific property files that can be
accessed by using the board as key. This eliminates the need to
customize boot_dir/hw when hosting board-support in an external
repository.

Fixes #3998
2021-01-25 14:00:43 +01:00
Norman Feske
4bc9b9a2ef tool/run: coding style 2021-01-25 14:00:43 +01:00