Commit Graph

7247 Commits

Author SHA1 Message Date
rolandbaer
52011ec034 smbios_decoder: fix timer error message
added timer to run file to fix error message.

Fixes #4237
2021-07-28 11:27:04 +02:00
Alexander Boettcher
908d581a8c qemu-usb/webcam: reset delay packet state
on feature reset initiated by guest

Issue #4078
2021-07-28 11:27:04 +02:00
Johannes Schlatow
b38ec9f238 usb_webcam: correctly enable auto exposure mode
genodelabs/genode#4231
2021-07-28 11:27:04 +02:00
Stefan Kalkowski
9334ec09e2 sculpt: route non-usb block sessions to 'drivers' 2021-07-28 11:27:04 +02:00
Johannes Schlatow
1bfc828826 libuvc: add UVC 1.50 support
genodelabs/genode#4231
2021-07-28 11:27:04 +02:00
Johannes Schlatow
b51b9e1ef3 libusb: fix size of control messages
Fixes genodelabs/genode#4230
2021-07-28 11:27:04 +02:00
Johannes Schlatow
2afb7c5567 nic_router: fix Tcp_packet header fields
data_offset and NS flag were incorrectly read due to missing endianess
conversion. Also fix name of CWR flag.

Fixes genodelabs/genode#4227

genodelabs/genode#4227
2021-07-28 11:27:04 +02:00
Stefan Kalkowski
ee045a68cc os: introduce C-API to Genode services
This commit introduces a C-API to the Uplink session, as well as to
serve as a Block service. It can be used by drivers ported from
C-only projects, like the Linux kernel, or BSD kernels for instance.

Fix #4226
2021-07-28 11:27:04 +02:00
Stefan Kalkowski
1a526e73a3 dde_linux: introduce new lx_emul/lx_kit library
The re-newed approach currently supports ARM 64-bit only.
It depends on the Platform API of the ARM architecture.
It tries to meet the original semantic of the Linux kernel
functions as far as possible. To achieve this, device drivers
using this library should reference the original Linux kernel
headers at foremost. Only the headers in `src/include/lx_emul/shadow`
have to shadow clone the original ones.

Fix #4225
2021-07-28 11:27:04 +02:00
Johannes Schlatow
1aba330ae6 dde_linux: fix packet size calc. of Nic drivers
skb_push() already increases the skb->len by ETH_HLEN, hence adding
ETH_HLEN to the packet_size is redundant.

A too large packet size becomes a problem for large MTUs. With a maximum
MTU of 1500, adding ETH_HLEN twice will lead to a packet size of 1528.
Since this is larger than what we expect for good-old Ethernet (max. 1522),
some clients (e.g. the e1000 model in vbox5) may drop these packets.

Fixes genodelabs/genode#4228
2021-07-28 11:27:04 +02:00
Christian Helmuth
119d72ad94 fetchurl: User-Agent header and HTTP response code
I discovered thinkbroadband.com requires the User-Agent header field and
rejects requests missing it with HTTP response code 403 "access to the
requested resource is forbidden". Now, fetchurl always adds the
User-Agent header fetchurl/LIBCURL_VERSION.

Also the error message now contains the HTTP response code.
2021-07-28 11:25:21 +02:00
Stefan Kalkowski
b16bb82f8b dde_linux: mark lx_emul and lx_kit as legacy
* Move headers in src/include into legacy sub-directory
* Move src/lx_kit to src/lib/legacy/

Fix #4223
2021-07-28 11:25:21 +02:00
Stefan Kalkowski
f939b9ffb5 base-hw: print addr as hex value in cache warning
Ref #4207
2021-07-28 11:25:21 +02:00
Norman Feske
6de19e4a9b tool_chain_auto.run: exercise 'ln -s'
as a regression test for issue #4219.
2021-07-28 11:25:21 +02:00
Norman Feske
5138aeba80 libc: fix nested monitor call in 'symlink'
The symlink implementation wrongly constructed a 'Sync' object within
the context of a monitor call. The 'Sync' constructor indirectly
depended on libc I/O for obtaining the current time, ultimately
resulting in a nested attempt of a monitor call. This could be
reproduced via the base.run script:

  $ cd /home
  $ ln -s a b

The 'ln' command resulted in the following log message:

  [init -> /bin/bash -> 7] Error: deadlock ahead, mutex=0x10ff8c70, return ip=0x500583a7

The patch fixes the problem by splitting the single monitor call into
two monitor calls and moving the construction of the 'Sync' object
in-between both monitor calls, thereby executing the constructor at the
libc application level.

Fixes #4219
2021-07-28 11:25:21 +02:00
Sebastian Sumpf
4d4cc4fd02 libm: use libm from libc and remove openlibm
- enable libm for x86/arm
- update ieee754 to slightly changed output
- remove openlibm from port

fixes #4213
2021-07-28 11:25:21 +02:00
Sebastian Sumpf
4b10aa94ec base-hw: save/restore fpcr register for ARM_V8
The floating-point (fpcr) control register is user land accessible and
controls, for example, rounding mode.

