Commit Graph

7368 Commits

Author SHA1 Message Date
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
Christian Prochaska
747d01e854 qt5: adapt QtWebEngine contrib code for use of nss
Fixes #4192
2021-06-25 11:41:44 +02:00
Christian Helmuth
331844c979 vbox6: support capslock="rom" mode
In ROM mode the global CapsLock state is controlled by the capslock ROM
by virtual KEY_CAPSLOCK events.

Guests are easily confused by spurious KEY_CAPSLOCK input events in
caps="rom" mode. These spurious events may reach the VMM if KEY_CAPSLOCK
is not pressed as first key in a combination and, therefore, is not
filtered as global key. We filter KEY_CAPSLOCK in ROM mode in the VMM
explicitly, but let it pass in non-ROM mode.

Per default RAW mode is used and CapsLock key events are sent unfiltered
to the guest.
2021-06-25 11:41:44 +02:00
Christian Helmuth
434d007dc1 stdcxx: some missing symbols for basic_string
Revealed with -O0 when linking test/lx_fs_notify/file_writer.

Issue #4070
2021-06-25 11:41:44 +02:00
Pirmin Duss
7db6f457d4 lx_fs: enable watch
Enable watching files via the inotify interface of the Linux Kernel.

Delivery of watches to components is staggered in order to prevent an
overflow of the ACK queue in cases when a lot of changes are made to the
file system from the Linux side.

Fixes #4070
2021-06-25 11:41:44 +02:00
Christian Helmuth
37f1873f2e vbox5: drop KEY_CAPSLOCK events on capslock="rom"
Guests are easily confused by spurious KEY_CAPSLOCK input events in
caps="rom" mode. These spurious events may reach the VMM if KEY_CAPSLOCK
is not pressed as first key in a combination and, therefore, is not
filtered as global key. Now, we filter KEY_CAPSLOCK in ROM mode in the
VMM explicitly, but let it pass in non-ROM mode.

Fixes #4087
2021-06-25 11:41:43 +02:00
Christian Helmuth
002037ce15 vbox6: support MAC address overwrite 2021-06-25 11:41:43 +02:00
Christian Helmuth
2a1a47b598 vbox6: update to version 6.1.22 2021-06-25 11:41:43 +02:00
Alexander Boettcher
ab31de0f6a libc_integration: reduce rounds for x86_32
autopilot mode. The test machine is less powerful as the x86_64 one.

Issue #3967
2021-06-25 11:41:43 +02:00
Pirmin Duss
a37ff1d985 lx_fs: enable session quota upgrades
Issue #4070
2021-06-25 11:41:43 +02:00
Pirmin Duss
4053e1628b lx_fs: support for unlink
This is based on the work of @ehmry and @sidhussmann.

Issue #4070
2021-06-25 11:41:43 +02:00
Alexander Boettcher
27004e1fd5 usb: remove monolithic usb driver
+ adjust README files

Fixes #4173
2021-06-25 11:41:43 +02:00
Johannes Schlatow
b09e69a444 ports: change bashrc path
genodelabs/genode#4163
2021-06-04 11:29:04 +02:00
Christian Prochaska
60eec251e0 qt5: increase stack size of QtWebEngine render thread
Fixes #4168
2021-06-02 10:36:01 +02:00
Stefan Kalkowski
336350fe60 sculpt: enable support for MNT Reform2 2021-06-01 15:53:48 +02:00
Stefan Kalkowski
8408bf6ac0 fec_nic_drv: remove nic_server mode
Issue #4133
2021-06-01 15:51:22 +02:00
Alexander Boettcher
73d87073af vbox5/6: avoid negative timeouts in xhci model
Fixes #4184
2021-05-31 15:36:53 +02:00
Sebastian Sumpf
cf2527269f qemu-usb: allocate host devices after webcam
Because qemu-usb allocated host devices after 'USB_HOST_DEVICE' in the
object array and 'USB_WEBCAM' is loacated after 'USB_HOST_DEVICE' the
webcam model can overwrite an already allocated pass-through device. As
a solution add the 'USB_FIRST_FREE' to make it clear from where host
devices can be allocated. Also increase the number of supported host
devices to eight.

fixes #4182
2021-05-31 15:19:46 +02:00
Christian Prochaska
520b69ef0d libports: update expat port
Fixes #4183
2021-05-31 15:19:44 +02:00
Christian Helmuth
1d52bd017d depot: update recipe hashes 2021-05-28 14:16:46 +02:00
Josef Söntgen
e06f3bba27 drivers_managed-imx8q_evk: fix hdmi device node
By now the 'compatible' name is set via the 'type' attribute.

Fixes #4181.
2021-05-28 14:16:46 +02:00
Stefan Kalkowski
1d12755401 depot: add i2c api package
Fixes #4180
2021-05-28 14:16:46 +02:00
Stefan Kalkowski
f2ac341003 depot: add architectural content to os api package
Fixes #4179
2021-05-28 14:16:45 +02:00
Christian Prochaska
f2ff1a6d52 dde_linux: save and restore ARM FPU state in setjmp.S
Fixes #4161
2021-05-28 14:16:45 +02:00
Johannes Schlatow
4383579db6 window_layouter: improve focus history
If no window has ever been focused, next() always returns an invalid
window id. As a consequence, there is no way to cycle through the focus
history without an explicit focus event (e.g. mouse hover).

Instead, next() should return the first window from the focus history if the
currently focused window is not present.

Fixes genodelabs/genode#4164
2021-05-28 14:16:45 +02:00
Christian Helmuth
f0b9549376 wifi_drv: optionally report MAC address
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
aab6f52325 wifi_drv: remove nic_server mode
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
6e85a73a28 ipxe_nic_drv: optionally report MAC address
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
4abc530974 ipxe_nic_drv: remove nic_server mode
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
583ba0e9db ipxe_nic_drv: eliminate static constructors
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
62f83b7198 linux_nic_drv: optionally report MAC address
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
464f0eaf8b linux_nic_drv: remove nic_server mode
Issue #4133
2021-05-28 14:16:45 +02:00
Josef Söntgen
0f72a342f3 wifi_drv: fix setting 'bssid' in config
The wpa_supplicant refuses to set the BSSID in case it is quoted.
Removing the quotes allows for specifying the BSSID in the
configuration.

Fixes #4175.
2021-05-28 14:16:45 +02:00
Alexander Boettcher
3dff399fba netperf_*_usb: fix cap quota for sel4+hw x86
Fixes #4016
2021-05-28 14:16:45 +02:00
Alexander Boettcher
0aa99648d7 run: use usb/hid driver in VM tests
Issue #4173
2021-05-28 14:16:45 +02:00
Alexander Boettcher
6b9fcc9449 drivers_interactive-rpi: use usb host/hid driver
Issue #4173
2021-05-28 14:16:45 +02:00
Alexander Boettcher
f9c7947c45 drivers_interactive-pc: use usb host/hid driver
Issue #4173
2021-05-28 14:16:45 +02:00
Alexander Boettcher
fc5903c917 themed_decorator: upgrade cap and memory on demand
Issue #4150
2021-05-28 14:16:45 +02:00
Stefan Kalkowski
7f6f710bd2 imx8mq_platform_drv: introduce reset domains
A reset domain can consist of one or several reset-pins
denoted by name that are assigned to a device.
When the device gets acquired via the Platform RPC API,
the pins are de-asserted, and asserted again when the
device gets released.

A configuration looks like the following:

  <device name="mipi_dsi>
    <reset-domain name="mipi_dsi_pclk"/>
    ...
  </device>

Fixes #4171
2021-05-28 14:16:45 +02:00
Stefan Kalkowski
ed7d6c74f4 i2c: extend API to support transactions
Introduces the notion of a transaction that consists of one or more
messages. Whereby a message has a read or write direction and consists
of one or more bytes.

Issue #4170
Fixes #4169
2021-05-28 14:16:45 +02:00
Stefan Kalkowski
9f099bd61c base-hw: use generalized util/array.h
Issue #4170
2021-05-28 14:16:45 +02:00
Stefan Kalkowski
6780cf0790 base: introduce array utility
Fixes #4170
2021-05-28 14:16:45 +02:00
Christian Prochaska
7b197d54ed tool chain: update gdb to version 10.2
Issue #4094
2021-05-28 14:16:44 +02:00
Alexander Boettcher
933de21339 base: add platform_info to microkernel platforms
Add to older platforms also the info ROM to avoid confusion/red messages.

Issue #4016
2021-05-28 14:16:44 +02:00
Alexander Boettcher
509e5aa776 platform(x86): report features via platform_info
Report via platform_info the capabilities of the kernel, e.g. ACPI and MSI.

With the commit the try-catch pattern on IRQ session creation by the platform
driver is avoided.

Issue #4016
2021-05-28 14:16:44 +02:00
Christian Prochaska
e1abd2db4e base-linux: update arm32 seccomp policy
Issue #4136
Issue #3466
2021-05-28 14:16:44 +02:00
Christian Helmuth
faf491ce92 smartcard: replace usb_drv by usb_host_drv 2021-05-28 14:16:44 +02:00
Alexander Boettcher
98f524bb41 qemu-usb/webcam: signal capturing off earlier
based on comment in Linux sources. Reduce fallback off-capturing detection
to 1s.

Issue #4078
2021-05-28 14:16:44 +02:00
Sebastian Sumpf
7fcf9053b9 usb_hid: perform device destruction on unplug signal only
- Do not perform desctruction on report updatea in EP because
  'unregister_device' may block on Led state 'update' (synchronous
  control message) leading to the driver being stuck because no more
  signals are received
- Check if device is present in 'submit_urb' calls

fixes #4166
2021-05-28 14:16:44 +02:00
Sebastian Sumpf
6910b880e7 usb_host: make device creation/destruction robust
- Signal device ready depending on state (ready or not) immediately or
  when "actconfig" is set
- Report new devices when ready
- Drain packet stream in case there is no device present (needed for
  synchronous operations at client side)
- Do not use 'session_device' on device destruction, check pointer
  directly instead

issue #4149
2021-05-28 14:16:44 +02:00
Alexander Boettcher
708b7f4619 cpu_balancer.run: adjust quota for seL4 2021-05-28 14:15:28 +02:00
Martin Stein
0069660958 rump: fix compiler warning
Fixes two warnings of this type:

! src/lib/vfs/rump/vfs_rump.cc:214:52: warning: narrowing conversion of
! ‘(s.stat::st_mode & 64)’ from ‘__mode_t’ {aka ‘unsigned int’} to ‘bool’
! [-Wnarrowing]
!
!  214 |                           .executable = (s.st_mode & S_IXUSR) };
!      |                                         ~~~~~~~~~~~^~~~~~~~~~