fixes #3723 and related to #4213
2021-07-28 11:25:20 +02:00
Martin Stein
688379d1ed sel4: fix segmentation fault with CCACHE=yes
Building the elfloader in kernel-sel4.inc has a problem with Genodes CCACHE
make variable. When issuing ...

! ./tool/depot/create mstein/bin/*/base-sel4-* CCACHE=yes

..., building the elfloader used to consume all memory of the host system and
then run into a segmentation fault:

! make[6]: *** [elfloader/elfloader.o] Segmentation fault (core dumped)

This is because the other build system invokes the CCACHE variable as a command
in front of the compiler command. If CCACHE is set to 'yes', the 'yes' command
is called and produces an endless output into some output file. The problem
can be fixed by locally re-setting the CCACHE variable for the
'make ... elfloader' command to 'ccache' (Genode CCACHE==yes) or '' (Genode
CCACHE!=yes).

Fixes #4212
2021-07-28 11:25:20 +02:00
Martin Stein
388e2a0e6d fec nic driver: fix compiler warnings
Fixes #4178
2021-07-28 11:24:55 +02:00
Christian Prochaska
a856bfb4ab qt5: implement 'SyncSocket' with pipes on Genode
Fixes #4208
2021-07-28 11:24:55 +02:00
Christian Prochaska
3824c0ca5f qt5: ignore 'fcntl(F_SETLK)' error in sqlite3 implementation
Fixes #4194
2021-07-28 11:24:55 +02:00
Martin Stein
2d017ad7b7 nic_router: guard against exception in free_ip
Adds try-catch-statement with diagnostic errors in Dhcp_server::free_ip in
order to guard against exceptions from the underlying bit allocator. These
exceptions should never happen given that the router is programmed correctly
and always feeds Dhcp_server::free_ip with sane arguments (which it should).
However, should this not be the case, we can assume that the failed IP freeing
indicates that the IP isn't allocated anyway and it's fine to continue using
the router. Furthermore, IP allocations are a mere client service and not
relevant for the integrity or safety of the router.

Ref #4200
2021-06-25 11:57:28 +02:00
Martin Stein
be644098d7 nic_router: fix exc. in Interface::handle_config_3
When Interface::handle_config_3 (third step of applying a new configuration to
interfaces) tried to detach the interface from the current IP config because
the old and new IP config differed, it did so using the new domain. The former
steps of the reconfiguration already installed the new domain reference at the
interface. Therefore, also the DHCP server of the new domain was used. This,
however caused uncaught exceptions because detaching from an IP config
includes dissolving all DHCP allocations. This dissolving of DHCP allocations
now operated on a DHCP server (the one of the new domain) that wasn't related
to the allocations and, in the worst case, caused an uncaught exception
because the IPs were out of its range.

That said, this commit ensures that detaching an interface from an IP config
is always done on the domain from which the IP config originated. Normally,
this is the domain the interface is attached to. But in the case of
Interface::handle_config_3, it is another - the former domain the interface
was attached to.

The commit also adapts the nic_router_dhcp_* tests in a way that they
reconfigure the router in a way that would trigger the uncaught exception
without the fix.

Fixes #4200
2021-06-25 11:57:24 +02:00
Sebastian Sumpf
fd9bc43be1 ldso: Fix RISC-V support with 21.05 tool chain
- force inlining of more functions
- force -O2 for RISC-V (even if -O0 is set globally)
- intialize cxx guard after self relocation

issue #4094
2021-06-25 11:56:22 +02:00
Christian Helmuth
ece33d37f8 depot: update recipe hashes 2021-06-25 11:46:37 +02:00
Stefan Kalkowski
e7067050be base: extend cache maintainance functionality
Introduce two new cache maintainance functions:
* cache_clean_invalidate_data
* cache_invalidate_data
used to flush or invalidate data-cache lines.

Both functions are typically empty, accept for the ARM architecture.
The commit provides implementations for the base-hw kernel, and Fiasco.OC.

Fixes #4207
2021-06-25 11:43:41 +02:00
Johannes Schlatow
b83c8f35c6 depot: ffi for x86_32
genodelabs/genode#4201
2021-06-25 11:43:41 +02:00
Sebastian Sumpf
a242bfce48 libports: ffi for x86_32
- Required by glib

issue #4201
2021-06-25 11:43:41 +02:00
Sebastian Sumpf
19a7997734 qemu-usb: consume device report during controller construction
Initially parse the USB devices report after the signal handler is
registered, do not rely on a signal to be triggered (issue #1788).

Fixes #4206
2021-06-25 11:43:41 +02:00
Sebastian Sumpf
a58473dece autopilot: add usb_hid_reconnect run script
- Adjust script to run on Qemu x86 only

fixes #4205
2021-06-25 11:43:41 +02:00
Christian Helmuth
cd25dc4e6a dde_bsd: prevent ‘nonnull’ argument warning
The implementation conflicted with the implicit declaration of bzero:

.../repos/dde_bsd/src/lib/audio/mem.cc: In function ‘void bzero(void*, size_t)’:
.../repos/dde_bsd/src/lib/audio/mem.cc:377:2: warning: ‘nonnull’ argument ‘b’ compared to NULL [-Wnonnull-compare]
2021-06-25 11:41:46 +02:00
Christian Helmuth
c585e008b1 acpica: prevent recursive 'memset()' calls with gcc 10
Thanks to Peter for the patch.

Issue #4125
2021-06-25 11:41:45 +02:00
Norman Feske
5b85bd9602 mk: make LD_SCRIPT_DYN customizable
This way, a target.mk becomes able to override the default linker
script, e.g., for adding custom symbols.
2021-06-25 11:41:45 +02:00
Martin Stein
0dc7084b0f wifi_drv: fix compile warnings with gcc 10
Fixes #4202
2021-06-25 11:41:45 +02:00
Martin Stein
16c4aacf34 vfs/dir_fs: allow opening empty dirs
Adapts Dir_file_system::open_composite_dirs in a way that it returns "success"
when the leaf node of the path is an empty directory but "lookup failed", as
usual, if one of the other directories on the way to the leaf node is empty.

I couldn't find a technical reason why we used to return "lookup failed" when
only the leaf node was empty.

The commit also adds a test for en empty root directory and empty
sub-directories to the fs_query run script.

Fixes #4198
2021-06-25 11:41:45 +02:00
Martin Stein
6bfdddd0b5 fs_query: gracefully deal with missing directories
The fs_query component used to exit with an uncaught exception if a queried
directory didn't exist. Now, fs_query will catch this event and simply skip the
affected query, thereby indicating to the user the inexistence of the
queried directory.

Ref #4032
2021-06-25 11:41:45 +02:00
Johannes Schlatow
026b117a63 separate sandbox api from os
genodelabs/genode#4191
2021-06-25 11:41:45 +02:00
Johannes Schlatow
7346defc26 usb_modem_drv: remove nic_server mode
genodelabs/genode#4201
2021-06-25 11:41:45 +02:00
Johannes Schlatow
dff1df0b49 usb_modem: do not fail on netif_stop_queue
genodelabs/genode#4201
2021-06-25 11:41:45 +02:00
Johannes Schlatow
2c87c68a5d depot: add ffi api and src archives
Fixes genodelabs/genode#4201
2021-06-25 11:41:45 +02:00
Johannes Schlatow
52a4293bbc depot: add usb_modem_drv archives
genodelabs/genode#4201
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
ff57bf617b usb_webcam: webcam run script
Run script for quickly testing webcams in Qemu or on target.

issue #4196
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
818f1682ee qemu-usb: flush EP improve isochronous handling
- Patch the XHCI model in order to handle frame wrapping correctly. For
  this adjust 'mfindex_kick' to the correct period (same, before, or after
  'mfindex').

- Flush EP when it is stopped, this causes all pending packets for the EP
  to be acked. Correct counting of packets in flight.

- Add BEI patch by Josef.

issue #4196
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
eabda8907f usb_host: add support to flush EP transfers
This causes all pending transfers of a EP to be canceled and in turn to
be acked by the raw session.

issue #4196
2021-06-25 11:41:44 +02:00
Alexander Boettcher
4aa99fd1a9 qemu-usb: reduce cpu load by webcam model
if no new frame is available for capturing

Fixes #4078 #4196
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
ff452619e3 vbox5-nova-capture: Set camera to 640x480@30fps
Default to 30fps

issue #4196
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
19a5fee70b depot_deploy: add <capture> session announcement
Announce Capture session if node is present in runtime.

issue #4196
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
c66a196f76 usb_webcam: package recipes
- API packages for: libusb, libuvc, and libyuv
- Source packages for: API packages + USB webcam app
- Meta package for USB webcam
- Raw package for USB webcam configuration

issue #4196
2021-06-25 11:41:44 +02:00
Sebastian Sumpf
9165c7601d libyuv: make shared object
- Adjust port to Genode expected layout
- Make shared library
- Adjust dependent infrastructure to change

issue #4196
2021-06-25 11:41:44 +02:00
Martin Stein
ff128df131 dde_linux/fec: fix unsynchronized TX DMA write
Unfortunately, our current implementation of 'wmb()' doesn't seem to do what we
want it to do. On base-hw + imx6q_sabrelite, the write of bdp->cbd_sc seems to
get re-ordered after the write to txq->bd.reg_desc_active in the transmission
path of the contrib code. Due to this, the transmission of the packet is only
triggered the next time a packet is sent. However, we only quick-fix it by
enforcing the execution of the write with a volatile global read as we will
soon update the FEC NIC port with a new DDE approach anyway.

Fixes #4010
2021-06-25 11:41:44 +02:00