Fixes #4160
2021-05-28 14:15:28 +02:00
Johannes Schlatow
7b09675236 depot: add less recipe
genodelabs/genode#4162
2021-05-28 14:15:28 +02:00
Johannes Schlatow
4bed825956 depot: add diffutils recipe
genodelabs/genode#4162
2021-05-28 14:15:28 +02:00
Sebastian Sumpf
5135ff2dc2 usb_webcam: An app using libuvc for USB webcams
issue #4158
2021-05-28 14:15:28 +02:00
Sebastian Sumpf
4a56171a77 libports: port of libuvc
by Josef Soentgen

issue #4158
2021-05-28 14:15:28 +02:00
Sebastian Sumpf
ae5b4c9624 libusb: Make USB library more robust
- Add reference count for open/close
- Add cancel transfer support
- Handle packet stream correctly

issue #4158
2021-05-28 14:15:28 +02:00
Josef Söntgen
46c846ef91 libports: add iso handling to libusb
issue #4158
2021-05-28 14:15:28 +02:00
Sebastian Sumpf
c8c589d91a libyuv: enable MJPEG support
issue #4158
2021-05-28 14:15:28 +02:00
Josef Söntgen
5254930930 libports: update jpeg library to v9d
issue #4158
2021-05-28 14:15:28 +02:00
Martin Stein
70797fe879 fs_tool: add <new-file> operation
Adds the <new-file> operation to the fs_tool. When configured, the
<new-file path="...">...</new-file> tag will cause creation or overwriting of
the file given through the 'path' attribute. The file will contain the text
content of the tag.

Ref #4032
2021-05-28 14:15:28 +02:00
Norman Feske
100583e262 os/vfs.h: New_file utility
This patch moves the utility from the app/text_area to os/vfs.h to make
it easier to use by other components. By hosting the 'New_file' as a
friend alongside the 'Directory', we can now pass a 'Directory' as
constructor argument, which is consistent with other utilities such as
'File_content'.

As a further improvement, the new version supports the implicit creation
of the directory hierarchy leading to the new file.

Issue #4032
2021-05-28 14:15:27 +02:00
Norman Feske
57fbd2b658 os/vfs.h: Directory::create_sub_directory
This method can be used to create a directory hierarchy within a
'Directory'.

Issue #4032
2021-05-28 14:15:27 +02:00
Alexander Boettcher
9549eeeca4 ssh_terminal: avoid deadlock during bind callback
Issue #4095
2021-05-28 14:15:27 +02:00
Christian Helmuth
9166a75f2c foc: map uncached normal memory bufferable
Mapping normal memory bufferable restores support for unaligned reads on
DMA memory and prevents the following errors on imx6q_sabrelite.

  KERNEL0: alignment error at 18003061 (PC: 0102e3f8, SP: 401ffb18, FSR: 90000001, PSR: 20000110)

Issue #4094
Issue #4157
2021-05-28 14:15:27 +02:00
Martin Stein
dd587c6712 fs_query: support querying file sizes
By adding an attribute 'size="yes"' to a query, one instructs fs_query to
report also the size of each queried file as attribute 'size' of the
corresponding 'file' node.

Ref #4032
2021-05-28 14:15:27 +02:00
Martin Stein
3ed26e7bb2 fs_query: watch only readable files
The fs_query component used to try watching all files it found resulting in
errors on files that are not watchable. For some files, however, the watch-
feature doesn't make sense as they are not readable (no content, no size).
Now, fs_query will check first whether a file is readable and skip watching
if it isn't.

Ref #4032
2021-05-28 14:15:27 +02:00
Martin Stein
6e900f147c fs_query: read content only from readable files
When configuring fs_query to print the content of files it used to try so for
all files it found resulting in errors on files that are not readable. Now,
fs_query will check first whether a file is readable and skip printing the
content of those that are not.

Ref #4032
2021-05-28 14:15:27 +02:00
Tomasz Gajewski
0507d3f44b ssh_terminal: fixed managing ssh file descriptors
Managing ssh event file descriptors was performed from two different
threads which could cause reallocation of structure used in other thread
in a call to 'poll' function.

Splitted initialization to parts and moved ssh event part into ssh loop.

Issue #4095
2021-05-28 14:15:27 +02:00
Tomasz Gajewski
0b641ba581 ssh_terminal: fixed race condition during startup
Moved creating ssh loop thread after initialization of wake up server
file descriptors to make sure that they will be properly handled even in
first loop run.

Issue #4095
2021-05-28 14:15:27 +02:00
Martin Stein
b3a229eebb vfs_block: write less to the log
Remove calls to the Genode log functions that were done unconditionally or
according to a static verbosity flag.

Ref #4032
2021-05-28 14:15:27 +02:00
Martin Stein
fd0a4e78c8 rump: write less to the log
Remove calls to the Genode log functions that were done unconditionally or
according to a static verbosity flag.

Ref #4032
2021-05-28 14:15:27 +02:00
Alexander Boettcher
b6b9801c20 seoul: fix ahci model busy bit handling
A warning, discovered during GCC 10.3 update, got fixed wrongly.

Issue #4097
2021-05-28 14:15:27 +02:00
Stefan Kalkowski
b22d9385f1 imx8mq_platform_drv: enable root clock div setting
Fixes #4155
2021-05-28 14:15:27 +02:00
Stefan Kalkowski
516601b7ba os: add Platform::Device::sigh_omit_initial_signal
Add possibility to register an interrupt handler without triggering
an initial spurious interrupt for ported device driver code.

Fixes #4154
2021-05-28 14:15:27 +02:00
Alexander Boettcher
67a8f29697 rump_ext2.run: increase cap quota for sel4 2021-05-28 14:15:27 +02:00
Josef Söntgen
3e284558a1 drm: account for guard page
This makes the rendering issue with mesa gears disappear.

Issue #4148
2021-05-28 14:15:27 +02:00
Alexander Boettcher
04d8e03ecb mesa: use 32bit RGB in egl platform lib
Fixes distortion in mesa gears i965

Issue #4148
2021-05-28 14:15:27 +02:00
Alexander Boettcher
cfe29b0e52 libc_integration.run: specify random source
After update of stdcxx, either hardware (CPU) random sources are taken
or, if not available/insufficient, /dev/urandom is used.

Issue #3967
Issue #4094
2021-05-28 14:15:27 +02:00
Alexander Boettcher
d4b9be8d44 stdcxx: support /dev/urandom
when cpu does not provide sufficient hardware support. (happens on our
nightly test machine as also build machine).

Issue #4094
2021-05-28 14:15:27 +02:00
Johannes Schlatow
db97af8dec vfs: fix read of large files in fs_file_systems
For fs_file_systems, reads are limited to the size of the packets from the
File_system session. Hence, we cannot read the large files in one go.

This fix is particularly helpful for fonts_fs, as it enables including font
files from a File_system.

genodelabs/genode#4135
2021-05-28 14:15:27 +02:00
Johannes Schlatow
4daf19ec7e vfs_ttf: update glyphs when font file changes
genodelabs/genode#4135
2021-05-28 14:15:27 +02:00
Christian Prochaska
18a43c1afd base-foc: fix assignment in 'Ipc_pager::acknowledge_exception()'
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Helmuth
813f4d976b lxip: allocate skb with properly aligned IP header
Comment in Linux sources:

  Since an ethernet header is 14 bytes network drivers often end up with
  the IP header at an unaligned offset. The IP header can be aligned by
  shifting the start of the packet by 2 bytes. Drivers should do this
  with:

  skb_reserve(skb, NET_IP_ALIGN);

This is ensured when using netdev_alloc_skb_ip_align().

Issue #4094
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
a24224ffc3 usb_host: improve isochronous performance on Intel
This patch takes advantage of block transfer interrupts on Intel XHCI
controllers which is used during isochronous transfers. Because of a bug
in hardware (see usb_host_isoc_bei.patch header), this feature has been
disabled for Intel leading to up to 8000 interrupts/s for isochronous
transfer causing severe CPU consumption on Genode. With this commit we
lower host driver consumption to normal levels.

issue #4149
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
9543161827 usb_host: Move task to device in USB session
A Lx::Task is now associated to a USB device not the session any more.
This implies that a task lives as long as the device making it possible
to gracefully handle outstanding requests (i.e., synchronous) in case
the session has been closed.

issue #4149
2021-05-28 14:15:26 +02:00
Martin Stein
a0517686ca ports/libsparkcrypto: update for GCC 10
The old port version contained '*.ali' files that were build with an older GCC
which led to problems when compiling packages that use the port with the new
GCC 10. The '*.ali' files of the new port version were generated with GCC 10.

Fixes #4145
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
9209dfc9d5 ldso: output loaded objects of 'Shared_object' interface
When loading shared libraries via the 'Shared_object' interface display
all additionaly loaded libraries in case 'ld_verbose' is configured. Up
until now, only the loaded library was displayed. In order to determine
if a dependend library had arlready been loaded prior to loading the
'Shared_object' the reference counter is used.

fixes #4147
2021-05-28 14:15:26 +02:00
Alexander Boettcher
f8d0552d52 libc_integration: fix out-of-bound access
which leads to sporadic pagefaults/segmentation faults.

Fixes #3967
2021-05-28 14:15:26 +02:00
Alexander Boettcher
1c20ed12c1 qemu: sanity check misconfigured memory for okl4
Issue #4095
2021-05-28 14:15:26 +02:00
Alexander Boettcher
d516544a1f ssh_exec_channel.run: use default Qemu memory size
The default size is on most kernels 512M. On OKL4 we have to use 800M,
because of the statically configured memory ranges in the OKL4 kernel.

By avoiding a specific amount of memory, the default Qemu memory sizes are
used.

Issue #4095
2021-05-28 14:15:26 +02:00
Martin Stein
f8b2fd522b ports/ada-runtime: update to support gcc 10
Fixes #4128
2021-05-28 14:15:26 +02:00
Christian Prochaska
471d34a367 Remove mpc and mpfr ports
These ports are not needed anymore with the 21.05 tool chain update.

Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
d5e4ffd191 sanitizer: update to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
4a4b754bf2 gcov: update to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
a0f5d34e25 stdcxx: update to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
9c05cda6e7 tool_chain: update gcc to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
6639261126 binutils: augment equally-named sections again
Revert GNU ld to the old behavior where sections with the same name in multiple
ld scripts are merged. Binutils 2.36.1 creates two sections with the same name.

Fixes #4126
2021-05-10 11:52:27 +02:00
Christian Prochaska
fc902d9e66 tool_chain: update binutils to version 2.36.1
Issue #4094
2021-05-10 11:19:13 +02:00
Christian Prochaska
6a11b78cdf tool_chain: use gcc-provided dependency libraries
Download gmp, mpc and mpfr with the download script provided by the
gcc source tree and let the gcc build system handle the build of these
libraries with the correct compile options. This fixes build issues on
armhf Linux and removes the need to maintain mpc and mpfr ports in
the Genode tree.

Issue #4094
2021-05-10 11:19:11 +02:00
Christian Helmuth
777923f9bd depot: update recipe hashes 2021-05-10 11:18:12 +02:00
Martin Stein
d2bf565503 nic/zynq: fix packed conversion error with gcc 10
Fixes #4142
2021-05-10 11:17:21 +02:00
Alexander Boettcher
384a8da50b ssh_terminal: use pthread_mutex
to avoid sporadic deadlocks between EP thread and the server loop pthread.

Issue #4095
2021-05-10 11:17:20 +02:00
Alexander Boettcher
b6bdd91cfa nova: avoid unaligned warnings by gcc10
Issue #4126
2021-05-10 11:17:20 +02:00
Christian Helmuth
a5385cebf4 block_cache: explicitly instantiate template function
The explicit instantiation is required because the function is defined
in the compilation unit only but referenced externally.

Fixes #4108
2021-05-10 11:17:20 +02:00
Josef Söntgen
c5c3d7ca98 gpt_write: address unaligned access for name
Turn member into byte array to prevent unaligned memory access.

Fixes #4141.
2021-05-10 11:17:20 +02:00
Norman Feske
d19b751632 nano3d: remove surface-clear optimization
This patch fixes a GCC-10 compile error. Even though the optimization
was quite effective - I measured a speedup of factor 2 - it is not all
that important for the overall application performance. In the nano3d
case, we are talking about 1 vs. 2 percent of CPU time.

Fixes #4140
2021-05-10 11:17:20 +02:00
Christian Prochaska
ff160decec gdb: fix build errors with gcc 10
Fixes #4139
2021-05-10 11:17:20 +02:00
Norman Feske
a4115cfea9 base-linux: discharge timestamp on AARCH64
The kernel-agnostic 'Trace::timestamp' function for arm_64 executes the
'mrs %0, pmccntr_el0' instruction, which is not permitted for user-level
programs on Linux. This patch shadows the generic timestamp.h header
with dummy that returns zero. This return value prompts the timeout
framework to disable the interpolation of time based on timestamps. This
avoid the illegal-instruction abort but comes with two llimitations:

First, time measurements are effectlively limited to a granulariry of 1
millisecond (deliberately constrained by the timer driver).

The quirk is applied when using the base-linux API. Should a generic
application (that uses the base API only) call 'Trace::timestamp'
directly, the illegal instruction is executed.

Issue #4136
2021-05-10 11:17:20 +02:00
Norman Feske
2f9d430c00 base-linux: 64-bit ARM support
This patch adds support for running Genode/Linux on the AARCH64
architecture.

- The kernel-agnostic startup code (crt0) had to be extended to
  capture the initial stack pointer, which the Linux kernel uses
  to pass the process environment. This is in line with the
  existing startup code for x86_32 and x86_64.

- The link order of the host libraries linked to lx_hybrid
  programs had to be adjusted such that libgcc appears at last
  because the other libraries depend on symbols provided by
  libgcc.

- When using AARCH64 Linux as host, one can execute run scripts
  via 'make run/<script> KERNEL=linux BOARD=linux' now.

Issue #4136
2021-05-10 11:17:20 +02:00
Christian Helmuth
718f44ae5b Check max_len before dereferencing pointer in Cstring constructor
Fixes #4112
2021-05-10 11:17:20 +02:00
Martin Stein
66feb939e6 cbe_tester: compile errors/warnings with gcc 10
Fixes #4113
2021-05-10 11:17:20 +02:00
Christian Helmuth
1baf844e20 vfs_stress: fix handling of 'char' in error message
Issue #4112
2021-05-10 11:17:20 +02:00
Martin Stein
5fa2efa745 net/dhcp: print readable message types
When a DHCP packet is printed out, it first tries to determine the most
specific message type from the DHCP options and print its human-readable name
right after the protocol name. If finding the message type fails, the less
specific opcode is printed instead, but also in a human-readable way.

Fixes #4131
2021-05-10 11:17:20 +02:00
Norman Feske
ad847d0543 sculpt: fix glitch in fs-browser back arrow
Fixes #4124
2021-05-10 11:17:20 +02:00
Norman Feske
0b36d81c0c base-linux: separate x86-specific code
By moving core's build-description to a library - a pattern already
employed for the other base platforms - we become able to cleanly split
x86-specific code (I/O-port access) from generic code. This is a
prerequisite for enabling non-x86 architectures such as AARCH64.

Issue #4136
2021-05-10 11:17:20 +02:00
Jean-Adrien DOMAGE
a4727c90a8 lx_fs: add os/run/lx_fs_import.run run script
This new runscript demonstrates how a file can be overwritten by vfs
import with the flag overwrite set to false. This is due to a bug
in lx_fs that is not propagating an ernno EEXIST syscall error.

Issue genodelabs#4104
2021-05-10 11:16:24 +02:00
Jean-Adrien DOMAGE
e65b7f3b82 lx_fs: fix errno EEXIST not propagated
This commit introduces a fix for lx_fs to propagate errno EEXIST error.
This prevents vfs <import overwrite="false"> to overwrite an imported
file, if it already exists, without the overwrite flag set to true.

Issue genodelabs#4104
2021-05-10 11:16:24 +02:00
Josef Söntgen
0f0edc0134 usb_host: implement sg_pcopy_* as TRACE dummies
The former implementation called 'TRACE_AND_STOP' which led to the
'usb_host_drv' to stop whenever such a function was called. Rather
than stopping return '0' and let the contrib code deal with this
situation.

Issue #4116.
2021-05-10 11:16:24 +02:00
Josef Söntgen
d0f084d449 usb_host: backport xhci bounce-buffer fix
This commit backports the Linux upstream commit (d4a6106) [*]
that introduces a check to prevent the sglist from being used
unconditionally.

[*] 'xhci: fix bounce buffer usage for non-sg list case'

Fixes #4116.
2021-05-10 11:16:24 +02:00
Christian Prochaska
c7b2314d23 foc: fix errors with gcc 10 and binutils 2.36
Fixes #4118
2021-05-10 11:16:24 +02:00
Christian Helmuth
eb94f03416 microcode.run: do not twiddle with MAKEFLAGS
Unconditionally setting MAKEFLAGS to just 's' is not nice because other
flags cannot be passed through the run script. What the script desires
is to disable the automatically enabled '--print-directory' for sub-make
instances when calling tool/port/current by declaring
'--no-print-directory'.
2021-05-05 11:55:27 +02:00
Norman Feske
516a9a6925 depot: update recipe hashes 2021-05-05 11:35:31 +02:00
Norman Feske
fdb1a4dd88 base-linux: avoid legacy syscalls
Until now, Genode's Linux system call bindings were based on original
Unix system calls that were later superseded by more flexibile variants.
E.g., 'openat' is a modern version of 'open'. Even though Linux upholds
the compatiblity with the original versions for existing architectures
like x86, the legacy syscalls are absent for the recently added AARCH64
architecture. A good overview of the system calls accross the prominent
architectures can be found at

https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md

This patch updates Genode's syscall bindings to avoid legacy versions,
thereby easing the support for AARCH64. The used "modern" versions
were introduced back in Linux version 2 days. So we are fine to rely
on them.

The patch slightly changes the signature for lx_stat because this system
call is merely used to check for the existance of a file and its size.
The new name 'lx_stat_size' draws a closer connection to its use case.
That said, the stat syscall has not been updated to the modern statx
since statx is still a fairly recent addition.

Issue #4136
2021-05-05 11:35:31 +02:00
Norman Feske
d477062c56 base-linux: simplify clone syscall binding
This patch simplifies the use of the clone system call for creating
processes and threads. Until now, the binding used an opaque pointer
argument to pass context information to the newly created process or
thread. However, upon close inspection, this is not a strict
requirement.

A newly created thread accesses its contextual information by
using its stack pointer as key. The pointer argument is not used.

The creation of processes is strictly serialized because the
intermediate stack used in-between clone and execve is a global
variable. Since we rely on the serialization anyway, we can pass the
context information of a new process via a global variable as well.

This change simplifies the syscall binding for the upcoming AARCH64
support, which would otherwise require us to deal with the notion
of TLS on Linux.

Issue #4136
2021-05-05 11:35:31 +02:00
Christian Prochaska
00d13cf304 qt5: fix build errors with gcc 10
Fixes #4132
2021-05-05 11:35:31 +02:00
Martin Stein
49184fb938 net: circumvent stringop-overflow error
With the update to GCC 10, the compiler stopped with an error when compiling
places where a MAC address is copied from outside into a packed object using
the Net::Netaddress::copy method (e.g. in
Net::Arp_packet::dst_mac(Mac_address)):

! error: writing 6 bytes into a region of size 4 [-Werror=stringop-overflow=]

While trying to find a clean solution for this error, I found posts on
gcc.gnu.org and github that stated that the size calculations that cause these
errors are incorrect. Indeed, I could verify that the actual size of the two
regions was static and exactly the same in places were the error occured.

Furthermore, I couldn't find a way of making it more clear to the compiler
that the sizes are the same. By accident, we found that using the address of
the first element of the array that forms the second region instead of the
array address itself, somehow circumvents the error.

Fixes #4109
2021-05-05 11:35:31 +02:00
Martin Stein
52e8c95321 net: fix packed-conversion compiler warning
With the update to GCC 10 the compiler used to warn when using the internet
checksum functions on packet classes (like in
Net::Ipv4_packet::update_checksum):

warning: converting a packed ‘Net::[PACKET_CLASS]’ pointer
         (alignment 1) to a ‘const uint16_t’ {aka ‘const short
         unsigned int’} pointer (alignment 2) may result in an
         unaligned pointer value

Apparently, the 'packed' attribute normally used on packet classes sets the
alignment of the packet class to 1. However, for the purpose of the
internet-checksum functions, we can assume that the packet data has no
alignment. This is expressed by casting the packet-object pointer to a pointer
of the new packed helper struct 'Packed_uint16' that contains only a single
uint16_t member before handing it over to the checksum function (instead of
casting it to a uint16_t pointer).

Ref #4109
2021-05-05 11:35:31 +02:00
Christian Prochaska
9b854e1496 Prevent recursive 'memset()' calls with gcc 10
Fixes #4125
2021-05-05 11:35:31 +02:00
Christian Prochaska
d5e7870532 virtualbox5: fix build errors with gcc 10
Fixes #4106
2021-05-05 11:35:31 +02:00
Christian Prochaska
bc8dbc6b1a bash: fix build error with gcc 10
Fixes #4107
2021-05-05 11:35:31 +02:00
Christian Prochaska
8f23e377d9 lxip: fix build error with gcc 10
Fixes #4102
2021-05-05 11:35:31 +02:00
Christian Prochaska
aebece5110 readline: fix build error with gcc 10
Fixes #4103
2021-05-05 11:35:31 +02:00
Christian Prochaska
82604f2c2b lx_fs: fix build errors with gcc 10
Fixes #4123
2021-05-05 11:35:31 +02:00
Norman Feske
4563baae77 app/text_area: fix build error with gcc 10
Fixes #4098
2021-05-05 11:35:30 +02:00
Christian Prochaska
c4e3d3dbc4 hw: fix build error with gcc 10
Fixes #4115
2021-05-05 11:35:30 +02:00
Alexander Boettcher
eb53f8c113 seoul: adjust to GCC 10.03
Fixes #4097
2021-05-05 11:35:30 +02:00
Christian Prochaska
07649b667b sel4: fix build errors with gcc 10
Fixes #4121
2021-05-05 11:35:30 +02:00
Christian Prochaska
0f679bb35e pistachio: fix build error with gcc 10
Fixes #4119
2021-05-05 11:35:30 +02:00
Christian Prochaska
d6e9d74038 nitpicker: fix build error with gcc 10
Fixes #4110
2021-05-05 11:35:30 +02:00
Christian Prochaska
405e6744fb nova: update kernel for gcc 10
Fixes #4114
2021-05-05 11:35:30 +02:00
Christian Prochaska
fad85c3fd5 virtualbox6: fix build errors with gcc 10
Fixes #4105
2021-05-05 11:35:30 +02:00
Christian Prochaska
49392dfa44 dde_ipxe: fix build error with gcc 10
Fixes #4101
2021-05-05 11:35:30 +02:00
Christian Prochaska
e627f8320f verify: fix build error with gcc 10
Fixes #4099
2021-05-05 11:35:30 +02:00
Christian Prochaska
8196e229b0 netperf: fix build error with gcc 10
Fixes #4096
2021-05-05 11:35:30 +02:00
Christian Prochaska
0a8394c891 depot_autopilot: store signal context capability as copy
Fixes #4129
2021-05-05 11:35:30 +02:00
Christian Prochaska
66e8f8d764 base: increase bss alignment to 8 bytes
Fixes #4127
2021-05-05 11:35:30 +02:00
Christian Prochaska
84e4cbb54c cxx: add 'strchr()'
Fixes #4122
2021-05-05 11:35:30 +02:00
Tomasz Gajewski
23b21812dd Fixes in gdb_monitor_interactive/target_config.run
Fixes #4134
2021-05-05 11:35:30 +02:00
Norman Feske
d66e55ec37 aes_cbc_4k.run: increase timeout
needed for foc/qemu/x86_32
2021-05-05 11:35:29 +02:00
Martin Stein
5dbc9ef244 nic_router: more descriptive port allocator code
This renames some members and local variables in the port allocator in order to
make the code more descriptive.

Fixes #4086
2021-05-05 11:35:29 +02:00
Sid Hussmann
4e822436fc nic_router: use increasing src port for new nat
The NAT feature of the NIC router used to prefer re-using source ports that
have been freed recently. From an external server's perspective, if a client
dies and restarts, chances are high that the new connect arrives with the same
source-IP/source-port as the old connection. The server has to forcefully reset
the connection. If that happens a lot, the server may even start to ignore
further connections from this IP/port combination for a while as a mitigation.

This patch adds a continuous counter feature that makes sure that every new
port allocation will increment and result in a port that hasn't been used for a
long time.

The NAT feature of the nic_router is now more in line with RFC 6056 chapter 4.

Ref #4086
2021-05-05 11:35:29 +02:00
Alexander Boettcher
ce75b25fd4 ssh_exec_channel: adjust cap quota for seL4
Issue #4095
2021-05-05 11:35:29 +02:00
Josef Söntgen
118e8ee6e1 ssh_terminal: flush buffer on Terminal cleanup
Issue #4095.
2021-05-05 11:35:29 +02:00
Alexander Boettcher
f236e99b5c ssh_terminal: avoid deadlock of EP and pthread.0
pthread.0 acquires a write buffer mutex and calls potentially
blocking fs operations. The EP thread handles session requests and tries to
acquire the same write buffer lock. IO progress events for pthread.0 are
handled by the EP thread, which however is blocking on the write buffer mutex.

The commit uses two write buffers, one which is filled by the EP and a second
which is used by pthread.0. The two buffers are swapped protected by a mutex
without invoking blocking fs operations.

Issue #4095
2021-05-05 11:35:29 +02:00
Alexander Boettcher
86e09b60c4 exec_terminal: sandbox errors about unknown node
The exec_terminal generates a config report which is used as input ROM for
sandbox/init, which does not support an "<empty>" node.

An empty config node is empty, without an node.

Issue #4095
2021-05-05 11:35:29 +02:00
Johannes Schlatow
373b45a0f0 depot: fix content.mk of drivers_managed-pc
Was still using the event_filter.config from drivers_interactive-pc
although a dedicated file is present in the raw archive.

The fix is just for consistency reasons, as sculpt manager is generating the
event_filter.config anyway.
2021-05-05 11:35:29 +02:00
Johannes Schlatow
a2491c30b3 event_filter: add new test cases
genodelabs/genode#4069
2021-05-05 11:35:29 +02:00
Johannes Schlatow
d80b2a150a event_filter: add <log> node
genodelabs/genode#4069
2021-05-05 11:35:28 +02:00
Johannes Schlatow
c802de2cf9 event_filter: add <ignore-key> node
Fixes genodelabs#4069
2021-05-05 11:35:28 +02:00
Johannes Schlatow
e86387d557 event_filter: allow remapping of KEY_UNKNOWN
KEY_UNKNOWN is a collective symbols for all unknown keycodes.
Remapping thus requires iterating through all corresponding codes
instead of only applying the policy to the first match.

Issue genodelabs#4069
2021-05-05 11:35:28 +02:00
Norman Feske
f6aabfe233 Sculpt: prevent nitpicker's resize warnings
This patch increases the RAM quota of the top-level nitpicker instance
to 12 MiB so that resize operations can be buffered for resolutions up
to 2560x1080. It mutes diagnostic messages of the form "Warning: Gui
(...) not enough RAM to preserve buffer content during resize" and
improves the window-resize experience.
2021-05-05 11:35:28 +02:00
Norman Feske
8617e5cee0 Sculpt: un-inspect failed USB storage
With this patch, the user is able to re-gain access to the inspect view
by toggling the inspect button of a file system unrelated to the failed
USB storage device.

Fixes #4090
2021-05-05 11:35:28 +02:00
Johannes Schlatow
2db94b8438 platform_drv/x86: support to disable MSI-X
+ disable for wifi driver MSI-X

Issue #4079
2021-05-05 11:35:28 +02:00
Alexander Boettcher
7b9e7361ba vbox5: add capture pkg version
Issue #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
910ea16405 qemu-usb: restrict build to x86
Issue #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
58db8c647a qemu-usb: add usb webcam model
Fixes #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
4826bd82fe qemu-usb: fix spelling
Issue #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
7b90f8f857 libports: add libyuv support
Issue #4078
2021-05-05 11:35:28 +02:00
Johannes Schlatow
bf3ad3baff vbox5/6: pass extra mouse buttons to VM
Fixes #4120
2021-05-05 11:35:28 +02:00
Johannes Schlatow
8a4b52d9e3 vbox: only clear screen if virtual_fb_mode changed
Fixes genodelabs/genode#4085
2021-05-05 11:35:28 +02:00
Johannes Schlatow
a47fd36b9f vbox: fix high VM load after resize
break circle of repeated guest notifications if the guest never
acknowledges a VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST

genodelabs/genode#4084
2021-05-05 11:35:28 +02:00
Christian Prochaska
a2e62db6ec qt5: fix libpng vulnerabilities
Fixes #4089
2021-05-05 11:35:28 +02:00
Alexander Boettcher
7503472ae6 stdcxx: add missing symbols for istream and thread
Issue #3967

triggers using -O0 with test-libc_integration:

libc_integration/main.cc:146: undefined reference to `std::istream::operator>>(unsigned long&)'

contrib/stdcxx-80f380143250d4f951433876698b54fdac32b95f/include/stdcxx/std/thread:67: undefined reference to `vtable for std:🧵:_State'
2021-05-05 11:35:27 +02:00
Johannes Schlatow
1c49da8ce4 terminal: don't overwrite last column until eol
Introduce a new _overflowed state variable to indicate whether the
horizontal boundary was reached already and to omit subsequent character
output.

This state is necessary to maintain a valid cursor position at all
times. The _overflowed attribute is reset once the cursor is moved into
a valid position again.

To harmonise the bounds checking for _cursor_pos modifications, the
`constrain()` method was added.

Fixes genodelabs/genode#4093

Also fixes a bug in `vpa()` and `vpb()` which moved the cursor
horizontally instead of vertically.
2021-05-05 11:35:27 +02:00
Norman Feske
9cb8c37e3a terminal: fix sporadic freeze on font-size changes
The direct execution of application-level code by a watch handler is
troublesome because those handlers are executed at the I/O signal level.
In the concrete case, the watch handler got recursively called because
the handler called _handle_config (application-code), which called the
VFS, which in turn performed a wait_and_dispatch_one_io_signal, which
again invoked the watch handler.

The patch works around the problem by letting the watch notification
trigger the application-level signal for the _config_handler.

Fixes #4091
2021-05-05 11:35:27 +02:00
Pirmin Duss
bb6617ad03 New libc_integration test
I created a test program which stresses the interplay between libc,
pthreads and vfs_pipe and may detect regressions.

The program starts a thread that spawns a bunch of workers, sends and
receives data to them through a pipe. When all data of a worker is
collected, the worker is finished (join()) and a new worker is started.
Both the number of bytes sent to the worker and the size of its
answer are random.

Issue #3967
2021-05-05 11:35:27 +02:00
Tomasz Gajewski
f49ec5b171 tool/run: extract function to copy files
Issue #4073
2021-05-05 11:32:09 +02:00
Stefan Kalkowski
421d2bed40 platform driver: make device info XML optional
* The device XML information dataspace is only provided,
  when the client's policy states `info="yes"`
* The device XM information gets changed to include the
  physical resource names (I/O memory and IRQ addresses)
  instead of virtual ids and page offset

Fix #4077
2021-05-05 11:31:16 +02:00
Norman Feske
6caa74a18e Remove os/slave.h API
Fixes #3754
2021-05-05 11:21:43 +02:00