Compare commits

...

621 Commits
20.05 ... 21.02

Author SHA1 Message Date
Christian Helmuth
86ad4ed17f version: 21.02 2021-02-25 11:26:18 +01:00
Norman Feske
1d1b5b88c5 News item for version 21.02 2021-02-25 11:24:28 +01:00
Norman Feske
4f1a3a8000 Release notes for version 21.02 2021-02-25 11:24:28 +01:00
Christian Helmuth
0afd3db894 depot: update recipe hashes 2021-02-25 11:24:23 +01:00
Christian Helmuth
cbe81d35b9 autopilot: disable run script not supported by riscv
Issue #4021
2021-02-25 11:22:59 +01:00
Josef Söntgen
1d551bd967 vbox6: add QEMU xHCI device-model 2021-02-25 11:22:59 +01:00
Alexander Boettcher
812c3599de vbox6: add network backend using the nic session
as used in vbox5 already.
2021-02-25 11:22:59 +01:00
Christian Helmuth
20caac5f3b Port of VirtualBox 6.1.14 2021-02-25 11:22:59 +01:00
Christian Helmuth
a47b374905 vim.run: import clipboard archive only once 2021-02-23 13:22:50 +01:00
Christian Helmuth
7a3dc68f34 vbox5: fix typo 2021-02-23 13:22:48 +01:00
Christian Prochaska
dd92ab126b libc: test TLS support in pthread test
Fixes #4023
2021-02-23 12:19:25 +01:00
Sebastian Sumpf
f68e655312 mk: link core to library archive instead of .o file
Do not link base and core libraries into on large relocatable .o file,
which is linked later to core - causing long link times. Create an
independent library archive out of the base and core libraries that can
be linked faster.

issue #4027
2021-02-23 12:17:04 +01:00
Norman Feske
64165d829e depot: update recipe hashes 2021-02-23 12:07:18 +01:00
Norman Feske
c2feba065f Reduce pointers to doc/ in top-level README
Avoid referencing the content of doc/ for topics that are covered by the
Genode Foundations book.
2021-02-23 12:07:18 +01:00
Christian Helmuth
219809ffed base: refactor VM/vCPU API
Issue #3554
2021-02-23 12:07:18 +01:00
Sid Hussmann
6e8728f2d3 vfs/pipe: use local signal handling
This commit improves the performance of the pipe plugin by using local
signal handling and avoiding sending a signal during write when pipe
buffer is full.

Issue #3583
2021-02-23 12:07:17 +01:00
Stefan Kalkowski
90d9470dfd vmm: add virtio block device model
* Add new virtio device model
* Extend test run-script with vfat block test image
* Add vmm depot src recipe
* Use packages in test run-script

Fix #4025
2021-02-23 12:07:17 +01:00
Stefan Kalkowski
2879aa003b vmm: cleanup virtio model, make it extensible
* Introduce different index types for ring counters and descriptor arrays
  within the Virtio split queue implementation
* Be more accurate in reporting the queue number supported, and raise it
  to 512
* Introduce abstractions for mmio register access, where several values
  are stored at the same place, and selector registers exist.
* Turn Virtio_device into a template to define the Virio queue type,
  and its numbers per device model (needed for e.g., future block model)

Issue #4025
2021-02-23 12:07:17 +01:00
Stefan Kalkowski
83c2309710 run: don't rebuild core/bootstrap when available
Fix #4026
2021-02-23 12:07:17 +01:00
Christian Prochaska
59459e60e7 libc: pthread TLS optimizations
Fixes #4024
2021-02-23 12:07:17 +01:00
Sid Hussmann
8d13121e84 vfs/pipe: refactor read/write synchronization
All pipe-ends were notified at the same time which leads to dead-locks.
This commit mitigates this by having a signal handler for each pipe and
each pipe-end respectively.

Issue #3583
2021-02-23 12:07:17 +01:00
Sid Hussmann
3ff0efd627 vfs/pipe: add fifo feature to pipe plugin
The vfs pipe plugin can now be used as named pipe which anables data
transfer via file handles from one component to another. E.g. if one
would like to send data from component A to stdin of a libc component B,
one can do so by simply writing to that fifo file.

Issue #3583
2021-02-23 12:07:16 +01:00
Norman Feske
10605a6903 Spelling fix 2021-02-23 12:07:16 +01:00
Martin Stein
6937eb7d94 drivers_nic-rpi: use usb_net and usb_host
Ref #3961
2021-02-23 12:07:16 +01:00
Martin Stein
a462a8e741 usb_host: compile errors with DEBUG_LINUX_PRINTK
Ref #3961
2021-02-23 12:07:16 +01:00
Martin Stein
3485282909 drivers/platform/rpi: remove dead code
Ref #3961
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
b6d20b4742 autopilot: disable run script not supported by riscv
- libc and nic driver are currently not available on RISC-V

issue #4021
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
7318ca6084 depot: add 'riscv' to depot spec
issue #4021
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
ca777fe93f riscv: add riscv_qemu base-hw recipe
issue #4021
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
ccd9ba4161 riscv: move CPU header from base-hw to base
issue #4021
2021-02-23 12:07:16 +01:00
Christian Helmuth
954f03257d Update curl to version 7.70.0
Issue #3773
2021-02-23 12:07:16 +01:00
Pirmin Duss
190b4784c5 openssl: do not depend on ARM CPU probing
With this commit libcrypto does not use ARM NEON extension as long as
SPECS includes "neon". arm_v7a does declare "neon" per default while
arm_v8a does.

Issue #3773
2021-02-23 12:07:16 +01:00
Christian Helmuth
f23e302475 Update OpenSSL to version 1.1.1i
Note, OpenSSL now comes as one combined depot archive *openssl* that
replaces the former *libssl* and *libcrypto* archives. The libraries are
still separate binaries for compatibility with legacy software.

Issue #3773
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
f5cd12dcf9 base/base-hw: unify startup library builds
- Use 'select_from_repositories' for crt0.s of startup library
- Move RISC-V crt0.s to base (where the other archs are located)

issue #4019
2021-02-23 12:07:15 +01:00
Martin Stein
ce31c90bc3 run/netperf.inc: fix problem with reused ports
It seems that with the nigthly autopilot the data port (that is choosen by the
client) may stay some time (minutes) allocated after the a test run. This
causes successive tests to fail when trying to reuse the port.

* Use a unique data port for each target platform in the range of 18000-18099.
* Add documentation on how to prepare for running the test on a Linux target.
* Remove Qemu-specific code paths as Qemu isn't supported anymore by the script
  since the introduction of the Uplink session (running with a NIC router on
  Qemu was never supported and now we always need a NIC router).

Ref #3961
2021-02-23 12:02:46 +01:00
Martin Stein
f9c258a372 lwip_lx.run: typo in doc
Ref #3961
2021-02-23 12:02:45 +01:00
Norman Feske
048a4625c5 base: remove stale spec/fpu_vfpv3.mk file 2021-02-23 12:02:45 +01:00
Norman Feske
db3f86d603 base-hw: avoid double slashes in path names 2021-02-23 12:02:45 +01:00
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
Piotr Tworek
ad4211ae2c os: Make Redistributor class inherit Genode::Interface.
The Vmm::Gic::Gicd_banked::Redistributor is used with Constructible, but
does not have a virtual destructor even though it has virtual methods.
This prompts clang to issue the following warning:

  reconstructible.h:122:4: warning: destructor called on non-final
  'Vmm::Gic::Gicd_banked::Redistributor' that has virtual functions
  but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]

Fix this by inheriting Genode::Interface.

Issue #3984
2021-01-25 14:00:43 +01:00
Norman Feske
ff28ed0f8c base: avoid superfluous postprocessing of ldso
Even though the binary patching of ldso must be performed only once,
this postprocessing step was executed on each run because the
postprocess.tag rule is phony (the tag file is never created).
This patch removes this phony behavior by creating the tag file.

Issue #3974
2021-01-25 14:00:43 +01:00
Tomasz Gajewski
693a4d78dd lib.mk: avoid checking abi on every build
Fixes #3974
2021-01-25 14:00:43 +01:00
Piotr Tworek
8f6b934caa base-hw: Fully define _crt0_start_stack value on arm_64
The _crt0_start_stack label points to a memory location containing the
size of the bootstrap stack. On AArch64 this should be an 8 byte value,
but the code only only defines half of those using asm .long statement.
The other half is expected to be 0, which is true when using GNU as.
This is not the case when using clang's integrated as however. Since
_crt0_stack_size is defined inside .text section clang uses 0xd503201f
value (aarch64 nop instruction) to fill the extra 4 bytes.

Fix this minor incompatibility by explicitly defining both halfs of
this 8 byte quantity.

Fixes #3987
2021-01-25 14:00:43 +01:00
Piotr Tworek
384cf14bee libc: Remove unused variables from Libc::Kernel.
The _dispatch_pending_io_signals and _original_suspended_callback member
variables are not used anywhere in the code. This prompts clang to produce
a warning message about it. Remove both variables to fix it.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
90b20b4daf nitpicker: Fix unsigned long to unsigned int cast.
The "unsigned Nitpicker::Gui_session::layer()" function returns
~0UL. This prompts clang to produce a warning about implicit unsigned
long to unsigned int conversion. Fix it by returning ~0U instead of
~0UL.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
80318b9ae0 libc: Add semicolons after [[fallthrough]]
GCC doesn't care, but clang complains if [[fallthrough]] is not followed
by a semicolon. Existing Genode code is also not consitent in this regard.
This patch adds the extra semicolons since it works in both GCC and
clang.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
fce5c249c2 gems: Drop unused variables from Window_list class
No code in this class uses this private member variable. This prompts
clang to produce a warning message about it. Fix it by dropping the
variable.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
71abfb3b4f libc: Mark Libc::Vfs_plugin class as final.
The class has final destructor, but is not itself final. This prompts
clang to produce the following warning message:

class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
                ~Vfs_plugin() final { }
                              ^
vfs_plugin.h:39:13: note: mark 'Libc::Vfs_plugin' as 'final' to silence this warning

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
395a9b5bf5 libc: Remove unused print function from select.cc.
This static inline function is not used anywhere. GCC does not care,
but clang warns about this. Remove the function to allow the code to
compile cleanly with both clang and GCC.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
53081ac6b3 libc: Dont't use local_addr in try/catch block.
The code in Libc::Cloned_malloc_heap_range initializes its local_addr
member variable by calling Region_map::attach_at. This function can
throw Region_conflict exception. The handler for this exception uses the
local_addr to produce an error message. Such error log is IHMO
useless, or even incorrect since the value of local_addr is undefined
in such case.

Its also worth noting that clang 12 produces the following warning for
this code:
  "cannot refer to a non-static member from the handler of a constructor
   function try block"

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
c6d5b98227 decorator: Remove unused _topped_cnt variable.
This private member variable is not used anywhere in the code. This
produces compilation warning when using clang instead of GCC. Drop the
unused variable.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
c402cc1045 window_layouter: Drop unused code.
The State enum and _state private member variable are not used anywhere.
This produces an extra warning when building the code with clang instead
of GCC. Remove this dead code.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
1edac9730c scout: Instantiate templates in their namespace.
When building the code with clang the following warning message is
prodiced:

  "explicit instantiation of 'Scout::Browser_window' must occur in namespace 'Scout'
   template class Browser_window<Genode::Pixel_rgb888>"

 This happens for several different types. This patch fixes the problem
 by instantiating all those templates using their explicit full name.

Issue #3985
2021-01-25 14:00:14 +01:00
Piotr Tworek
d475015ada launchpad: Fix _spacer member initialization.
The Scout::Spacer constructor requires two arguments. The initialization
of the type in Launchpad_window declaration does not specify them. The
variable is however initialized a second time in class constructor. This is
most likely why GCC accepts this code. Clang on the other hand
complains about it.

Fix this by properly initializing both _spacer and _docview only once at
declaration time.

Issue #3985
2021-01-25 13:58:11 +01:00
Piotr Tworek
ffb931f8b1 nano3d: Fix header guard in sqrt.h
The code fails to build with clang due to the following warning/error:

  error: '_INCLUDE__NANO3D__SQRT_H_' is used as a header guard here,
  followed by #define of a different macro [-Werror,-Wheader-guard]

Fix this by removing the extra underscore from this header guard
definition.

Issue #3985
2021-01-25 13:58:11 +01:00
Piotr Tworek
b4d294f62e os: Drop unused Net::Arp_cache::_init member.
Not used anywhere in the code. Clang 11 complains about this.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
052f678225 os: Add missing override keyword.
The _device_specific_features() implements part of the Virtio_device
interface. Decorate it with override keyword to make this clear and
also satisfy clang which produces warning regarding this.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
3fdf323e6e os: Drop unused Net::Dhcp_client::_alloc member.
Not used for anything so technically a dead code. Clang 11 complains
about this.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
05c36d67ce os: Fix clang constant warning in Port_allocator.
Clang 11 produces the following warning when building port_allocator.cc:

port_allocator.cc:27:21: error: result of comparison of constant 65536 with
expression of type 'const Genode::uint16_t' (aka 'const unsigned short') is
always true [-Werror,-Wtautological-constant-out-of-range-compare]
               (port.value <  (unsigned)(Port_allocator::FIRST +

Basically the code compares Port::value (uint16_t) against a constant
65536 which is larger than UINT16_MAX (65535). This comparison will always
be true.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
ffc2a2f306 os: Disambiguate File_system in ram_file_system.h.
According to clang there are two symbols which File_system can refer to:
1. namespace File_system from ram_fs/chunk.h.
2. Vfs::File_system class from  vfs/file_system.h.
Make it clear we refer to the File_system namespace in this case.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
fc089a1673 nic_dump: Remove unused Net::Interface::_alloc
This private member variable is not used anywhere in the code. This
breaks builds using clang instead of GCC. Drop the variable.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
428de89f9a nic_dump: Disambiguate "Interface" in component.cc.
Clang 12 complains that Interface can both refer to Genode::Interface
and Net::Interface in this case. Explicitly state the code refers to
the latter.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
30429a5228 nic_flood: Drop Dhcp_client::_alloc member.
This private member variable is not used anywhere in the code. This
breaks builds using clang instead of GCC. Drop it.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
e6a9e06f62 base-linux: Drop parentheses from .cfi_undefined.
According to GNU as manual the syntax of this directive is:
  .cfi_undefined register

The manual does not mention the register should be in parentheses.
This works in GNU as even when those are present, but unfortunately
clang integrated-as does not parse this correctly. Both GNU and
clang's integrated assembler work fine when the extra parentheses
are omitted.

Fixes #3986
2021-01-25 13:58:10 +01:00
Piotr Tworek
8b172bf22e base: Explicitly state ELF segment flags
The code in base-hw/src/bootstrap/platform.cc uses segment flags for
identification purposes. Based on this information the code decides
what to do with each segment. Unfortunately the linker script does
not actually ensure the flags for a specific named segment match
expectations. The code relies on implicit linker behaviour.
This implicit behaviour can vary between linkers. This breaks
arm_v7a base-hw builds linked with LLVM's lld linker. The segment
named "ro" ends up having writeable flag set when using LLD.

This patch ensures that all ELF segments in genode.ld have their
required perimssion flags set explicitly.

Fixes #3988
2021-01-25 13:58:10 +01:00
Piotr Tworek
80e8cf99e2 base: Make Genode::List clang friendly.
Clang is generally fine with Genode::List and compiles code using it
without emitting any warnings. There is however one exception. Clang
fails hard when building base-hw/src/core/kernel/object.cc.
This is due to a call to Genode::List::remove made from
Object_identity::invalidate function. The error message clang
produces is:

  list.h:96:33: error: 'Genode::List<Kernel::Object_identity_reference>::Element::_next'
  is not a member of class 'const Kernel::Object_identity'
                              _first = le->List::Element::_next;
                                           ~~~~~~~~~~~~~~~^

When we look at the declaration of the Kernel::Object class on which
the remove method is called. as expected it does inherit Genode::List:

using Object_identity_list
	= Genode::List<Kernel::Object_identity>;

class Kernel::Object : private Object_identity_list
{
...
}

Given the error message we see that List::Element should be resolved to
Genode::List<Kernel::Object_identity>::Element, and not
Genode::List<Kernel::Object_identity_reference>::Element. But how does
clang manage to figure out we're talking about Object_identity_refecence
list here? Well, I admit I don't know the exact steps it takes to arrive
at this conclusion, but it is not entirely wrong. If we take a look at
what Kernel::Object_identity is we'll see:

class Kernel::Object_identity
: public Object_identity_list::Element,
  public Kernel::Object_identity_reference_list
{
...
}

Where as one can guess Object_identity_reference_list is defined as:

using Object_identity_reference_list
	= Genode::List<Object_identity_reference>;

Long story short Kernel::Object has Genode::List of both Kernel::Object_identity
and Kernel::Object_identity_reference in its inheritance chain and clang
is not really sure to which of those the code refers to in
Genode::List::remove method by using List::Element::.

The fix for this is relatively simple, explicitly state the full type of
the base class the code intends to refer to. Replacing List::Element,
with List<LT>::Element makes the code buildable with both clang and GCC.

Fixes #3990
2021-01-25 13:58:10 +01:00
Alexander Boettcher
9d239957bc libc: update seek state on opening O_APPEND fds
If a fd is opened in append mode and just is to be used (so never written by
the parent component) for the to be forked child, the seek state was not
pointing to the end of the file.  The wrong seek value then was used in
File_descriptor_allocator::generate_info().

Issue #3991
2021-01-25 13:58:10 +01:00
Alexander Boettcher
5fa91c573b libc: update O_APPEND fds on joined child
The fds in O_APPEND state may have changed by the child. The local seek
state needs to be valid/current for the next to be forked child, which seek
state is set by File_descriptor_allocator::generate_info().

Issue #3991
2021-01-25 13:58:10 +01:00
Norman Feske
9bfd812a88 tool/run: search repos for run-tool plugins
This patch allows for supplementing the existing run-tool plugins with
additional plugins hosted inside a repository. E.g., it enables the run
tool to find world/tool/run/boot_dir/hw automatically.

Fixes #3993
2021-01-25 13:58:10 +01:00
Norman Feske
1ccf8a280c base-hw: simplify board support in external repo
Avoid use of REP_DIR in *.mk files to simplify the use of these files as
templates for a board hosted in a separate repository.

Use REP_INC_DIR for searching headers, thereby considering headers
hosted in an external repository.

Issue #3168
2021-01-25 13:58:10 +01:00
Stefan Kalkowski
f034f560be create_builddir: remove deprecated platforms
Fix #3996
2021-01-25 13:58:10 +01:00
Martin Stein
f45aa85e9f nic_router.run: fix redundant IPv4 subnets 2021-01-25 13:58:10 +01:00
Norman Feske
84443d6548 os: div_zero trace policy
This trace policy can be used as a fault-injection mechanism.
Once installed, the next time the traced thread passes a trace point
(e.g., RPC call, RPC request, ...), the policy produces a divide-by-zero
exception.
2021-01-25 13:58:10 +01:00
Norman Feske
a6a923c31b driver manager: restart intel_fb when frozen
This patch introduces heartbeat monitoring and automated restarting
of the intel framebuffer driver.
2021-01-25 13:58:10 +01:00
Norman Feske
f687d4824b sculpt: set lower bound for font size 2021-01-25 13:58:10 +01:00
Norman Feske
0a478dac7f pdf_view: tweaks for showing 16:10 slides
- Shave off two pixels on right, which are rendered white for no reason.
- Adjust resolution to make the slides fit vertically by default.
2021-01-25 13:58:10 +01:00
Norman Feske
5905e0a4a0 Road map for 2021 2021-01-25 13:58:09 +01:00
Martin Stein
d0ac8a6036 cbe_tester.run: use /tmp for image on autopilot 2021-01-25 13:58:09 +01:00
Stefan Kalkowski
bdd923406f base: remove SPEC variables of boards (fix #3971)
* Remove SPEC declarations from mk/spec
* Remove all board-specific REQUIRE declaratiions left
* Replace [have_spec <board>] run-script declarations with have_board where necessary
* Remove addition of BOARD variable to SPECS in toplevel Makefile
* Move board-specific directories in base-hw out of specs
2021-01-25 13:58:09 +01:00
Stefan Kalkowski
5a123e37c9 run: introduce have_board helper function
The new helper function returns a boolean value analoque to 'have_spec' if the
BOARD variable corresponds to the given value. It shall replace [have_spec <board>]
declarations in run-scripts.

Ref #3971
2021-01-25 13:58:09 +01:00
Christian Helmuth
6cfaac182a Remove Cpu_session::Native_cpu definition from API
This type can be a forward declaration in the public API because its
definition is required only in kernel-specific code.

Related to #3979
2021-01-25 13:58:09 +01:00
Christian Helmuth
3e73d8d7b6 drivers_nic-muen: permit Timer access in platform_drv 2021-01-25 13:58:09 +01:00
Pirmin Duss
a4d5687510 base-hw: allow out of tree imx8 platforms
Issue #3911
2021-01-25 13:58:09 +01:00
Alexander Boettcher
2b0170fb6a base-hw: ack thread capability on construction
Fixes #3982
2021-01-25 13:58:09 +01:00
Martin Stein
2d21d04c76 cbe_tester.run: raise timeout to 6 minutes 2021-01-25 13:58:09 +01:00
Martin Stein
f6d195a9de nic drivers: provide optional Uplink-client mode
In order to perform a smooth transition from NIC drivers that act only as NIC
session clients to NIC drivers that act only as Uplink session clients, this
commit introduces an intermediate state in which all NIC drivers support both
modes. That said, a NIC drivers mode is now statically determined through a new
optional 'mode' attribute in the drivers <config> tag that can be set to either
'nic_server' (default value) or 'uplink_client'. Reconfiguring this attribute
at a driver doesn't have any effects. Whithout this attribute being set, all
NIC drivers will behave the same as they did before the commit. When set to
'uplink_client', however, instead of providing a Nic service, they request
an Uplink session whenever their network interface becomes "UP" and close the
session whenever their network interface becomes "DOWN".

Ref #3961
2021-01-25 13:58:09 +01:00
Martin Stein
1d2649b49a nic_router: act as "Uplink" server
Let the NIC router provide an Uplink service besides the Nic service that it
already provided. Requests for an Uplink session towards the NIC router are
assigned to Domains using the same <policy> configuration tags that are used in
order to assign Nic session requests. The MAC addresses of Uplink session
components are _NOT_ considered during the allocation of MAC addresses for NIC
session components at the same Domain. The task of avoiding MAC address clashes
between Uplink session components and Nic session components is therefore left
to the integrator. Apart from that, Uplink session components are treated by
the NIC router like any other interface.

Ref #3961
2021-01-25 13:57:43 +01:00
Martin Stein
cf72d1aac3 os: introduce new "Uplink" session
Adds new Uplink session interface, the corresponding client side (Client,
Connection), and the corresponding API archives. An Uplink session is almost
the same as a NIC session with the difference that the roles of the end points
are swapped. An Uplink client is the one that provides a network interface
(for instance, a NIC driver) whereas an Uplink server is the one that uses
that network interface (for instance, a networking stack).

Therefore, in contrast to the NIC session, MAC address and link state come from
the Uplink client. The link state is reflected through the lifetime of an
Uplink session: The client requests the session only when the link state is
"UP" and closes it whenever the link state becomes "DOWN" again. The MAC
address is transmitted from the Uplink client to the Uplink server as an
argument of the session request.

Ref #3961
2021-01-25 13:48:09 +01:00
Martin Stein
9222463565 run/ping: support running manually on Linux
* Adds documentation how to prepare and finalize a Linux for running the
  scenario ontop of it
* Adds consideration of env variable 'ON_LINUX_WITH_DST_IP' that, if set,
  adapts the run script to running on Linux with the given ping destination IP

Ref #3961
2021-01-25 13:48:09 +01:00
Norman Feske
8ff75346dd sticks_blue_backdrop: inherit roms from backdrop
This patch moves the <content> <rom/> ... </content> declarations that
refer to pkg/backdrop to the runtime file of pkg/backdrop.

Issue #3981
2021-01-25 13:48:09 +01:00
Norman Feske
cae5d380c4 depot_query: inherit pkg rom content from deps
This patch relaxes the need to specify the rom content of all pkg dependencies
in each runtime file. Whenever a dependency features a runtime file, the
contained <content> <rom/> ... </content> nodes are implicitely included.

Fixes #3981
2021-01-25 13:48:09 +01:00
Alexander Boettcher
14d8627186 platform_drv: avoid using Register in Bdf type
Issue #3963
2021-01-25 13:48:09 +01:00
Alexander Boettcher
f358fcbda6 nova: flush Intel IOMMU caches
- when memory is detached

Issue #3963
2021-01-25 13:48:09 +01:00
Alexander Boettcher
b185f3fac1 platform_drv: add support to power PCI devices
- depending on available PCI power cap power off and on
- save and restore PCI bars if required
- reset PCI devices after power on if supported

Fixes #3963
2021-01-25 13:48:09 +01:00
Alexander Boettcher
5f7fe7498f platform_drv: add mmio delayer support
required after power on and function level reset

Issue #3963
2021-01-25 13:48:08 +01:00
Alexander Boettcher
c89864c830 platform_drv: add typesafe PCI config access
using Register_set && Register. It is derived from Genode::Mmio, however uses
as backend the Config_access implementation which is still used widely in
the platform driver.

Issue #3963
2021-01-25 12:51:54 +01:00
Alexander Boettcher
59fafac4d6 platform_drv: increase readability
by adding convenience functions to make code easier readable

Issue #3963
2021-01-25 12:51:54 +01:00
Alexander Boettcher
ebf7f8f599 platform_drv: introduce structured PCI BDF type
Replace explicit usage of bus, device, function arguments to methods or
variables all over the code by a single data type. It eases the reading of and
shorten the code.

Issue #3963
2021-01-25 12:51:54 +01:00
Norman Feske
f57519397b Remove Pd_session::Native_pd definition from API
This type can be a forward declaration in the public API because its
definition is required only in kernel-specific code.

Fixes #3979
2021-01-25 12:51:54 +01:00
Christian Helmuth
5ca3847c89 cbe_tester requires x86_64 currently 2021-01-25 12:51:53 +01:00
Norman Feske
eee8f64fd4 sculpt: fix dialog sizes with manual fonts config
Fixes #3976
2021-01-25 12:51:53 +01:00
Alexander Boettcher
0a5741f076 acpica.run: add acpi_hid evaluation support
Evaluate acpi_hid report in acpi_event

Showcase feature in acpica.run for FUJITSU FUJ02E3 and KEY_FN_F4.
2021-01-25 12:51:53 +01:00
Alexander Boettcher
1147f35972 acpica: add limited support for FUJ02E3 ACPI dev
The keys, mute, touchpad toggle (Fn-F4) and rfkill may be reported by some
Fujitsu machines via the ACPI FUJ02E3 ACPI device. With this commit limited
support to detect the 3 keys are added and will be reported as Genode report.
2021-01-25 12:50:55 +01:00
Norman Feske
d698e0876d window_layouter/decorator: drag-state corner cases
This patch complements the commit "nitpicker: defer hover changed while
dragging" with fixes of the window layouter and motif decorator.

- Handling of empty pointer model (after unhovering a decoration)
  instead of not updating it.

- Re-applying the hover model to the window layout when leaving the
  drag state. This addresses the corner case that the hover model
  changed during the drag operation (which is rightfully not handled
  while dragging).

- Letting the window layouter enter the drag state only if a dragged
  window is defined.

Issue #3973
2021-01-25 12:50:55 +01:00
Tomasz Gajewski
98798f18b5 Fix minor inconsistencies in mk files
Fixes #3972
2021-01-25 12:50:54 +01:00
Christian Helmuth
8bed4c1d54 base: support hexa-decimal values in ascii_to(long)
This aligns the behavior of ascii_to(long&) with the behavior of
unsigned integer types, e.g., when parsing XML nodes into signed long
variables.
2021-01-25 12:50:54 +01:00
Norman Feske
72801975cd nitpicker: defer hover changed while dragging
When holding at least one key or button, the hovering should never
change. In the previous version, this invariant was not enforced,
but the symptoms for eventual inconsistencies were masked by two
checkes: one when generating the hover report, and one when submitting
the leave event. This patch enforces the invariant by suppressing any
change of 'User_state::_hovered' while in dragged state.

Fixes #3973
2021-01-25 12:50:54 +01:00
Norman Feske
7266f29491 decorator: disable sync handling when idle
When idle, the decorator still consumes a bit of CPU time when triggered
by the GUI session's sync signal. This patch installs the sync handler
each time the decorator goes idle.
2021-01-25 12:50:38 +01:00
Norman Feske
2c82636a98 terminal: respond to font-size changes
Issue #3970
2020-12-23 13:38:39 +01:00
Norman Feske
d47f87a768 terminal: use GUI session directly
Issue #3196
Fixes #3970
2020-12-23 13:38:31 +01:00
Norman Feske
887fcecf63 base-linux: disable initramfs build on 32-bit
The build tries to access the host header asm/unistd.h, which is
apparently not present on 64-bit hosts (in particular our CI).
2020-12-18 09:11:25 +01:00
Christian Prochaska
0428e5e8b9 qt5: improve quickcontrols2 module support
Fixes #3968
2020-12-18 09:11:25 +01:00
Alexander Boettcher
0359ee6a76 sandbox: fix position scaling in affinity filter
During position scaling use the location width/height which is the permitted
dimension within the child space, instead of using the whole possible
child space. (Fixup for "init: scale affinity location" Issue #1412)

Thanks to the report by Peter.
2020-12-18 09:11:25 +01:00
Christian Helmuth
1bef11accf depot: update recipe hashes 2020-12-18 09:10:52 +01:00
Alexander Boettcher
c5de2acf57 vm_session(x86): support cstar register
Fixes #3964
2020-12-09 14:02:12 +01:00
Norman Feske
9189342b77 base-okl4: coding style 2020-12-09 14:02:11 +01:00
Norman Feske
abd688097a base-fiasco: coding style 2020-12-09 14:02:11 +01:00
Norman Feske
6930372d55 base-foc: remove stale README content 2020-12-09 14:02:11 +01:00
Martin Stein
a124f5b88d nic_router: support and show-case disabling arp at a domain
* Introduce 'use_arp' configuration flag at the NIC router in order to disable
  requesting IP-to-MAC address resolutions via ARP for domains.
* Add automated run/nic_router_disable_arp test to the autopilot that tests
  the effect of the new flag
* Document the new flag and the new test in the NIC router README

Fixes #3935
2020-12-09 14:02:11 +01:00
Sebastian Sumpf
0beda6bca4 dde_linux: USB MBIM modem driver support
Thise driver supports USB LTE modems for Huawais' ME906s through MBIM
and provides a traditional Nic session. The "control" interface is a
Terminal session, which can be used via libmbim/mbimcli.

issue #3822
2020-12-09 14:02:11 +01:00
Norman Feske
a0fb944721 Propagate session diag flag to core
This commit restores the diag feature for selecting diagnostic output of
services provided by core. This feature became unavailable with commit
"base: remove dependency from deprecated APIs", which hard-wired the
diag flag for core services to false.

To control this feature, three possible policies can be expressed in a
routing target of init's configuration:

* Forcing silence by specifying 'diag="no"'
* Enabling diagnostics by specifying 'diag="yes"'
* Forwarding the preference of the client by omitting the 'diag'
  attribute

Fixes #3962
2020-12-09 14:02:11 +01:00
Sebastian Sumpf
36eeab6df2 dde_linux: usb support extra data and zero config
- Vendor devices add addtional data to the config descriptor, read and
  added to the usb session
- allow '0' configuration within the usb session

issue #3822
2020-12-09 14:02:11 +01:00
Sebastian Sumpf
537472e9af libports: ffi for ARM_64
Required by 'glib'

issue #3822
2020-12-09 14:02:10 +01:00
Christian Helmuth
496dc5508f usb_hid: support for Apple HID devices
Issue #3953
2020-12-09 14:02:10 +01:00
Christian Helmuth
2a659cb750 usb_hid: support for Holtek-based mice fixups
This enables USB mice based on the Holtek chipsets, which need USB
descriptor fixups. An example mouse is the Sharkoon Drakonia.

Issue #3953
2020-12-09 14:02:10 +01:00
Alexander Boettcher
b097e598f1 usb_hid: use heap instead of dma/mem allocator
The usb_hid driver does not need to distinguish between
normal memory and DMA capable memory, since all requests are routed via the
USB raw session to the usb host driver. The default Malloc implementation
implements this distinction, however exposes restrictions on the size of
allocations. As seen now by several USB HID devices, the size of device
driver allocations depend on read out hardware features and can be
larger than we support with our specialized default Malloc implementation.

Since we don't need this functionality, switching to an well
tested allocator (Heap) which can cope with varying sizes of allocation,
we can mitigate the size restriction.

Fixes #3953
2020-12-09 14:02:10 +01:00
Alexander Boettcher
2c639169fd dde_linux: use linux memory primitives in impl/usb
Issue #3953
2020-12-09 14:02:10 +01:00
Martin Stein
bad8caee3f nic_router: support multiple DHCP option 6 entries
* The NIC router now considers, memorizes, and, if configured, reports
  multiple DHCP option 6 entries from DHCP replies that it received as DHCP
  client
* A DHCP server at the NIC router can now be configured statically with
  multiple DNS server addresses to propagate
* The 'dns_server_from' attribute of the DHCP server of the NIC router now
  supports the forwarding of multiple DNS server addresses
* The automated run/nic_router_dhcp test tests all the above mentioned new
  functionality and reconfiguring it at runtime. The test was added to the
  autopilot.
* All run scripts were adapted to fit the new NIC router configuration
  interface

Fixes #3952
2020-12-09 14:02:10 +01:00
Emery Hemingway
306466fc60 libc: always set argv and envp to valid arrays
The arrays passed to main(…) must always be valid null-terminated arrays.

Fix #3955
2020-12-09 14:02:10 +01:00
Martin Stein
063e4bd072 remove remnants of 'virtualbox_nic_router' test
Ref #3952
2020-12-09 14:02:10 +01:00
Martin Stein
e14b58a82c net/dhcp.h: more specific include guards
Ref #3952
2020-12-09 14:02:10 +01:00
Martin Stein
8d8edaea5d nic_router: fix link state on dhcp server reconfig
When reconfiguring the NIC router modifies the information that DHCP clients
received through a DHCP server of the NIC router, the link state of the
correspodning interface has to do a "down-up" sequence. This provides a signal
to the DHCP clients to redo DHCP, receive the new information and update
accordingly.

Fixes #3931
2020-12-09 14:02:10 +01:00
Martin Stein
b0327d0544 nic_router: preserve session link state until read
See the NIC router README paragraph "Behavior regarding the NIC-session link
state" for further information.

Ref #3931
2020-12-09 14:01:42 +01:00
Martin Stein
a7b878cbb5 nic_router: allow for config values of 0 seconds
Ref #3931
2020-12-09 14:01:42 +01:00
Martin Stein
7ac6f93838 nic_router: clean up init of configuration members
Ref #3931
2020-12-09 14:01:42 +01:00
Norman Feske
70ff3d9c90 base-foc: coding style
- Cosmetic adjustments according to
  https://genode.org/documentation/developer-resources/coding_style

- Replace manual inclusion of kernel headers by one new compound
  header foc/syscall.h

- Rename namespace Fiasco to Foc
2020-12-09 14:01:42 +01:00
Norman Feske
0209a2465d base-foc: update cap_integrity.run 2020-11-28 19:37:15 +01:00
Alexander Boettcher
b6408cec1c ssh_terminal: close terminal fd in pthread context
Issue #3682
2020-11-27 14:40:41 +01:00
Christian Helmuth
3fac8b106d version: 20.11 2020-11-27 14:01:47 +01:00
Norman Feske
5c27270b17 News item for version 20.11 2020-11-27 13:57:55 +01:00
Norman Feske
3f15d18392 Release notes for version 20.11 2020-11-27 13:57:54 +01:00
Christian Helmuth
f2e0c164c2 depot: update recipe hashes 2020-11-27 09:21:06 +01:00
Norman Feske
d672e95090 doc: update components.txt 2020-11-27 09:19:09 +01:00
Norman Feske
98211db63d doc: move release notes to sub directory
This keeps the doc/ directory tidy and neat.
2020-11-27 09:19:09 +01:00
Sebastian Sumpf
722254f864 dde_rump: Set '-fcommon' for rump host tools
GCC 10 has `-fno-common` as default which leads to multiple definitions of
of symbols.

Fixes #3960
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
b907629341 sculpt: add basic support for i.MX8 Quad EVK
* Introduce CPU quota for driver subsytem (needed by sd_card_drv)
* Introduce CPU quota for runtime subsytem and nic_drv (needed by fec_nic_drv)
* Increase CAP quota for inspect terminal slightly
* Add sculpt packages for imx8q_evk

Fix #3958
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
22852f2e50 sculpt: move pc-specifics away from generic part
* Introduce sculpt-[board] specific package
* Move rtc driver into managed drivers sub-system
* Name nic_drv in a generic fashion in sculpt_manager
* Copy over pc-specific config files only when building for PC

Ref #3958
2020-11-27 09:19:09 +01:00
Christian Prochaska
e22e2540ee qt5: add Qt5Xml library
Fixes #3959
2020-11-27 09:19:09 +01:00
Alexander Boettcher
78ab3c8db5 usb: avoid memset on failed memory allocation
Issue #3953
2020-11-27 09:19:09 +01:00
Alexander Boettcher
ffdd49f9ce platform_drv: free ever non PCI devices on close
Fixes #3957
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
0cbd1d1b7c os: adjust sd_card_drv to use platform API
Fix #3956
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
f4ac642f64 platform_drv: reset pointer when releasing device
Ref #3956
2020-11-27 09:19:09 +01:00
Martin Stein
955afd8837 ada runtime: support image of enums
Ref #3937
2020-11-27 09:19:09 +01:00
Norman Feske
9b544787bd base: make Affinity::Space::location_of_index const 2020-11-27 09:19:09 +01:00
Alexander Boettcher
774b1f4277 base: remove Thread_deprecated
Fixes #3954
2020-11-27 09:19:08 +01:00
Josef Söntgen
dbcb1ff480 ssh_terminal: flush before closing connection
Originally the outgoing buffer was flush when the terminal was
detached. Since we cannot do that at this point, make the flushing
part of the common cleanup procedure.

Issue #3682.
2020-11-27 09:19:08 +01:00
Josef Söntgen
551b17591c ssh_terminal: handle detached term in event loop
Rather than calling 'ssh_disconnect' from within the Terminal session,
flag the detached terminal in the session and let the event loop do the
cleanup. Otherwise it might happen that the 'ep' (handling the Terminal
session) as well as the 'pthread.0' (executing the ssh event loop) end
up both triggering the cleanup concurrently.

Issue #3682.
2020-11-27 09:19:08 +01:00
Josef Söntgen
51a50ece60 libc: guard select call in socket_fs with monitor
Issue #3682.
2020-11-27 09:19:08 +01:00
Norman Feske
0dcb526ae5 base-linux: coding style 2020-11-27 09:19:08 +01:00
Christian Helmuth
dc016cbd5c ldso: log linker-area info on 'ld_verbose' 2020-11-27 09:19:08 +01:00
Christian Prochaska
e5f442f2d3 qt5: use integrated virtual keyboard in example application
Fixes #3949
2020-11-27 09:19:08 +01:00
Piotr Tworek
5db2971903 base-hw/arm_v7a: Mark r1 as out in Kernel::call64
In case of arm_v7a Kernel::call64 the syscall will use both r0 and r1 as
output registers. Unfortunately the inline asm does not reflect this and
only r0 is explicitly specified as output. GCC manages to produce output
which we'd like to see. Clang on the other hand takes adventage of the fact
r1 should not be touched by swi and produces fewer instructions which do
what the code describes, but not what we actually want.

Basically the code which we want and is generated by GCC is:
  svc     0
  mov     r2, r0
  mov     r0, r1
  mov     r1, r2
  bx      lr

Clang on the other hand generates correct assembly given the code, but
incorrect given what the function is supposed to do:
  svc     0
  mov     r1, r0
  mov     r0, #0
  bx      lr

Both GCC and clang generate the same, expected assembly output when r1
is marked as output register from the inline asm swi call.

Fixes #3951
2020-11-27 09:19:08 +01:00
Alexander Boettcher
aa7f5bc95f os: add cpu balancer component
Issue #3843
2020-11-27 09:19:08 +01:00
Alexander Boettcher
6872fdb0de cpu_burner: utilize all assigned CPUs
Issue #3843
2020-11-27 09:19:08 +01:00
Piotr Tworek
48220dfd9b os: Add missing {} around sub-object initializers.
Clang complains when a sub-object is initialized without {}.

Issue #3950
2020-11-27 09:19:08 +01:00
Piotr Tworek
50ab86cd72 base-hw: Remove unused rdtsc function for x86_64
This function has no callers. Clang warns about this.

Issue #3950
2020-11-27 09:19:08 +01:00
Piotr Tworek
cc7de65c9e nitpicker: Remove unused hover_reported variables
Fix for unused private member variable warning reported by clang.

Issue #3950
2020-11-27 09:19:08 +01:00
Piotr Tworek
cc193a9155 base: drop Trace::Session_component::_parent_levels
Clang correctly asserts this private member variable is not used
anywhere in the code. I'm not sure what the intention of the code is,
might be this is a part of some unfinished feature. This patch just does
the minimum amount of work to allow the code to build with clang. If
required I can also drop the parent_levels constructor argument and
clean up the call sites.

Issue #3950
2020-11-27 09:19:08 +01:00
Piotr Tworek
c0309a634e base: Silence unused arg warning in rpc_server.h
The msg argument in Genode::Rpc_dispatcher::_read_arg is not used. GCC
does not care about this, but clang does and prints a warning regaring
this. Silence it by removing unused argument name.

fixup! base: Silence unused arg warning in rpc_server.h
2020-11-27 09:19:08 +01:00
Martin Stein
30b8f4efc8 gems: import Genode-specific code of the CBE
The CBE repository contained a lot of Genode-specific code despite the fact
that the CBE core logic is not bound to Genode in any way. Therefore the
Genode-specific CBE code is moved to the 'gems' repository to form part of
Genode mainline. The remaining CBE code becomes a port in Genode instead of
being invoked as sub-repository.

The commit combines the following work steps:

* add all files removed from CBE repository
* add CBE port files
* make all CBE libs and targets build again
* make all CBE run scripts succeed again
* make all CBE recipes build again
* make CBE autopilot succeed again
* let CBE autopilot use 'libsparcrypto' contrib dir and Genode build dir
  instead of '.ci' dir in CBE contrib dir (remove '.ci' dir from CBE repo)
* let CBE autopilot always check for all ports
* make CBE autopilot directly executable
* fix license headers in all Genode CBE files
* remove unused VFS replay component
* remove unused CBE test
* remove unused external crypto
* remove unused files in run dir
* remove unused external trust anchor
* add cbe_tester test to autopilot list
* get rid of directories 'include/cbe_*' and 'include/utils'

Fixes #3937
2020-11-27 09:19:08 +01:00
Alexander Boettcher
24181f2bf6 driver_manager: use componentized usb driver
Fixes #3943
2020-11-23 12:03:00 +01:00
Alexander Boettcher
fae3c12366 usb: skip reporting of incomplete init. usb device
Fixes #3944
2020-11-23 12:03:00 +01:00
Stefan Kalkowski
4e90dc4512 dde_linux: adjust fec_nic_drv to use platform_drv
Fix #3947
2020-11-23 12:03:00 +01:00
Alexander Boettcher
a4c7837fb3 Update to bender with optional microcode and HWP
plugin support.

Fixes #3871
2020-11-23 12:03:00 +01:00
Christian Prochaska
764ab3be20 qt5: use libc 'posix_memalign()' in qtwebengine
Fixes #3916
2020-11-23 12:03:00 +01:00
Alexander Boettcher
c6a2e287d0 trace: forward exceptions during construction
The control area is constructed during session creation and the caller can
handle the Out_of_* exception by increasing the quota by the next attempt.

Fixes #3917
2020-11-23 12:03:00 +01:00
Emery Hemingway
d16a1bd922 vfs_lwip: log warning when blocking application
Log a warning when the lwIP VFS plugin queues a read while waiting
for an interface to become ready. By comparision the Lxip plugin
has the same behavior but a more verbose initialization process.

Fix #3920
2020-11-23 12:03:00 +01:00
Alexander Boettcher
b7ba508110 nova: update to kernel supporting AMD IO-MMU
Fixes #3928
2020-11-23 12:03:00 +01:00
Alexander Boettcher
d9cde328cb acpi: support amd iommu detection
Issue #3928
2020-11-23 12:03:00 +01:00
Alexander Boettcher
6b20a6bc7c tool: add hint how to enable vga console in nova
Issue #3928
2020-11-23 12:03:00 +01:00
Alexander Boettcher
95c2e5beb3 run: extend pci test to show more information
Add some more vendors and classcode decoding. Additionally, walk PCI cap
space of each device and decode some of the types.

Issue #3928
2020-11-23 12:03:00 +01:00
Josef Söntgen
194305a8bb dde_bsd: apply HP sense quirk for Fujitsu S398
This quirk is needed for properly switching between the internal and
an external headphone.

Thanks to Peter for the patch.

Issue #3929.
2020-11-23 12:03:00 +01:00
Josef Söntgen
b6912a3d87 dde_bsd: query initial head-phone state
Account for the situation where the driver is started while the HP
is already plugged in and configure the mixer accordingly.

Thanks to Peter for the patch.

Issue #3929.
2020-11-23 12:03:00 +01:00
Josef Söntgen
1b4444ce9e dde_bsd: use right member for iterating mixer set
Due to what seems like a copy-and-paste error, the wrong union member
was used to compare the label. Fortunately, as both structs have the
same memory layout that did not result in any issue.

Issue #3929.
2020-11-23 12:03:00 +01:00
Josef Söntgen
b9869b666a dde_bsd: use bsd_task to handle I/O
Originally, the kernel code should have been executed within the
context of the main task like it is done in dde_linux. The initial
port of the HDA driver, however, did not required doing so and the
session called code directly.

When using USB device, that is no longer possible as we have to
suspend the execution during the execution of the kernel code. So
we pass in the audio data and schedule the kernel.

Fixes #3929.
2020-11-23 12:03:00 +01:00
Josef Söntgen
cd7c99afdc dde_bsd: implemented delayed session announcement
This becomes necessary in case of the USB audio driver where we have
to wait for and query the function first.

That being said, alternatively we could also announce the session but
ignore any request until there is a device we can use.

Issue #3929.
2020-11-23 12:02:59 +01:00
Josef Söntgen
2ec398e550 dde_bsd: use timeout framework for time handling
With this commit the timer back-end uses the timeout framework to
schedule any occuring timeouts and for providing the current time.
For now there is only one timeout, the unsolicited azlia codec event
and therefore the timeout queue consists of solely one timeout object.

In addition a timer session is used for implementing 'delay()' where
we have to block until the delay is completed.

Issue #3929.
2020-11-23 12:02:59 +01:00
Josef Söntgen
bdb71d94c2 dde_bsd: pull strlcpy in via contrib code
For historical reason the 'strlcpy' implemention was directly pull in
into the emulation environment. There is, however, no reason not to
use the contrib sources in the usual fashion.

Issue #3929.
2020-11-23 12:02:59 +01:00
Josef Söntgen
7193902cc0 dde_bsd: properly name PCI audio driver component
Instead of the generic name, call the PCI driver 'pci_audio_drv'.

This is preliminary clean-up work before introducing the USB audio
driver.

Issue #3929.
2020-11-23 12:02:59 +01:00
Josef Söntgen
3faf5c43a8 dde_bsd: seperate PCI back end
The supported drivers so far exclusively used PCI and for practical
reasons the emulation environment was to tied to. To make future
addition of drivers that employ other transport busses easier, split
the bus handling into its own backend.

This is preliminary clean-up work before introducing the USB audio
driver.

Issue #3929.
2020-11-23 12:02:59 +01:00
Josef Söntgen
6c7f0cb7cc dde_bsd: properly enable recording in run script
* Updating the run script was missed in commit "dde_bsd: remove
    configration attributes".

  * Decrease output and input volume to "more sane" levels.

Issue #3929.
2020-11-23 12:02:59 +01:00
Josef Söntgen
54d36a7d1b mixer: apply config on new sessions
Updating the config and using its settings instead of only reporting
the new session allows to apply stored channel settings immediately.

In case of Sculpt this is useful when an existing launcher already
contains a valid config that sets the volume levels appropiately or
the 'recall_fs' is used.

Fixes #3930.
2020-11-23 12:02:59 +01:00
Martin Stein
9b164d20fd vfs directory service: name enum Open_mode
Fixes #3936
2020-11-23 12:02:59 +01:00
Alexander Boettcher
cd8b436566 usb_hid: avoid destruction of used signal handler
Fixes #3945
2020-11-23 12:02:59 +01:00
Piotr Tworek
87e90d640f base-linux: Drop unused member variables
The _root, _gid and _uid private member variables are not used for
anything. GCC does not care, but clang likes to complain about things
like this.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
db71cb8c63 base-linux: Drop ununsed Message::_addr
Not used anywhere in the current codebase. GCC does not care but clang
warns about this.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
a892018926 base-hw: Define Entry function as noreturn.
Right now the code marks specific instance of this function as noreturn.
It then tries to initialize it using a value that has the same type,
except for the noreturn part. GCC does not care, but clang complains this
technically assigns the value of entry from incompatible pointer type.

Fix this by defining Entry function as no return.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
1643d623e4 base-hw: Fix warning about unused lambda capture
The lambda function passed to Board::Vm_page_table_array does not
actually use "this" for anything. GCC does not warn about this, but
clang does. Remove the extra capture to make clang happy.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
9b84a8a402 base-hw: Add semicolons after [[fallthrough]]
GCC doesn't care, but clang complains if [[fallthrough]] is not followed
by a semicolon. Existing code is also not consitent in this regard. Lets
just fix it to make clang happy.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
db17d51ff1 os: Drop unused _tree member in Root_clock_divider
Its not used anywhere in the code. Clang produces warning due to this.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
736b000c19 os: Drop ununsed Main::_id_id variable in ping
The variable is not used anywhere in the code. This produces warning
when building with clang.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
187b8ece27 os: Drop ununsed Virtdev_rom::Root::_env member
Set but not accessed from anywhare. This triggers compilation warning
when building the code with clang.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
93288bccb3 os: Refer to ::Sandbox::Child explicitly.
When compiling this code, clang complains reference to 'Sandbox' is
ambiguous. It can either mean ::Sandbox namespace from
os/src/lib/sandbox/types.h, or Genode::Sandbox declared in
repos/os/include/os/sandbox.h. Since the code refers to ::Sandbox::Child
and its already in ::Sandbox namespace we can just drop "Sandbox" and
refer to just Child, which makes clang happy.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
444bc18fcf base: Drop unused Cpu_root::_md_alloc member
This private variable has no uses in the context of the class. Spotted
when building the code with clang.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
18be6315cb base: Drop unused _ram member variable
Its initialized in constructor but never used. Spotted when building the
code with clang.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
9c3ce58e57 base: Drop unused "verbose" variable
Spotted when building the code with clang. This is not used anywhere in
the file.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
d4a3aa7eda base: explicit copy constructor for Rpc_in_buffer
According to the "rule of three" [1] and C++11 [2] Rpc_in_buffer needs
to have an explicit copy constructor since it also has user defined
copy assignment operator. Both clang and newer versions of GCC complain
about this.

[1] https://en.cppreference.com/w/cpp/language/rule_of_three
[2] https://www.ece.uvic.ca/~frodo/cppdraft/n4659/html/depr.impldec

Issue #3938
2020-11-23 12:02:58 +01:00
Piotr Tworek
8d6ca9556f base: fix clang warning for void cast of retval
This path fixes a void cast used to silence unused return value warning.
Its a common pattern to use void cast to do that. The code uses void *
cast instead. It works for GCC, but clang complains about this.

Issue #3938
2020-11-23 12:02:58 +01:00
Piotr Tworek
81a49bffee base: exception specification for operator delete
Clang is rather picky about this and prints the following warning when
compiling new_delete.cc:

  error: function previously declared with an explicit exception
  specification redeclared with an implicit exception specification
  [-Werror,-Wimplicit-exception-spec-mismatch]

Issue #3938
2020-11-23 12:02:58 +01:00
Piotr Tworek
53a990579b base: Fix UAF in Genode::Pd_session_component::free
This was discovered when building the code with clang instead of GCC. In
this setup the run/ping on base-hw/arm_v8a/virt_qemu would crash
on shutdown due to uncaught Deref_unconstructed_object exception thrown
for Genode::Reconstructible<Genode::Account<Genode::Ram_quota>>. The
specific instance throwing this exception was
Pd_session_component::_ram_account. My investigation exposed the
following problem:

1. The Pd_session_component has a _sliced_heap member backed by
   _constrained_ram_alloc which in turn uses Pd_session_component itself
   as its Ram_allocator.
2. When ~Pd_session_component is called it first destroys _ram_account,
   followed by _signal_broker.
3. The signal broker holds a reference to
   Pd_session_component::_sliced_heap as Signal_broker::_md_alloc.
4. The base-hw implementation of ~Signal_broker destroys some contexts
   and does this by calling Genode::destroy on some slabs using the
   _md_alloc (ref to Pd_session_component::_sliced_heap).
5. The Genode::Slab calls the Ram_allocator::free which ends up calling
   Pd_session_component::free.
6. The Pd_session_component::free can among other things call replenish
   method on Pd_session_component::_ram_account which has already been
   freed at this point.

From my POV calling replenish at this point is basically an undefined
behavior. The Genode::Constructible holding the Genode::Account was
already detroyed at this point. GCC builds happen to somehow manage to
go through the -> operator call without raising any alarms, while clang
builds trip on the _check_constructed() call.

This fix moves the _ram_account a bit higher in class declaration to
ensure its destroyed after _sliced_heap. This seems like the simpliest
solution for this problem.

Fixes #3941
2020-11-23 12:02:58 +01:00
Christian Helmuth
a8d3cd9b15 libc: open socket files early on socket creation
This prevents later file-descriptor shortage when opening files on
demand, which can't be reflected to the application in a sane manner.

The real fix is to open socket files not on libc level but on VFS level
only effectively consume one libc file descriptor for one socket.
2020-11-23 12:02:58 +01:00
Christian Helmuth
5dfca79bcc libc: use pthread mutex in getifaddrs() 2020-11-23 12:02:58 +01:00
Christian Prochaska
ff429a8056 base-linux: build 'lx_iopl()' function on x86 only
Fixes #3934
2020-11-23 12:02:58 +01:00
Christian Prochaska
eafbfb8edf base-linux: socket descriptor caps for RPC (BOARD=pc)
Fixes #3932
2020-11-23 12:02:58 +01:00
Christian Prochaska
b72503e581 base-linux: remove 'lx_ioperm()' function
Fixes #3933
2020-11-23 12:02:58 +01:00
Stefan Kalkowski
429cd8d37a os: enable smp support for ARM vmm
* Fix GIC model to support priority and cpu target settings correspondingly
* Fix semantic of SGIR register for GICv2
* Minor GIC model IRQ state fix
* Introduce synchronization for VirtIO and GIC models
* Enable multiple CPUs in test run-script for ARMv8

Fix #3926
2020-11-23 12:02:58 +01:00
Stefan Kalkowski
6be09a27ca os: minor fix terminal_expect_send test-component
When an empty line was send, it could occur
that a previous line got printed instead.

Ref #3926
2020-11-23 12:02:58 +01:00
Stefan Kalkowski
7298b00013 base-hw: make ARMv7/v8 hypervisor smp ready
* Introduce hypervisor-stack per CPU
* Introduce host world context per CPU
* Mark EL2 translation table memory as inner shareable
* The VMID is not bound to a single VCPU, but to the Vm_session as a whole
* Set affinity of the VCPU accordingly
* Add VMPIDR to VM state

Ref #3926
2020-11-23 12:02:58 +01:00
Stefan Kalkowski
1d826a2c48 base-hw: do direct syscall when run/pause a VCPU
Instead of calling core to run/pause a VCPU, go directly to the kernel.
Apart from the performance win, it would otherwise involve a more complex
protocol, when a VCPU on another core has to be removed from the scheduler.
Core's entrypoint handling those request runs on the boot-cpu only.

Ref #3926
2020-11-23 12:02:58 +01:00
Stefan Kalkowski
40445d7011 base: extend vm_session API with native vcpu cap
To enable the interaction of a VMM with the kernel directly,
a hidden RPC gets introduced. It allows a kernel-specific
base-library implementation of the Vm_session::Client to request
a kernel-specific capability to address a VCPU, e.g., to
run/stop it.

Ref #3926
2020-11-23 12:02:58 +01:00
Alexander Boettcher
11e261ada4 platform_drv(x86): use 32bit writes for MSI-X
Fixes #3927
2020-11-23 12:02:57 +01:00
Christian Helmuth
c93f3a1136 libusb: establish/terminate USB session
Now, the USB connection is established on backend initialization and
terminated on backend exit triggered by high-level libusb code.

Thanks to Peter for the patch.
2020-11-23 12:02:57 +01:00
Christian Helmuth
e339dd542c Prevent warning in test-pthread 2020-11-23 12:02:57 +01:00
Christian Helmuth
3d23c8c419 libports: update curl download location 2020-11-23 12:02:57 +01:00
Martin Stein
89d28c8222 timeout: no volatile stackvars, better warnings 2020-11-23 12:02:57 +01:00
Christian Prochaska
dff3bac441 libc: submit monitor execution signals locally
Issue #3924
2020-11-23 12:02:55 +01:00
Christian Prochaska
798beab30e base: support process-local signal submission
Issue #3923
2020-11-23 12:02:53 +01:00
Christian Prochaska
50e0f3b977 base: don't throw exceptions in 'Signal_receiver::pending_signal()'
Issue #3922
2020-11-23 12:02:49 +01:00
Josef Söntgen
f754e2a7d7 stdcxx: add symbols needed by testsuite
Fixes #3921
2020-10-23 15:12:06 +02:00
Josef Söntgen
1dd1bfe692 stdcxx: add new/delete aligned variants (C++17)
Issue #3921
2020-10-23 15:08:40 +02:00
Josef Söntgen
a74b572e1f stdcxx: force symlinks to allow for re-preparing
Issue #3921
2020-10-23 14:59:56 +02:00
Josef Söntgen
a24911296a stdcxx: adapt header files for testsuite
Issue #3921
2020-10-23 14:59:49 +02:00
Josef Söntgen
563cc07cb0 libports: posix src archive implements posix API
Issue #3921
2020-10-23 14:58:27 +02:00
Josef Söntgen
59f562f627 libc: add symbols needed by testsuite
Issue #3921
2020-10-23 14:58:04 +02:00
Josef Söntgen
4981eb425e ld: add symbols needed by testsuite
Issue #3921
2020-10-23 14:58:01 +02:00
Josef Söntgen
de8411a5e1 cxx: add missing low-level symbols
Issue #3921
2020-10-23 14:56:36 +02:00
Christian Helmuth
5be1c793a5 depot: update recipe hashes 2020-10-23 14:16:38 +02:00
Emery Hemingway
b4076e762c libc: log a message and exit for raise(...)
Fix #3919
2020-10-21 09:14:55 +02:00
Christian Helmuth
6ea628195f dde_bsd: update mirror URL
It seems RWTH Aachen mirrors only ancient versions currently.
2020-10-20 09:14:40 +02:00
Martin Stein
64487ded7c timeout: don't warn "timestamp value too big" too often
Fixes #3657
2020-10-19 14:26:56 +02:00
Christian Prochaska
405955eaef libc: implement 'posix_memalign()'
Fixes #3915
2020-10-15 15:41:55 +02:00
Alexander Boettcher
0aaed47652 nova: re-/store ep fpu state in vm_session
Fixes #3913
2020-10-13 14:42:06 +02:00
Alexander Boettcher
20606bc6de foc: save/restore fpu state in vm_session
Issue #3913
2020-10-13 14:42:03 +02:00
Christian Prochaska
9cd38a6846 libc: rwlock cleanup
Issue #3912
2020-10-13 14:38:43 +02:00
Christian Prochaska
bf4afefaa1 libc: use semaphore in rwlock implementation
Fixes #3912
2020-10-13 08:21:04 +02:00
Christian Helmuth
f09b0dc224 Improve synchronization in lwip.run
The lynx HTTP GET test was started before the HTTP server was up and
therefore failed on Qemu/PBXA9.

Issue #3874
2020-10-09 16:13:14 +02:00
Christian Prochaska
658030ef49 qt5: update port for qtwebengine improvements
- unlink shared memory files
- lower maximum number of socket pool sockets to reduce chance of file
  descriptor exhaustion
- fix a build dependency which caused sporadic parallel build errors

Fixes #3910
2020-10-09 13:51:26 +02:00
Christian Prochaska
4e8bfed5b1 libc: duplicate the file descriptor on shared 'mmap()' mappings
Fixes #3909
2020-10-09 13:50:35 +02:00
Christian Prochaska
5c47fa0d41 libc: reduce file descriptor lookup exceptions in 'select()'
Fixes #3908
2020-10-09 13:48:23 +02:00
Christian Prochaska
058f2e687c libc: make 'mmap()' address alignment configurable
With this commit, the alignment of anonymous 'mmap()' allocations can be
configured like this:

<config>
  <libc>
    <mmap align_log2="21"/>
  </libc>
</config>

Fixes #3907
2020-10-09 13:47:33 +02:00
Josef Söntgen
7d21335ac9 vfs/oss: VFS plugin for Audio_out access via files
This plugin gives access to the Audio_out session by roughly
implementing a OSS pseudo-device. It merely wrapps the session and does
not provide any resampling or re-coding.

Fixes #3891.
2020-10-09 13:44:27 +02:00
Josef Söntgen
3d2b0cab93 libc: implement SNDCTL I/O control handling
In the same vein as the terminal and block I/O controls, the sound
controls are implemented via poperty files and match the OSS
API ([1] features a nice overview while [2] is v3 and [3] gives
in-depth information on the current v4.x API we eventually might want
to implement).

  [1] https://wiki.freebsd.org/RyanBeasley/ioctlref/
  [2] http://www.opensound.com/pguide/oss.pdf
  [3] http://manuals.opensound.com/developer/

The controls currently implemented are the ones used by the cmus OSS
output plugin, which was the driving factor behind the implementation.
It uses the obsolete (v3) API and does not check if the requested
parameter was actually set, which should be done according to the
official OSS documentation.

At the moment it is not possible to set or rather change any
parameters. In case the requested setting differs from the parameters
of the underlying Audio_out session - in contrast to the suggestion in
the OSS manual - we do not silently adjust the parameters returned
to the callee but outright fail the I/O control operation.

The following list contains all currently handled I/O controls.

  * SNDCTL_DSP_CHANNELS sets the number of channels. We return the
    available channels here and return ENOTSUP if it differs from
    the requested number of channels.

  * SNDCTL_DSP_GETOSPACE returns amount of playback data that can
    be written without blocking. For now it amounts the space left
    in the Audio_out packet-stream.

  * SNDCTL_DSP_POST forces playback to start. We do nothing and return
    success.

  * SNDCTL_DSP_RESET is supposed to reset the device when it is
    active before any parameters are changed. We do nothing and return
    success.

  * SNDCTL_DSP_SAMPLESIZE sets the sample size. We return the
    sample size of the underlying Audio_out session and return ENOTSUP
    if it differs from the requested number of channels.

  * SNDCTL_DSP_SETFRAGMENT sets the buffer size hint. We ignore the
    hint and return success.

  * SNDCTL_DSP_SPEED sets the samplerate. For now, we always return
    the rate of the underlying Audio_out session and return ENOTSUP
    if it differs from the requested one.

This commit serves as a starting point for further implementing the
OSS API by exploring more users, e.g. as VirtualBox/Qt5/SDL2 audio
backend or a more sophisticated progam like sndiod.

Issue #3891.
2020-10-09 13:44:14 +02:00
Christian Helmuth
bcf1cc6397 Ensure high priority for timer in test.run 2020-10-09 13:37:17 +02:00
Martin Stein
bff624c75a test/entrypoint: extend timeout interval
At least on some PIT-based platforms (x86_32 + pistachio/okl4/sel4), we run
into trouble with the reworked timeout framework that now proccesses all
pending timeouts before calling their handlers. This order change leads to a
higher rate of handling of short periodic timeouts in the timer driver which
can cause lower prioritized components to starve. Especially, if submitting
signals (from timer to client) isn't cheap (as is the case on qemu + pistachio
for example).

Issue #3884
2020-10-09 13:37:14 +02:00
Martin Stein
512be0a52a test/timer_rate: determine lowest accurate period 2020-10-09 13:37:10 +02:00
Christian Helmuth
91f8281618 depot: update recipe hashes 2020-10-09 13:35:57 +02:00
Christian Prochaska
0e01729d77 libc: handle file descriptor allocation errors
Fixes #3906
2020-10-09 13:35:57 +02:00
Sebastian Sumpf
fe1ee05186 recipe: imx53_qsb_drivers
Do not copy imx53 specfic source code since it has been unified within
the GPIO driver.

follow up for issue #3900
2020-10-09 13:35:57 +02:00
Christian Helmuth
ec957739e9 Adapt some RAM quotas for 2560x1080 screens 2020-10-09 13:35:57 +02:00
Piotr Tworek
8d5005e03a os: add VirtIO nic driver
The driver is faily simple and does not support fancy features like
TCP checksum offloading or vlan filtering, but it is fully capable of
running every Genode network based scenario I've tried. Its currently
known to work on virt_qemu arm platforms and x86_64.

Fix #3825
2020-10-09 13:35:57 +02:00
Piotr Tworek
7fbb245710 os: add VirtIO device helper classes.
To simplify writing native VirtIO drivers for Genode add helper classes
representing VirtIO device and queue. The queue implementation should
be platform independant. The device abstraction however is closely tied
to the VirtIO transport being used (PCI/MMIO). Both PCI and MMIO
implementations expose the same public API so the actual driver logic
should be the same regardless of which transport is used.

Its also important to note that the PCI version of Virtio::Device
currently does not support MSI-X interrupts. Unfortunately my kowledge
about PCI bus is very limited and my main area of interest was to get
VirtIO drivers working on virt_qemu ARM/Aarch64 platform. As such all
the VirtIO drivers I plan to submit will work with PCI bus, but might
not use some extended capabilities.

Ref #3825
2020-10-09 13:35:57 +02:00
Piotr Tworek
9bd548c4bd os: add platform_drv config generator for virt_qemu
The VirtIO device configuration on Qemu is dynamic. The
order and presence of different command line switches affects
base address and interrupt assignment of each device. One could
probably hard-code the necessary switches and resulting XML ARM
platform driver configuration in each run script, but this seems
like troublesome and hard to maintain solution.

This patch explores an alternative approach to the problem.
It implements a ROM driver which probes the address space region
Qemu virt machines assign to VirtIO MMIO devices and exposes the
result as XML via a ROM session. This XML output can be fed directly
as config to the generic ARM platform driver.

Ref #3825
2020-10-09 13:35:57 +02:00
Piotr Tworek
fe0ad0addb tool: Consolidate qemu nic setup.
Right now the same code dealing with nic setup on qemu is duplicated
in many different run scripts. It makes it unnecesarily complex to
change the existing config or add support for new nic types. Lets move
all this common code to qemu.inc.

Ref #3825
2020-10-09 13:35:57 +02:00
Stefan Kalkowski
aa2511e209 platform_drv: make it available for arm_64 generic
Ref #3825
2020-10-09 13:35:57 +02:00
Stefan Kalkowski
3cf3344fa3 sel4 + foc: extend port's tool check rules 2020-10-09 13:35:56 +02:00
Sebastian Sumpf
c79687f5f4 gpio: introduce Pin and '_with_gpio'
- make GPIO server more robust on imx by not throwing exceptions for
  unknown pins, use '_with_gpio' instead
- use 'Gpio::Pin' data type instead of POD 'unsigned'

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
b9bd179e54 gpio_drv: remove specs for imx53 and imx6
Also cleanup run scripts and recipes were gpio driver is not required,
update the ones were it is.

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
6c6deb7e8b dde_linux: add touch to i.MX8 recipe
Add touch screen and event filter to drivers interactive package.

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
d387eba0ba os: driver recipe for i.MX8 drivers
Includes touch and gpio driver

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
96eb83f19a os: Synaptics DSX touch screen driver
Provides touch event service for i.MX8M Quad only

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
89972b11b7 gpio_drv: use platform session for i.MX
This makes the driver work for all i.MX boards. A platform driver with
the board specific configuration is required.

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
664b861f9d imx8_fb_drv: MIPI DSI display support
- support for Northwest Logic MIPI DSI bridge
- support for Radium panel (NXP MX8_DSI_OLED1)
- new 'DSI-1' connector in driver config file

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
27f705bc48 bootstrap: iomux adaptions for i.MX8 MIPI
These settings were obtained with a JTAG debugger from a running Linux
system. They work for MIPI as well as for HDMI.

issue #3900
2020-10-09 13:35:56 +02:00
Alexander Boettcher
325e9cb9fa platform_drv(x86): avoid memory leak 2020-10-09 13:35:56 +02:00
Alexander Boettcher
50b10ef4a5 aes_cbc_4k: extend test and run in autopilot
- to compare crypted text with host openssl

Fixes #3905
2020-10-09 13:35:56 +02:00
Alexander Boettcher
c0f8022a78 aes_cbc_4k: use libcrypto
Issue #3905
2020-10-09 13:35:56 +02:00
Alexander Boettcher
5d808cdc01 platform_drv: extend MSI-X supports
The patch handles the case, that the memory for the MSI-X table is part
of one of the Pci::Resource Memory BARs, which got allocated beforehand already.

With this commit, the platform driver will not fall back to use legacy IRQs or MSI, whereby MSI-X is available actually. Additionally, this patch avoids a lot of red
messages about non available IO-MEM printed by the roottask.

Fixes #3904
2020-10-09 13:35:56 +02:00
Christian Helmuth
abefca500b libc: fix deadlock in pthread_cond_timedwait/signal()
The deadlock occured with three concurrently running threads: two
waiters calling pthread_cond_timedwait() and one signaller calling
pthread_cond_signal().

If waiter W1 hits its timeout, the signaller may have called
pthread_cond_signal(), detected this waiter and posted the internal
'signal_sem' concurrently. Then, the signaller waits for 'handshake_sem'
to ensure the waiter got woken up.

Waiter W1 can't consume the 'signal_sem' post by
'sem_wait(&c->signal_sem)' because another waiter W2 may have consumed
the post already above in sem_wait/timedwait(). Waiting for a post on
'signal_sem' would block the waiter W1 in perfect deadlock with
signaller on 'handshake_sem'. As W1 also owns 'counter_mutex' in this
situation, waiter W2 would block when trying to aquire 'counter_mutex'
and can't resolve the situation.

So, W1 does nothing in this case and we accept the spurious wakeup on
next pthread_cond_wait/timedwait().
2020-10-09 13:35:56 +02:00
Martin Stein
7feea78991 timeout: rework timeout framework
* get rid of alarm abstraction
* get rid of Timeout::Time type
* get rid of pointer arguments
* get rid of _discard_timeout indirection
* get rid of 65th bit in stored time values
* get rid of Timeout_scheduler interface
* get rid of uninitialized deadlines
* get rid of default arguments
* get rid of Timeout::_periodic
* get rid of Timeout::Raw
* use list abstraction
* only one interface for timeout handlers
* rework locking scheme to be smp safe
* move all method definitions to CC file
* name mutexes more accurate
* fix when & how to set time-source timeout
* fix deadlocks

Fixes #3884
2020-10-09 13:35:56 +02:00
Martin Stein
9e5d479d03 timeout: test smp support
Ref #3884
2020-10-09 13:35:56 +02:00
Christian Helmuth
26011a7151 libc: update status for component select handlers
In case of contexts blocked in select() the monitor updates the
file-descriptor status, but if the entrypoint is just blocked for the
select handler, the status must be updated explicitly on
dispatch_select().
2020-10-09 13:35:56 +02:00
Stefan Kalkowski
bbb017dc24 muen: update to Community 2019 toolchain version
Fix #3903
2020-10-09 13:35:55 +02:00
Alexander Boettcher
04d3c9e750 nova: re-enable DMAR super pages in kernel
Fixes #3902
2020-10-09 13:35:55 +02:00
Alexander Boettcher
e5fe9c6fc7 qemu-usb: catch exception on already gone devices
Fixes #3893
2020-10-09 13:35:55 +02:00
Norman Feske
04821b1abc nitpicker: apply focus change w/o input events
This patch fixes the corner case where the keyboard focus is defined
independently from user interactivity, e.g., the activation of a
screensaver or lock screen.

In this case, nitpicker would update its internal focus state not before
the next input event is handled. Should this input event be a press
event, this event would wrongly be delivered to the prior focused
session. Another problematic situation is the initial state before the
very first input event occurs. Since the focus remains undefined until
the first input event is handled, an initial key press event would not
be delivered.

This is a regression caused be the transition to the event-session
interface and the removal of the nitpicker's periodic way of operation.
The patch fixes the problem by applying pending focus changes not only
at the input processing but also on the code path that responds to focus
changes (e.g., focus-rom update).

Issue #3812
2020-10-09 13:35:55 +02:00
Alexander Boettcher
afab15f1a4 linux: round up dataspace to 4k sizes
Issue #3901
2020-10-09 13:35:55 +02:00
Alexander Boettcher
e61f6cfd38 base: add thread migration test
Issue #3842
2020-10-09 13:35:55 +02:00
Alexander Boettcher
90bea1499e core: store new affinity on successful migration
Adjust the base-* platforms to acknowledge new thread location solely if
migration is supported and succeeded. Otherwise the wrong thread
locations are observed via the trace session and utilization time calculation
get wrong.

Issue #3842
2020-10-09 13:33:36 +02:00
Alexander Boettcher
99fa203673 nova: add migration support for global threads
Fixes #3842
2020-10-09 13:33:36 +02:00
Martin Stein
1b41d9db90 base: remove alarm library from base
Ref #3884
2020-10-09 13:33:36 +02:00
Martin Stein
c1d0179194 dde_rump: move private headers to src/include
Ref #3884
2020-10-09 13:33:36 +02:00
Martin Stein
04463806a8 dde_rump: remove unused rump_cgd
Ref #3884
2020-10-09 13:33:36 +02:00
Martin Stein
af01370cc1 run/rump_fat: raise ram quota
Ref #3884
2020-10-09 13:33:35 +02:00
Martin Stein
4eb4bd6f96 trace_logger: warn on multiple buffer wraps
Ref #3884
2020-10-09 13:33:35 +02:00
Christian Prochaska
d2d74cc5fa tool chain: fix build error on Ubuntu 20.04 (GCC 9)
Fixes #3899
2020-10-09 13:33:35 +02:00
Josef Söntgen
f53df495db libc: provide 'sys/soundcard.h' header file
Issue #3891.
2020-10-09 13:33:35 +02:00
Josef Söntgen
f3268cade6 libc: split ioctl method
Use one ioctl method for each type of I/O control because by now the
general method will become increasingly long.

Fixes #3890.
2020-10-09 13:33:35 +02:00
Josef Söntgen
1a54ee895e vfs: use compound ioctl in Block-VFS plugin
Instead of using the old 'ioctl' Vfs::File_io_services API implement
the I/O control functionality in a buch of files. This is similar to
the terminal-VFS plugin.

Fixes #3889.
2020-10-09 13:33:35 +02:00
Josef Söntgen
27d4cb871f libc: use property files for block ioctl
Like already done for terminal I/O controls use collect the information
by reading property files instead of using the old VFS ioctl interface.

Fixes #3888.
2020-10-09 13:33:35 +02:00
Josef Söntgen
2312ad35dd libc: match ioctl request type to contrib type
There is a type mismatch as in the FreeBSD contrib code the type of the
request is 'unsigned long'. So far, only I/O controls where the request
falls into the signed range where used and this was not a problem.

Some of the SNDCTL requests, however, have the bit set.

Fixes #3887.
2020-10-09 13:33:35 +02:00
Christian Prochaska
85a84f5042 qt5: generate enter events related to popup menus
Fixes #3894
2020-09-18 15:23:45 +02:00
Sebastian Sumpf
0fd979b147 imx8_fb_drv: make 'Capture' constructible
Reconstruct capture connection on config update in order to receive
update of complete screen data from GUI session.

fixes #3878
2020-09-18 15:21:10 +02:00
Christian Helmuth
ad595d2701 sculpt: version 20.09 2020-09-18 15:20:18 +02:00
Christian Helmuth
f6337a6446 depot: update recipe hashes 2020-09-18 14:04:56 +02:00
Stefan Kalkowski
f1b3e826d5 sculpt: update building section of sculpt README 2020-09-18 14:04:56 +02:00
Alexander Boettcher
2afba3c137 driver_manager: provide more memory to boot_fb
Fixes #3896
2020-09-18 14:04:56 +02:00
Norman Feske
e0d9a04f67 libc: resolve circular dependency in fork
This patch is a follow-up for the commit "libc: use monitor for fork".
It removes the use of the monitor mechanism from the
'Local_clone_service::close' RPC function because the fork_ep must stay
responsive for the destruction and creation of 'Child' objects.

Issue #3874
2020-09-18 14:04:56 +02:00
Norman Feske
274f306315 release_notes-20-08.txt: minor style fixes 2020-09-18 14:04:56 +02:00
Christian Helmuth
c59c266afc depot: update recipe hashes 2020-09-17 14:23:14 +02:00
Norman Feske
9aca1ac775 News item for Sculpt 20.08 2020-09-17 14:01:19 +02:00
Norman Feske
3e83b4b39e Update Sculpt documentation for version 20.08 2020-09-17 14:01:19 +02:00
Stefan Kalkowski
d7eb174c88 muen: fix building on modern devel distros
* Use python2 interpreter not available by default explicitely
* Update ada-bfd binding library to meet binutils-dev >= 2.34
2020-09-17 10:14:07 +02:00
Stefan Kalkowski
c48b3ca16f okl4: use python2 explicitely in elfweaver tool
Fix #3892
2020-09-17 10:14:07 +02:00
Norman Feske
951409f14b intel_fb: reinit capture session on mode change
The current version of the driver leaves the screen in a black state
after a mode change, e.g., when connecting an external display.
With this patch, the framebuffer content is fetched for the entire
screen after a mode change. Thanks to Sebastian Sumpf for investigating.

Issue #3878
2020-09-17 10:14:07 +02:00
Norman Feske
2075b119ac sculpt: usability tweaks in popup dialog
- Show "..." for resource-assignment menu entry because it leads
  to a sub menu.

- Avoid dialog changes when clicking on "Add component" while a
  routing or resource dialog is unfolded.
2020-09-17 10:14:07 +02:00
Norman Feske
0d61029d7e depot_deploy: move affinity to <affinity> sub node
The initial implementation of the affinity configuration in
"depot_deploy: support affinity configuration" added the affinity
location attributes to the <start> node of the deploy config. This patch
moves the information into a dedicated <affinity> sub node as done by
the init configuration. So the context of the attributes 'xpos', 'ypos',
'width' and 'height' becomes clear.

It also fixes a usability issue in Sculpt that occurred during testing:
When configuring multiple components with custom affinities, the
resources dialog of later components would wrongly display the state of
earlier components instead of displaying the fresh (default) state. The
resulting configuration would then not match the displayed information.
This is fixed by resetting the dialog state.

As another minor cosmetic change, the patch adds a line break in front
of copied <config> or <heartbeat> nodes.

Issue #3597
2020-09-17 10:14:07 +02:00
Christian Helmuth
2eb8c5e21a net: move ascii_to() into Net namespace
The combination of Net::Mac_address and
Genode::ascii_to(Net::Mac_address) required shaky quirks in several
places because GCC is not able to resolve the ascii_to overload if
base/xml_node.h was included to early. The current solution moves the
several ascii_to overloads "closer" to the Net types by putting them
into the Net namespace, where GCC reliably picks them up.

Hence, co-locating the ascii_to() utility with the overload type in the
same scope/namespace is good practice.

This patch removes the now obsolete <nic/xml_node.h> header file.
2020-09-17 10:13:22 +02:00
Norman Feske
c0f9f2c6d7 sculpt: restore toggleable format button
With the move of the storage-management dialogs to the graph in Sculpt
version 20.02, the ability to unselect the buttons for destructive
storage operations such as format or expand disappeared. This patch
restores the original behavior.
2020-09-17 10:13:21 +02:00
Alexander Boettcher
f0f8d0e0ca base: add affinity to session creation request
Fixes #3838
2020-09-17 10:13:21 +02:00
Norman Feske
5dc8e330b6 sculpt: add button for restarting a component
Fixes #3885
2020-09-17 10:13:21 +02:00
Alexander Boettcher
c9f2847420 foc: make serial esc functional 2020-09-17 10:13:21 +02:00
Stefan Kalkowski
fcb0ca305c dde_linux: don't zero out framebuffer of imx8
* On this platform there is no need to zero out the framebuffer
  dataspace, which is already blanked by core
* But it might happen that the GUI server is sending a capture
  event before the zero out happens. Thereby screen content can get
  lost

Fix #3878
2020-09-17 10:13:21 +02:00
Stefan Kalkowski
fd161cd814 dde_linux: turn imx8_fb_drv into Platform client
* Requests its I/O resources and clock settings from the platform driver

Fix #3877
2020-09-17 10:13:21 +02:00
Stefan Kalkowski
5913cdae89 os: fix clock settings for i.MX 8M platform_drv
* Fixes faulty algorithm in fractional pll rate calculation
* Enables clocks that are set as reference clock to prevent system freeze
* Enables/disables root clocks of gates implicitely

Fix #3876
2020-09-17 10:13:21 +02:00
Norman Feske
8dde14f93e bash: prevent aliasing of libc's 'getenv'
By default, bash brings its own version of 'getenv', named exactly like
the libc function. This becomes a problem in fork/execve scenarios if
the dynamic linker resolves 'getenv' to the bash binary instead of the
libc.

This patch fixes the generate step of the genodians.org scenario.

Issue #3882
2020-09-17 10:13:20 +02:00
Norman Feske
f5dc71ed35 os: remove obsolete single_session_service.h 2020-09-17 10:13:20 +02:00
Christian Prochaska
e0ca250232 libc: support detached pthreads
Fixes #3880
2020-09-17 10:13:20 +02:00
Christian Helmuth
75ba52a52b libc: remove mutex parameter from monitor
Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
a0a112ffe7 libc: use monitor for fork
Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
a891b3832c libc: use monitor for pthread join/cancel
Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
d6f89b285d libc: use monitor for sleep()
Issue #3874
2020-09-17 10:13:20 +02:00
Norman Feske
e9a3f0f095 libc: use monitor for select
This patch simplifies the control flow within the libc kernel by
facilitating the monitor mechanism for the implementation of 'select'.

Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
52a6cf1412 libc: support creat() 2020-09-09 16:57:34 +02:00
Norman Feske
aeeade53f9 sculpt: don't restart menu view if font changes
This patch enables the menu view's new ability to respond to font-size
changes in Sculpt so that the menu view instanced no longer need to be
restarted whenever the screen resolution or font size is changed.

Fixes #3875
2020-09-09 16:57:34 +02:00
Norman Feske
c05f716478 menu view: respond to font configuration changes
Issue #3875
2020-09-09 16:57:34 +02:00
Norman Feske
4aca94b08b vfs/ttf: support for watching font-size changes
This patch allows the use of the VFS watch mechanism for the glyph file
of the TTF VFS plugin so that clients become able to dynamically respond
to font reconfigurations.

Issue #3875
2020-09-09 16:57:34 +02:00
Norman Feske
3031fd2a7d os/vfs.h: const 'Directory' arg for 'Watch_handler'
The watch mechanism should not require a reference to a mutable
directory.
2020-09-09 16:57:34 +02:00
Norman Feske
7de2b040f8 vfs: deliver ACKs after config change
This is needed to enable VFS plugins to notify VFS clients about file
changes that depend on the plugin configuration, E.g., whenever the vfs_ttf
plugin responds to a font-size change, it generates a watch notification
for the glyphs file. Since the change is independent from I/O, we need
to manually call 'handle_io_progress'.
2020-09-09 16:57:34 +02:00
Norman Feske
0af969543d nitpicker: preserve alpha channel during resize
This patch reduces flickering artifacts that appear during the
resizing of clients that use an alpha channel.

Issue #3812
2020-09-09 16:57:34 +02:00
Josef Söntgen
9e97393e3a os: check path for dataspace in ROM VFS plugin
Fixes #3879.
2020-09-09 16:57:34 +02:00
Norman Feske
be14e68a83 sculpt/vimrc: 'set nowritebackup'
By default, Vim renames a written file to a backup file suffixed with
"~" before writing the current buffer to a new file. Consequently, there
exists an intermediate state when no file exists. Should a client watch
such a file to obtain dynamic configuration info, it observes the empty
state.

Some components have builtin heuristics for such a situation. In
particular, the window layouter falls back to a predefined default
'rules' if no rules are provided as a file. So when interactively
editing window-layouter rules using Vim, it can happen that the manually
maintained rules get overwritten by the default rules.

By setting 'set nowritebackup', we can sidestep this issue by preventing
Vim from producing the bad intermediate state.
2020-09-09 16:57:34 +02:00
Stefan Kalkowski
c1d99630c2 base: reset discarded Alarm object appropriatedly
Fix #3881
2020-09-09 16:57:34 +02:00
Norman Feske
328a4fa644 nitpicker: update hovering on view-stack changes
With the change of nitpicker to the event session interface, the
formerly periodic hovering updates moved to the - now sporadic - input
processing. This has the unfortunate side effect that hovering changes
caused by non-user-input, in particular view-stack changes issued by the
GUI clients that change the view under the current pointer position,
would no longer be reported immediately but only after receiving the
next incoming input event.

This patch reworks the hover handling such that potential hovering
changes due to view-stack operations are evaluated immediately by
those operations, covering the update of the hover report and the
generation of artificial enter/motion events.

Issue #3812
2020-09-09 16:57:34 +02:00
Christian Helmuth
ff82dc1ad5 doc: activate --depot-auto-update in getting_started.txt
Also be more explicit about the command to "execute" if depot archives
are missing in depot.inc.
2020-09-09 16:57:34 +02:00
Norman Feske
17a6318ad6 vfs: process all acks in each iteration
This patch solves a corner case where one long-active job (e.g.,
read-ready request) stays at the beginning of the '_active_jobs' queue
without an ack. In this case, the '_try_acknowledge_jobs' method would
wrongly stop processing the subsequent acknowledgements. In practice,
this can lead to a delayed sending of acknowledgements until new I/O or
client requests occur. In particular, Vim in Sculpt's inspect window
sometimes did not immediately respond to key presses during tab
completion. Here, the read-ready request of the terminal prevented the
acknowledgement for read of directory entry from being delivered until
the next key was pressed.

Fixes #3873
2020-09-09 16:57:34 +02:00
Christian Helmuth
0605180a61 libc: remove legacy kernel functions 2020-09-09 16:57:34 +02:00
Christian Helmuth
ab953a534c libc: remove residues of noux fork support 2020-09-09 16:57:34 +02:00
Christian Helmuth
0977574372 vfs/rtc: return timestamp size on stat() 2020-09-01 16:48:50 +02:00
Alexander Boettcher
99bdfbe36f trace: don't account argument_buffer 2x
The quota for the argument buffer is already accounted by using the
Attached_ram_dataspace _argument_buffer, which uses the Constraint_ram_allocator
_ram, which uses the Ram_quota_guard from the Session_object. Running on
Sculpt with more than 1000 Subject_info objects/trace IDs the memory
waste become noticeable.
2020-09-01 16:48:29 +02:00
Christian Helmuth
f70b02ae3b vbox: remove logger libc plugin
Fixes #3870
2020-08-28 14:48:05 +02:00
Christian Helmuth
574e41119a sculpt: version 20.08 2020-08-28 14:34:22 +02:00
Christian Helmuth
8d31590a66 version: 20.08 2020-08-28 10:31:12 +02:00
Norman Feske
8a5277d53f News item for version 20.08 2020-08-28 10:18:07 +02:00
Norman Feske
fb6549a092 Release notes for version 20.08 2020-08-28 10:18:07 +02:00
Christian Helmuth
c649307720 depot: update recipe hashes 2020-08-28 08:29:12 +02:00
Christian Helmuth
bf0f3b65b4 Replace remaining 'constrain_phys' by 'managing_system' 2020-08-28 08:28:13 +02:00
Norman Feske
b9a21ee3ae nitpicker: updated README 2020-08-28 08:28:13 +02:00
Piotr Tworek
8d790010bf Xml_generator: Remove unused member variable
This triggers a warning when building the code with clang.

Fixes #3868
2020-08-28 08:28:13 +02:00
Stefan Kalkowski
e29485fa59 dde_linux: decouple Lx_kit::Irq and Platform::Device
Follow-up commit to fix the old usb_drv. Under rpi one and the
same irq can be requested several times. Therefore, we've to track
the Irq_connection objects.

Ref #3865
2020-08-28 08:28:13 +02:00
Christian Prochaska
ace172ebf3 qt5: prerequisites for qtwebengine support
Fixes #3867
2020-08-28 08:28:13 +02:00
Norman Feske
bbfda019df vfs/terminal: minor const improvement
Issue #3860
2020-08-25 12:03:31 +02:00
Norman Feske
5cc2adb421 pkg/sculpt: update README
Adaptation to the change of the input filter to the event filter.
2020-08-25 12:02:37 +02:00
Norman Feske
90b3b72a91 doc: update components.txt
This patch adjusts the components.txt to the recent changes of the GUI
stack.

Issue #3812
2020-08-25 12:02:36 +02:00
Christian Helmuth
dd4a3b0263 vbox: direct screen updates via NotifyUpdate() 2020-08-25 12:02:36 +02:00
Norman Feske
7d0cb9620b depot: update recipe hashes 2020-08-25 11:50:41 +02:00
Christian Helmuth
2c29bf5a21 tool_chain_auto: depend on zlib from depot
This prevents run-script failures in case hashes are out-of-date.
2020-08-25 11:50:12 +02:00
Piotr Tworek
80bc1cff5f run: Use Qemu 5.0.0 compatile gic-version param.
It seems Qemu 5.0.0 no longer supports gic_version parameter.
Apparently this only worked due to some compat feature that
was dropped in Qemu 5.0.0. The replacement which works on both
old and new Qemu versions is gic-version.

Fixes #3823
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
a5f6d0f081 dde_linux: use new platform API for usb_host_drv
Introduce a common platform device initialization routine for all
ARM SoCs by using the new platform driver API.

Fix #3865
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
e223be32ce dde_linux: decouple Lx_kit::Irq and Platform::Device
The Lx_kit::Irq abstraction of DDE Linux was always using the very first
interrupt of a Platform::Device stored in it. Instead of handing over the
platform device it is much more flexible and sane to hand over the actual
interrupt capability.

Ref #3865
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
73d3698e2f os: add new platform driver for Raspberry Pi
Fix #3864
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
5f5ad41ad3 hw: unify irq enumeration for Raspberri Pi
By now, the enumeration of peripheral interrupts on Raspberry Pi 1 was
different in between base-hw kernel and Fiasco.OC. Therefore, hacks were
needed in every driver to request the correct interrupt number dependent
on the kernel. Before reproducing the same in the platform driver for rpi,
we can more easily use the same enumeration with base-hw.

Ref #3864
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
7ba31d4447 os: disable initialization of i.MX8MQ platform_drv
This is a temporary workaround to not harm drivers, which aren't
converted yet to request all device resources including power and
clocks from this new platform driver.

Ref #3863
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
224f5907b2 os: add platform driver for i.MX 8M Quad SoC
The new platform driver supports clock and power-domain settings per device.
IOMUX constroller settings are not part of the driver yet.

Fix #3863
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
70f98fcc44 hw: implement Pd_session::managing_system for ATF
To access the ARM Trusted Firmware from the platform driver
fill the new `managing_system` call of the PD session with life resp.
do a SMC call on behalf of the client.

Fix #3816
2020-08-25 11:50:11 +02:00
Stefan Kalkowski
06edc0d52b base: extend PD session with managing_system call
Introduce the managing_system privilege for components like the
platform_driver to allow it to call system management functionality
that is reserved by kernel or special firmware, e.g., ARM Trusted Firmware.

The former RAM resource configuration attribute `constrain_phys`,
which enabled to constrain the region of physical RAM to be used,
gets replaced by the new, broader managing_system configuration
attribute of a `start` node. It gets enforced by the sandbox library.

Ref #3816
2020-08-25 11:50:11 +02:00
Christian Prochaska
af6d2a8c54 stdcxx: add abi symbols needed by qtwebengine
Fixes #3862
2020-08-25 11:50:11 +02:00
Josef Söntgen
157f4b1270 pthread: implement condattr setclock
Normally CLOCK_REALTIME is used. However libraries, like glib, want to
use CLOCK_MONOTONIC. To make those users happy add setting the clock.

Note, the pthread_cond implementation uses the POSIX semaphore API
internally that does not have means to set the clock. For this reason,
the private 'sem_set_clock' function is introduced.

Fixes #3846.
2020-08-25 11:50:11 +02:00
Martin Stein
66ff18a53e libc: support pthread mutex type "Adaptive NP"
The initial motivation for enabling support for this pthread mutex type was
that it is required by the Glib test in genode/world.

Fixes #3817
2020-08-25 11:50:11 +02:00
Norman Feske
2a4adc895c Remove dithering from menu_view, themed decorator
With the change from RGB565 to RGB888, the application of dithering has
become obsolete.

Issue #3784
2020-08-25 11:50:11 +02:00
Josef Söntgen
d21bc8268b vfs: add raw option to terminal plugin
When the 'raw' attribute is set to 'yes' the terminal VFS plugin will
ignore control characters. This in necessary for terminal connections
that transport data that contain such characters as part of message.

Fixes #3860.
2020-08-25 11:50:11 +02:00
Norman Feske
8b556a9435 usb_block: fix upper block-number range check
The driver wrongly rejected a block request for the very last block of
the device, which prevented part_block from successfully parsing the
partition table (when attempting to access the GPT backup).

Fixes #3861
2020-08-25 11:50:11 +02:00
Norman Feske
a68a6665ac sculpt: remove part_block upon failure
With this patch, sculpt uses init's heartbeat-monitoring mechanism to
detect the failure of part_block instances during storage disovery.
If part_block gets stuck, the device is released and can thereby
be accessed at the whole-device level.

Issue #3861
2020-08-25 11:50:11 +02:00
Norman Feske
1e7c94759d part_block: spelling fix 2020-08-25 11:50:11 +02:00
Christian Prochaska
9ec2a19cc0 libc: add wrapper function for 'Genode::cache_coherent()'
Fixes #3858
2020-08-25 11:50:11 +02:00
Christian Prochaska
9bc6b8be5a libc: handle 'MAP_SHARED' flag in 'mmap()'
Fixes #3857
2020-08-25 11:50:11 +02:00
Norman Feske
f8f8b665c3 vfs: don't accept new job before old job is acked
Fixes #3859
2020-08-25 11:50:11 +02:00
Christian Prochaska
31397d67ae base: increase linker area size
Fixes #3856
2020-08-25 11:50:11 +02:00
Christian Prochaska
dd8777093d libc: don't treat 'mmap()' address hint w/o MAP_FIXED flag as error
Fixes #3855
2020-08-25 11:50:10 +02:00
Christian Prochaska
2f55ffdf20 libc: zero-initialize anonymous memory from 'mmap()'
Fixes #3854
2020-08-25 11:50:10 +02:00
Josef Söntgen
7c1a4522d6 virtualbox5: enable storage device flushing
The patches disable VBOX_IGNORE_FLUSH and a sanity check in the VMDK
backend. This enables passing an explicit flush request by the guest
down to the VFS.

Fixes #3743.
2020-08-25 11:50:10 +02:00
Norman Feske
3e8824908d system_shell: increase gui_fb quota
With this change, the window can be maximized when using a 1920x1080
resolution with 32 bits per pixel.

Issue #3784
2020-08-25 11:50:10 +02:00
Norman Feske
28714979bd sculpt: drop storage-detect-cancellation feature
Fixes #3853
2020-08-25 11:50:10 +02:00
Norman Feske
658091bfad ttf_font: add sanity check for invalid scale value
The check prevents the Ttf_font from violating the bounding box in the
presence of very small scale values. This can happen during the startup
of Sculpt. Before the framebuffer driver is up, Sculpt bases its dynamic
font-size setting on a screen resolution of 1x1.

Issue #3812
2020-08-25 11:50:10 +02:00
Norman Feske
e8e14ad1bf test-libc_execve: adjust timeout for pistachio 2020-08-25 11:50:10 +02:00
Martin Stein
e544464354 libsparkcrypto: src recipe, contrib alis, mk fixes
* add libsparkcrypto source-recipe
* provide ALI files through a new repository by mstein and add the repo
  download to the libsparcrypto port-file
* remove dependencies to non-existent contrib ADB files from the library make
  files

Fixes: #3852
2020-08-25 11:50:10 +02:00
Norman Feske
969e59c599 terminal: consider border in size calculation 2020-08-25 11:50:10 +02:00
Norman Feske
f2d7f7aa6e sculpt: remove decor frame from panel view 2020-08-25 11:50:10 +02:00
Norman Feske
a59b69758b sculpt: remove deferred GUI initialization
The sculpt manager used to defer the initialization of the GUI until
nitpicker's first display report became ready. This way, Sculpt was able
to run headlessly even if the framebuffer driver failed to start up.
Thanks to #3827, nitpicker no longer depends on a working framebuffer
driver. So the sculpt manager is safe to rely on nitpicker in any case,
simplifying the code.

Issue #3827
2020-08-25 11:50:10 +02:00
Norman Feske
c7d9b2ca92 nitpicker: fix mode change for requested fb
This is a follow-up commit to "nitpicker: make framebuffer and input
optional". It restores the dynamic mode-change support when using
'request_framebuffer="yes"' as needed in scenarios where multiple
nitpicker instances are used in a cascaded way. E.g., Sculpt's
Leitzentrale. The previous version missed to reconstruct the
'_fb_screen' on mode changes.

Issue #3812
2020-08-25 11:50:10 +02:00
Norman Feske
2437d759b6 Xml_node: remove deprecated methods
Issue #3755
2020-08-25 11:50:10 +02:00
Norman Feske
0434cb6fd6 gdb_monitor.run: cap-quota adjustment 2020-08-25 11:50:10 +02:00
Norman Feske
556a5c8086 libc: clean up 'clock_gettime' handling
This patch untangles the dependency of VFS operations that need RTC
information from the 'clock_gettime' libc function that must never be
called from the libc kernel context.

- The 'Rtc' class uses the VFS directly for reading the rtc file instead
  of relying on libc functions.

- The 'Rtc' instance has become part of the 'Kernel' instead of
  being construced as a side effect of the first call of
  'clock_gettime'.

- Changed 'Rtc::read' to return a timespec value, which has a higher
  precision than the formerly used time_t value.

- The 'Rtc::read' returns a value with the relative 'current_time'
  already applied. The former handling of subsequent rtc-value
  updates has been rewritten to become more logical.

- The 'Vfs_plugin' no longer calls 'clock_gettime' but the new
  kernel-level 'Current_real_time' interface.

Issue #2635
2020-08-25 11:50:10 +02:00
Norman Feske
852ab79359 Move atexit handling from base lib to libc
This patch untangles the interplay of the base library and the libc
during the exit handling.

- The CXA ABI for the atexit handling is now provided by the libc.
  For plain Genode components without libc dependency, __cxa_atexit
  is a no-op, which is consistent with Genode's notion of components.

- The 'abort' implementation of the base library no longer calls
  'genode_exit' but merely 'sleep_forever'. This way, the cxx library
  no longer depends on a 'genode_exit' implementation.

- The libc provides 'atexit' support by storing metadata on the
  libc kernel's heap now, thereby eliminating the former bounded
  maximum number of atexit handlers.

- Shared-library dtors are no longer called via the atexit mechanism
  by explicitly by the dynamic linker. This slightly changes the
  call order of destructors (adjustment of the ldso test). Functions
  marked as destructors are called after the atexit handlers now.

- The libc executes atexit handlers in the application context,
  which supports the I/O operations in those handles, in particular
  the closing of file descriptors.

Fixes #3851
2020-08-25 11:50:09 +02:00
Christian Prochaska
66063e5137 qt5_component: support arguments and environment from config
Fixes #3049
2020-08-25 11:50:09 +02:00
Josef Söntgen
f03917ab7c aes_cbc_4k: api recipe
Fixes #3850
2020-08-25 11:50:09 +02:00
Martin Stein
5ed528a2ad aes_cbc_4k: import file for include directories
Ref #3850
2020-08-25 11:50:09 +02:00
Josef Söntgen
81ae4599ae libsparkcypto: api recipe
For the time being, we put all spec and body files into the recipe although
there might be a (so far to us unknown) way to have only the API relevant files
in it.

Fixes #3849
2020-08-25 11:50:09 +02:00
Martin Stein
82090d2ea1 libsparkcrypto: mark some units pure
* switch to a libsparkcrypto fork of m-stein
* switch to a libsparkcrypto state that makes some units pure that are used by
  the consistent block encrypter, in order that the latter can become
  completely pure

Ref #3849
2020-08-25 11:50:09 +02:00
Martin Stein
2e3b11b354 ada-runtime: add s-expint.ad*
* switch to fork of the Ada runtime provided by m-stein
* switch to a Ada-runtime state that provides the Exp_Int package (exponential
  function on integers)
* adapt spark lib, symbols, and recipes to incorporate the Exp_Int package

Fixes #3848
2020-08-25 11:50:09 +02:00
Martin Stein
f3eaeb08ef ada/spark: all warnings, warn strict, style checks
* enable all common warnings through default value of CC_ADA_WARN
* treat warnings like errors through default value of CC_ADA_WARN_STRICT
* enable almost all style checks through default value of CC_ADA_WARN_STRICT
* style fixes for aes_cbc_4k
* disable strict warnings and style checks for libsparkcrypto and spark lib

Ref #3848
2020-08-25 11:50:09 +02:00
Alexander Boettcher
3f97269988 sculpt_manager: add graphical CPU affinity config
Fixes #3820
2020-08-25 11:50:09 +02:00
Norman Feske
1aed881313 Remove drivers/gpio/spec directory
Issue #2190
2020-08-25 11:50:09 +02:00
Norman Feske
3c78265e66 Remove drivers/framebuffer/spec directory
Thanks to the unification of build directories, the sub directories
(rpi, sdl, imx53) do not depend on SPEC values.

Issue #2190
2020-08-25 11:50:09 +02:00
Norman Feske
fcb21732e0 Move drivers/input/spec/ps2 to drivers/ps2
This simplifies the directory structure.

Issue #2190
2020-08-25 11:50:09 +02:00
Norman Feske
db0e86fa41 Remove drivers/input/dummy pseudo driver
With the transition from the input-session to the event-session
interface, the use case for this component has vanished.

Issue #3827
2020-08-25 11:50:09 +02:00
Norman Feske
2e22498e5a nitpicker: no framebuffer and input by default
This patch prevents nitpicker from requesting a framebuffer and input
session by default because the regular use of nitpicker relies on the
capture-session and event-session interfaces by now.

For supporting the nested use of nitpicker via the gui_fb component, it
is still possible to enable the traditional behavior by explicitely
setting the 'request_input' and 'request_framebuffer' config attributes
to "yes".

Issue #3812
2020-08-25 11:50:09 +02:00
Norman Feske
264f695373 Remove transitionary input_event_client component
With the transition of the input servers to event clients completed,
this helper component is no longer needed.

Issue #3845
Issue #3827
2020-08-25 11:50:09 +02:00
Norman Feske
a2381c7e4c Turn USB HID drivers into event-session clients
Issue #3845
2020-08-25 11:50:09 +02:00
Norman Feske
974118acec Turn PS/2 driver into event-session client
Issue #3845
2020-08-25 11:49:45 +02:00
Christian Prochaska
08ef528577 stdcxx: enable thread features
Issue #2442
2020-08-25 11:49:45 +02:00
Norman Feske
50b367c076 Remove dde_zircon
Fixes #3847
2020-08-25 11:49:44 +02:00
Christian Helmuth
36b6ebc030 libc: process VFS operations in monitor
Fixes #2635
2020-08-25 11:49:44 +02:00
Christian Helmuth
a89d61acf2 base: call Io_progress_handler only in signal RPC
This remove the call to Io_progress_handler::handle_io_progress() from
wait_and_dispatch_one_io_signal() to prevent unexpected nesting
I/O-progress handling in case of custom dispatch loops (e.g., in libc).
The original intention of Io_progress_handler was to inform the
entrypoint just before blocking in the entrypoint loop.

Issue #2635
2020-08-25 11:49:44 +02:00
Norman Feske
9e42a9ac7e Replace server/acpi_input with app/acpi_event
Fixes #3827
2020-08-25 11:49:44 +02:00
Norman Feske
19690193a4 Remove obsolete use of input_session/connection.h 2020-08-25 11:49:44 +02:00
Norman Feske
78047b5bd8 Rename fb_boot_drv to boot_fb_drv
to be consistent with the naming of the other drivers.
2020-08-25 11:49:43 +02:00
Norman Feske
9662d89cfb Replace input filter with event filter
This commit applies the transition from the "Input" session to the "Event"
session to the event-filtering mechansim. The functionality of the
input_filter is now provided by the event_filter. The event filter
requests only one "Event" session as destination for the filter result,
which is usually routed to the nitpicker GUI server. It provides an
"Event" service to which any number of event sources can connect.

The configuration of the filter chain remains almost the same. Only the
declaration of the <input> nodes is no longer needed. Instead, the
configuration must specify <policy> nodes, which define the mapping of
"Event" clients (event sources) to the inputs used in the filter chain.

The patch adjusts all uses of the nitpicker GUI server accordingly such
that the event filter reports events to nitpicker's event service
instead of having nitpicker request an "Input" session. This dissolves
the dependency of nitpicker from input drivers.

Issue #3827
2020-08-25 11:49:43 +02:00
Norman Feske
bc5b161260 os: event_dump server for printing events
This component takes over the role of the test-input component.

Issue #3827
2020-08-25 11:49:43 +02:00
Norman Feske
c502e1d095 input_filter: prepare for refactorization
This patch brings the input filter into a shape that is easier to
re-mold into an event filter, reversing the client/server roles of
the component.

* The 'Sink &destination' is no longer passed as constructor argument
  to the individual filters but passed as argument to the 'generate'
  method. This way, the final destination does not need to exist at
  the construction time of the filter chain but can be created on
  the fly (clearing the way for using 'Event::Client::with_batch').

* A new 'Source::Filter' interface with the 'apply' method aids the
  cascading of filters during 'generate'. The modules now implement
  the 'Source::Filter::filter_event' interface instead of the
  'Source::Sink::submit_event' interface.

* Since the 'Sink &destination' is no longer a member of the filter
  modules, character-repeat events can no longer be emitted in an
  ad-hoc way. Instead, the character-repeat mechanism now invokes
  a new 'Trigger::trigger_generate' hook that prompts the execution
  of the regular 'generate' mechanism by the main program.

This patch is supposed to leave the semantics of the input filter
unchanged (validated by the input_filter.run script).

Issue #3827
2020-08-25 11:49:43 +02:00
Norman Feske
6c4ce86a34 event_session: make Session_client::Batch abstract
This way, there can exist multiple implementations of the interface such
as event filters.

Issue #3812
2020-08-25 11:49:43 +02:00
Norman Feske
7bac1ec7e5 Adapter for connecting input and event servers
This is an intermediate helper component for the transition of input
servers into event clients. It works analogously to the
input_event_bridge but it connects servers instead of clients.
In particular, it can act as glue between a traditional input driver
that provides an input service and the event filter that provides an
event service. Thanks to this component, each driver can be migrated to
the event-client interface individually.

Issue #3827
2020-08-25 11:49:43 +02:00
Norman Feske
7932c76d85 nitpicker: add event service
Issue #3812
2020-08-25 11:49:43 +02:00
Norman Feske
66c520cdae Remove stale virtualbox_nic_router.run script
The run script is not regularly tested and thereby has become
nonoperational since a long time.
2020-08-25 11:49:43 +02:00
Christian Helmuth
9453287a6b libc: move current working directory into kernel 2020-08-25 11:49:43 +02:00
Christian Helmuth
40e936911f libc: remove unused member from Errno 2020-08-25 11:49:43 +02:00
Christian Helmuth
d9121e50c3 libc: translate file-descriptor exhaustion into EMFILE
Fixes #3841
2020-08-25 11:49:43 +02:00
Christian Helmuth
cb15f40028 Remove remnants of libc_lxip
Issue #2960
2020-08-25 11:49:42 +02:00
Alexander Boettcher
ce1d0464b8 ssh_terminal: destroy libc fd within user context
Fixes #3840
2020-08-25 11:49:42 +02:00
Alexander Boettcher
bed531b604 libc: initialize tv struct in pselect
Fixes #3839
2020-08-25 11:49:42 +02:00
Christian Helmuth
257b3b6775 libc: cleanup monitor implementation
- Explicit types for function and monitor execution results
- Remove pending flag and mutex (pending flag was moved to kernel)
2020-08-25 11:49:42 +02:00
Christian Helmuth
420ed91480 linux_nic_drv: stop receiver thread on congested queue
Otherwise, the thread spins on and drops packets.
2020-08-25 11:49:42 +02:00
Christian Prochaska
c6b17be744 vfs/lwip: clear the packet queue in '~Udp_socket_dir()'
Fixes #3836
2020-08-25 11:49:42 +02:00
Christian Helmuth
d266f44ef3 libc: free resources on socket creation failure
Issue #3766
2020-08-25 11:49:42 +02:00
Christian Helmuth
5a2ac73b69 vfs/lwip: prevent pbuf leakage on ENOTCONN
Issue #3766
2020-08-25 11:49:42 +02:00
Christian Helmuth
7996fc45f3 vfs/lwip: signal ENOTCONN via EOF on remote file
Issue #3766
2020-08-25 11:49:42 +02:00
Alexander Boettcher
a03a37b1d9 vfs/lwip: avoid leaking of pbuf objects
Issue #3766
2020-08-25 11:42:37 +02:00
Christian Helmuth
76ac94f4f2 vfs/lwip: fix pbuf slab-block size
Issue #3766
2020-08-25 11:42:37 +02:00
Alexander Boettcher
f4d3231034 cpu_sampler: handle all quota upgrades
Beforehand cap_quota upgrades got ignored which leads to non working clients.

Issue #3826
2020-08-25 11:42:37 +02:00
Alexander Boettcher
b7ffeb51aa cpu_sampler: avoid spinning on unavailable state
Fixes #3826
2020-08-25 11:42:37 +02:00
Alexander Boettcher
ed15a46ca4 base: construct child process only once
Fixes #3821
2020-08-25 11:42:36 +02:00
Alexander Boettcher
c55a499009 base: remove delayed dispatch from Rpc_entrypoint
Fixes #3833
2020-08-25 11:42:36 +02:00
Alexander Boettcher
d1be1281bc os: use whole memory in Packet_allocator 2020-08-25 11:42:36 +02:00
Christian Prochaska
377dadd461 libc_getaddrinfo.run: fix run script
Fixes #3832
2020-08-25 11:42:36 +02:00
Christian Prochaska
353baa9251 libc: add pthread alias functions with underscore
The libc calls pthread functions with underscore internally.

Issue #725
2020-08-25 11:42:36 +02:00
Alexander Boettcher
60106ac2c8 base: avoid deadlock and page fault
Fixes #3830
2020-08-25 11:42:29 +02:00
Christian Helmuth
de7d4a5523 Replace libc_pipe plugin by VFS pipe plugin 2020-07-30 08:49:24 +02:00
Christian Prochaska
9b6cc75f1c tool/seccomp: allow 'restart_syscall' on x86_64
Fixes #3831
2020-07-30 08:49:23 +02:00
Christian Helmuth
18b26ff595 vfs/pipe: never report read_ready on pipe/out handle 2020-07-30 08:49:23 +02:00
Christian Helmuth
e44ffa02c9 libc: remove redundant dummies (fstatat, stat) 2020-07-30 08:49:23 +02:00
Christian Helmuth
5122917d62 os: declare Path::max_len() const 2020-07-30 08:49:23 +02:00
Alexander Boettcher
3639a1af80 acpi_drv: avoid out-of-bound access to FADT table
Fixes #3829
2020-07-30 08:49:23 +02:00
Alexander Boettcher
851b842033 vbox5-generic: use pthread_cond_timedwait for halt
use similar implementation as introduced for vbox5-nova

vbox5-nova: avoid Blocking_canceled exception

Related to #3810
2020-07-30 08:49:23 +02:00
Alexander Boettcher
072a00ba18 vbox5: remove ubuntu 14_04 test 2020-07-30 08:49:23 +02:00
Alexander Boettcher
7e0b66835b vbox5: show serial for ubuntu VMs during autopilot 2020-07-30 08:49:23 +02:00
Alexander Boettcher
73e671893b nova: remove obsolete local vcpu case
Seoul was the last user of Vcpu_same_pd
2020-07-30 08:49:23 +02:00
Christian Prochaska
fd682cd470 hw: check descriptor validity in LPAE lookup
Fixes #3828
2020-07-30 08:49:23 +02:00
Norman Feske
bfd94d64ba pbxa9_drivers: add blit api
This is a follow-up fix of "Turn framebuffer drivers into capture
clients".

Fixes #3813
2020-07-30 08:49:23 +02:00
Piotr Tworek
d8539af412 platform_session: Add missing include.
The code uses Genode::Attached_dataspace but fails to include header
defining this type.

Fixes #3824
2020-07-30 08:49:23 +02:00
Norman Feske
cd7a6fc9fe pkg/drivers_interactive-muen: use capture session
This is follow-up commit to "Turn framebuffer drivers into capture
client".

Issue #3813
2020-07-30 08:49:23 +02:00
Alexander Boettcher
41380ff769 base: remove Cancelable_lock
- base/cancelable_lock.h becomes base/lock.h
- all members become private within base/lock.h
- solely Mutex and Blockade are friends to use base/lock.h

Fixes #3819
2020-07-30 08:49:23 +02:00
Alexander Boettcher
0ed7367c97 vbox5-nova: avoid using semaphore used by Lock
Issue #3819
2020-07-20 15:59:47 +02:00
Alexander Boettcher
eab09a2f7c nova: avoid Blocking_canceled exception in timer
Issue #3819
2020-07-20 15:59:47 +02:00
Norman Feske
de795b1a6e depot: update recipe hashes 2020-07-13 11:33:53 +02:00
Alexander Boettcher
73546a135a seoul: increase VMM memory for vm_stress*
The memory was not sufficient if more than 2 vcpus are used. The test starts
up to 4 vCPUs.
2020-07-13 11:33:15 +02:00
Alexander Boettcher
c888d856ee vbox5*.run: disable in autopilot usb usage
to avoid to spam the log with usb messages about our usb dongle sending
regularly input events
2020-07-13 11:33:15 +02:00
Norman Feske
c81af531a3 Turn framebuffer drivers into capture clients
This patch replaces the use of the "Framebuffer" session interface by
the new "Capture" session interface in all framebuffer drivers. Thanks
to this change, those drivers have become mere clients of the nitpicker
GUI server now, and are no longer critical for the liveliness of the GUI
server.

The patch touches the following areas:

- The actual driver components. The new versions of all drivers have
  been tested on the respective hardware. Generally, the drivers
  have become simpler.

- The drivers_interactive packages for various boards. The drivers
  subsystem no longer provides a "Framebuffer" service but needs a
  valid route to the "Capture" service provided by nitpicker.

- The driver manager of Sculpt OS.

- This patch changes the role of the test-framebuffer component from a
  framebuffer client to a capture server so that drivers (capture clients)
  can be directly connected to the test component without the nitpicker
  server.

- Framebuffer driver no longer support the unbuffered mode.

- The fb_bench.run script is no longer very meaningful because it
  interplays solely with nitpicker, not with the driver directly.

- All run scripts for graphical scenarios and the related depot
  archives got adapted to the change.

Fixes #3813
2020-07-13 11:33:15 +02:00
Norman Feske
6743669ab8 nitpicker: report no mode smaller than 1x1 pixels
Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
320387db89 nitpicker: improve GUI client resize handling
This patch replaces meta-data allocation during the resize handling by a
new 'Resizeable_texture' type that has all meta data preallocated.
It also replaces the use of pointer return values with the
'Resizeable_texture::with_texture' method.

Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
4cad1a87df nitpicker: make framebuffer and input optional
Nitpicker used to unconditionally request a framebuffer and input
session. With the transition to the new capture/event session
interfaces, this built-in policy does no longer suffice.

This patch introduces the attributes 'request_framebuffer="yes"' and
'request_input="yes"' (with the default values shown) to nitpicker's
<config> node. If setting those attributes to "no", nitpicker won't
request a "Framebuffer" and "Input" session respectively.

Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
22cb6dded7 nitpicker: add capture service
Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
537b317273 nitpicker: handle failed try_alloc_texture
Fixes #3782
2020-07-13 11:33:14 +02:00
Norman Feske
795a817a33 nitpicker: remove dirty_rect state from view stack
In the presence of potentially multiple output back ends, this
dirty_rect state must be maintained individually per back end. Instead
of storing the dirty_rect as view-stack member, the view stack now calls
a new 'Damage::mark_as_damaged' interface, which allows nitpicker to
propagate this information to multiple back ends. Unfortunately, the
patch must remove the per-view dirty_rect state.

Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
067a7ad7e9 nitpicker: internal cleanup
This patch simplifies the internal naming of the nitpicker GUI server as
a preparatory step for adding support for the capture session interface.

Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
3863de9589 Input-event-bridging service
The sole purpose of this service is the migration path from the use of
input session interface to the event session interface.

Issue #3812
2020-07-13 11:33:14 +02:00
Norman Feske
443d3c98dd Event session interface
Issue #3812
2020-07-13 11:33:13 +02:00
Norman Feske
602def9bdd Simple example for using a capture connection
Issue #3812
2020-07-13 11:33:13 +02:00
Norman Feske
3d1d1b439d Capture session interface
Issue #3812
2020-07-13 11:33:13 +02:00
Josef Söntgen
49e907e5f6 libc: remove trailing slash in lstat and stat
Fixes #3814.
2020-07-13 11:33:13 +02:00
Alexander Boettcher
c4a8c6798b top: react on too small trace argument buffer size
Issue #3811
2020-07-13 11:33:13 +02:00
Alexander Boettcher
21e48a8e12 trace: extend for_each_subject_infos return value
Fixes #3811
2020-07-13 11:33:13 +02:00
Norman Feske
a7d170adda os: add blit/painter.h
This utility eases the application of the 'blit' function when using the
'Texture' and 'Surface' types.
2020-07-13 11:33:13 +02:00
Norman Feske
91b71f7a9f run: add drivers_interactive for panda and arndale 2020-07-13 11:33:13 +02:00
Alexander Boettcher
641679f7e7 vbox5-nova: avoid Blocking_canceled exception
using pthread primitives to implement block/wakeup of EMT thread

Fixes #3810
2020-07-13 11:33:13 +02:00
Christian Helmuth
ed4594c76b Fix success/failure detection in cpu_bench testsuite
Issue #3785
2020-07-13 11:33:12 +02:00
Alexander Boettcher
997a77b3de foc: use Mutex
Issue #3809
2020-07-13 11:33:12 +02:00
Alexander Boettcher
6fa4307005 foc: keep core internal pager state separately
beforehand the Lock object and more was accessible
via FOC native cpu thread RPC

Fixes #3809
2020-07-13 11:33:12 +02:00
Alexander Boettcher
f3efbe50bb base: remove deprecated cancel_blocking() support
for threads.

Fixes #3806
2020-07-13 11:33:12 +02:00
Alexander Boettcher
ce6f4dffe5 linux: use Mutex
Fixes #3807
2020-07-13 11:33:12 +02:00
Norman Feske
a0b0892df3 UEFI/boot_fb: constrain Qemu to 1920x1080
Fixes #3808
2020-07-13 11:33:12 +02:00
Christian Helmuth
e163055f6a ram fs: Release node mutex on unlink
This is needed if an open file is unlinked.

Fixes #3800
2020-07-13 11:33:12 +02:00
Alexander Boettcher
7acc34b48b dde_zircon: use Mutex
Fixes #3805
2020-07-13 11:33:12 +02:00
Alexander Boettcher
a9827c662e dde_ipxe: use Mutex
Issue #3805
2020-07-13 11:33:12 +02:00
Alexander Boettcher
9a8a42e819 dde_rump: use Mutex/Blockade
Issue #3805
2020-07-13 11:33:12 +02:00
Alexander Boettcher
5516dbcb1f dde_linux: use Mutex/Blockade
Issue #3805
2020-07-13 11:33:11 +02:00
Alexander Boettcher
b7cdb5840a dde_bsd: remove unused Lock
Issue #3805
2020-07-06 14:43:05 +02:00
Alexander Boettcher
61d798c629 launchpad: use Mutex
Fixes #3804
2020-07-06 14:43:05 +02:00
Alexander Boettcher
973fbc98be nitlog: use Mutex
Issue #3804
2020-07-06 14:43:05 +02:00
Alexander Boettcher
3d634df34d gems: remove report_rom_slave.h
Fixes #3803
2020-07-06 14:43:04 +02:00
Alexander Boettcher
ad284491e6 mixer_gui_qt: use Blockade
Issue #3803
2020-07-06 14:43:04 +02:00
Alexander Boettcher
f946de4450 tcp_terminal: use Mutex
Issue #3803
2020-07-06 14:43:04 +02:00
Alexander Boettcher
377c6ed0ce ssh_terminal: use Mutex
Isse #3803
2020-07-06 14:43:04 +02:00
Alexander Boettcher
1609d8a92f gdb_server: use Mutex
Fixes #3802
2020-07-06 14:43:04 +02:00
Alexander Boettcher
169cad6059 seoul: use Mutex
Issue #3802
2020-07-06 14:43:04 +02:00
Alexander Boettcher
bba4790002 virtualbox5: use Mutex/Blockade
Issue #3802
2020-07-06 14:43:04 +02:00
Alexander Boettcher
c943e26913 lib/drm: use Blockade
Fixes #3801
2020-07-06 14:43:04 +02:00
Alexander Boettcher
7d1fd0b0a3 lwip: use Mutex
Issue #3801
2020-07-06 14:43:04 +02:00
Alexander Boettcher
6d653b3c0f qemu-usb: use Mutex
Issue #3801
2020-07-06 14:43:04 +02:00
Alexander Boettcher
5936d00b5e acpica: use Mutex
Issue #3801
2020-07-06 14:43:04 +02:00
Christian Prochaska
5af4552511 qt5: build Qt libraries and applications with qmake
Fixes #3795
2020-07-03 13:48:55 +02:00
Norman Feske
0310c733d5 base-linux: let seccomp permit 'read'
This is needed for using the 'wait_for_continue' debug mechanism.

Fixes #3798
2020-07-03 11:58:31 +02:00
Christian Helmuth
0e6c32f75e libc: use Mutex/Blockade
Fixes #3796
2020-07-03 11:16:20 +02:00
Christian Helmuth
93ab972ddc tool/seccomp: allow sigreturn on x86
Fixes #3799
2020-07-03 11:15:33 +02:00
Norman Feske
35c3acdf05 depot: update recipe hashes 2020-07-03 11:13:59 +02:00
Alexander Boettcher
103236fdca nitpicker: fix memory accounting during realloc
Fixes #3794
2020-07-03 11:11:24 +02:00
Christian Prochaska
62848b1a68 mk: set soname in abi libraries
Fixes #3793
2020-07-03 11:11:23 +02:00
Alexander Boettcher
64ef651d4d libc: handle MSG_WAITALL in socket_fs_plugin
Fixes #3774
2020-07-03 11:11:23 +02:00
Emery Hemingway
1a620acc17 libc: add newlocale and freelocale dummies
Fix #3777
2020-07-03 11:11:23 +02:00
Christian Prochaska
6e71208db3 libc: fix timeout calculation in 'ppoll()'
Fixes #3791
2020-06-30 09:15:53 +02:00
Christian Helmuth
8e205e0324 sel4: assignment of BOARD as effective override
Issue #3792
2020-06-30 09:11:57 +02:00
Christian Prochaska
9578fadae2 libc: handle nullptr timeout in 'ppoll()'
Fixes #3790
2020-06-29 16:59:35 +02:00
Alexander Boettcher
1ec823bf5e libc: support manual pthread configuration
Fixes #3787
2020-06-29 16:56:47 +02:00
Alexander Boettcher
2471410fe5 libc: provide number of CPUs for sysctl&sysconf
Fixes #3786
2020-06-29 16:55:56 +02:00
Alexander Boettcher
3fb5ae4fdc vm_stress: fix resource request by seoul-debian32
+ increase VM RAM to same size as used by vbox5
2020-06-29 16:54:43 +02:00
Norman Feske
4450b37ff5 depot: update recipe hashes 2020-06-29 14:25:28 +02:00
Alexander Boettcher
309597bbda timeout fw: be robust against past _timestamp()
_timestamp() returns CPU local values which may not be in sync with _ts
taken from another CPU. Be robust and don't produce wraparound/negative
timeout values.

Issue #3657
2020-06-29 14:25:27 +02:00
Norman Feske
7dbf836217 Move stubby to genode-world
Fixes #3789
2020-06-29 14:25:27 +02:00
Norman Feske
5249f3358f Move Solo5 to genode-world
Fixes #3761
2020-06-29 14:25:27 +02:00
Stefan Kalkowski
1f91fd3f7d hw: scale imx8q_evk cpu to 1.5 GHz 2020-06-29 14:25:27 +02:00
Alexander Boettcher
01676717e2 tool: remove outdated tianocore image
It is known to work up to Qemu 2.9 solely.

Instead use ovmf package provided by Linux distributions.

Issue #3784
2020-06-29 14:25:27 +02:00
Stefan Kalkowski
1cfb1af56e os: automate cpu_bench testsuite
* Differentiate in between different architectures with assembler routines
  for correct measures
* Automate first step measuring of 10G bogomips across different hardware

Fix #3785
2020-06-29 14:25:27 +02:00
Norman Feske
ef741ef80d Change pixel format to 32 bits per pixel
Until now, Genode's framebuffer session interface was based on the
RGB565 pixel format. This patch changes the pixel format to 32-bit
XRGB where the X part is ignored. It adapts all graphical applications
and device drivers accordingly.

The patch also adjusts the users of the drivers_interactive packages,
assigning 64 MiB RAM and 1500 caps to the drivers subsystem, which is
sufficient for covering high resolutions at 32 bits per pixel and to
accommodate multi-component USB HID input stacks.

Fixes #3784
2020-06-29 14:22:29 +02:00
Alexander Boettcher
6119e03081 grub2: avoid hardcoding boot disc
see alex-ab/g2fg#1
2020-06-29 14:22:28 +02:00
Josef Söntgen
6d945e6a61 os: remove rom_block server component
This component is superceeded by vfs_block.

Issue #3781.
2020-06-29 14:22:28 +02:00
Josef Söntgen
6fc7ed55cf Replace 'rom_block' with 'vfs_block'
Issue #3781.
2020-06-29 14:22:28 +02:00
Josef Söntgen
8b590e2330 os: remove ram_block server component
This component is superceeded by vfs_block.

Issue #3781.
2020-06-29 14:22:28 +02:00
Josef Söntgen
ec711b008e Replace 'ram_block' with 'vfs_block'
Issue #3781.
2020-06-29 14:22:28 +02:00
Josef Söntgen
e5b00d89fb depot_autopilot: test case for vfs_block
Issue #3781.
2020-06-22 09:50:51 +02:00
Josef Söntgen
be55f080e4 os: add test-vfs_block pkg recipe
Issue #3781.
2020-06-22 09:50:51 +02:00
Josef Söntgen
e1aab829ca os: Block session server backed by VFS library
The 'vfs_block' component will give access to a VFS file through a
Block session. For more detailed information please look at its
README.

(On a technical note, the server currently only allows for one
active session and has only one pending back end request but can
easily be extended in the future.)

Fixes #3781.
2020-06-22 09:50:51 +02:00
Josef Söntgen
e56dd15a4b vfs: extend <zero> fs to limit amount of zeros
Setting the 'size' attribute will restrict a reader to consume
0s up to the specified amount per VFS handle. The attribute is
parsed as 'Number_of_bytes', which will limit the amount to the
maximum of the addressable memory on the platform.

This addition comes in handy when needing to provide a synthetic
empty file with a fixed size.

Issue #3781.
2020-06-22 09:50:51 +02:00
Josef Söntgen
103ae9df4a block_tester: limit batching in sequential test
So far the condition whether to spawn a new job or not depended on
the amount of data already processed. This could lead to spawning
more jobs than necessary if batching is used and in return could
result in creating invalid requests in case the tested block session
is not large enough.

In addition to checking the amount of data the test now stores the
number of the last block and checks if the current request is in
range. This properly limits the total amount of requests.

Issue #3781.
2020-06-22 09:50:51 +02:00
Josef Söntgen
b5f0c07eb3 os: add block_tester src recipe
Issue #3781.
2020-06-22 09:50:51 +02:00
Norman Feske
eb3a81a874 depot: update recipe hashes 2020-06-22 09:39:41 +02:00
Martin Stein
1e96510815 server/vfs: set seek offset before executing write
The seek offset has to be updated on partial writes according to the
current write position. Otherwise writes will override the content
at the initial offset.

Fixes #3780.
2020-06-22 09:39:40 +02:00
Stefan Kalkowski
04d8c859d8 hw: enable branch predictor on rpi
* Z-bit was never enabled for rpi1
* Write buffer, and TCM bits are deprecated in this processor generation
  so do not use them

Ref #3247
2020-06-22 09:39:40 +02:00
Stefan Kalkowski
b11da67679 usb_hid: introduce cpu quota
Ref #3247
2020-06-22 09:39:40 +02:00
Norman Feske
c8322ffd2a decorator: fix cap-upgrade handling
This commit fixes the 'Out_of_caps' handling. The previous version
mistakenly upgraded the RAM instead the caps as response. The problem
could be triggered by the 'decorator_stress.run' script.
2020-06-22 09:39:40 +02:00
Norman Feske
f63713694c api/blit: package arch-specific optimizations
The blit API archive missed the CPU-architecture-specific variants of
the blit library such that all depot binaries worked with the generic
(slow) fallback implementation. This patch adds the missing pieces to
the blit API archive.
2020-06-22 09:39:40 +02:00
Norman Feske
7a97cd70aa Rename nit_fader to gui_fader
Issue #3778
2020-06-22 09:39:40 +02:00
Norman Feske
48b4891f6e Rename nit_fb to gui_fb
Issue #3778
2020-06-22 09:39:40 +02:00
Norman Feske
5d40c0c1ce Rename 'Nitpicker' namespace to 'Gui'
Issue #3778
2020-06-22 09:39:40 +02:00
Norman Feske
e8f5706382 Rename <nitpicker> in runtime files to <gui>
Issue #3778
2020-06-22 09:39:39 +02:00
Norman Feske
98f39c698f Rename "Nitpicker" service name to "Gui"
Issue #3778
2020-06-22 09:39:39 +02:00
Norman Feske
c6eda9bd80 Rename include/nitpicker_session to gui_session
This patch also renames the depot api archive accordingly.

Issue #3778
2020-06-22 09:39:39 +02:00
Alexander Boettcher
87b08d6c7f libc: support pthread placement configuration
Up to now all pthreads get placed on one CPU.

The patch adds support to evaluate a libc pthread configuration specifying
a placement strategy.

The default strategy is now to use all available CPUs as imposed by Genode's
affinity configuration for the pthread application.

The old behaviour, putting all pthreads on one single cpu can be still
configured by:

<libc>
 <pthread placement="single-cpu"/>
 ...
</libc>

Fixes #3775
2020-06-22 09:39:39 +02:00
Alexander Boettcher
5f7e670ebc release_notes: fix Sculpt ARM 64 topic branch link 2020-06-22 09:39:39 +02:00
Josef Söntgen
e8fec3eed6 terminal_log: remove session size check
The amount of RAM required by the session object is already accounted
for by the Root_component.

Fixes #3776.
2020-06-22 09:39:38 +02:00
Emery Hemingway
dc8b4eeb40 cached_fs_rom: diagnosis of delivered ROM sessions
To enable logging of ROM session deliveries, set the "diag" on
session routes:

<route>
  <service name="ROM" label_prefix="/bin/">
    <child name="cached_fs_rom" diag="yes"/>
  </service>
  …
<route>

Fix #3772
2020-06-22 09:39:38 +02:00
Christian Helmuth
4f87fbd5ae Support linux and mod_openssl in lighttpd test 2020-06-22 09:39:38 +02:00
Christian Helmuth
df3f7dc1bc Support linux in manual fetchurl test 2020-06-22 09:39:38 +02:00
Christian Helmuth
8e85d889f1 libc: generate osreldate.h 2020-06-22 09:39:38 +02:00
Norman Feske
f687b0f3b9 News item for Sculpt 20.05 2020-06-22 09:39:38 +02:00
3680 changed files with 100618 additions and 63094 deletions

26
README
View File

@@ -65,34 +65,24 @@ The source tree is composed of the following subdirectories:
:'doc':
This directory contains general documentation. Please consider the following
document for a quick guide to get started with the framework:
! doc/getting_started.txt
If you are curious about the ready-to-use components that come with the
framework, please review the components overview:
! doc/components.txt
This directory contains general documentation along with a comprehensive
collection of release notes.
:'repos':
This directory contains the so-called source-code repositories of Genode.
Please refer to the README file in the 'repos' directory to learn more
about the roles of the individual repositories.
This directory contains the source code, organized in so-called source-code
repositories. Please refer to the README file in the 'repos' directory to
learn more about the roles of the individual repositories.
:'tool':
Source-code management tools and scripts. Please refer to the README file
contained in the directory.
:'depot' and 'public':
:'depot':
Local depot and public archive of Genode packages. Please refer to
! doc/depot.txt
for more details.
Directory used by Genode's package-management tools. It contains the public
keys and download locations of software providers.
Additional community-maintained components

View File

@@ -1 +1 @@
20.05
21.02

View File

@@ -93,6 +93,24 @@ and the source code always looks good.
_Hint:_ In VIM, use the 'set list' and 'set listchars' commands to make tabs
and spaces visible.
* If class initializers span multiple lines, put the colon on a separate
line and indent the initializers using one tab. For example:
! Complicated_machinery(Material &material, Deadline deadline)
! :
! <tab>_material(material),
! <tab>_deadline(deadline),
! <tab>...
! {
! ...
! }
* Preferably place statements that alter the control flow - such as
'break', 'continue', or 'return' - at the beginning of a separate line,
followed by vertical space (a blank line or the closing brace of the
surrounding scope).
! if (early_return_possible)
! return;
Switch statements
~~~~~~~~~~~~~~~~~

View File

@@ -31,11 +31,11 @@ of them is briefly characterized as follows:
session interfaces. Naturally, a device driver is specific to a
particular hardware platform. The hardware resources are accessed
via core's IO_MEM, IO_PORT, and IRQ services. The functionality of
the driver is made available to other system components by announcing
the driver is made available to other system components via
one of Genode's device-independent session interfaces, which are
'platform_session', 'framebuffer_session', 'input_session', 'block_session',
'platform_session', 'capture_session', 'event_session', 'block_session',
'audio_out_session', 'log_session', 'nic_session', and 'timer_session'
(see 'os/include/' for the interface definitions). Those interfaces are
(see _os/include/_ for the interface definitions). Those interfaces are
uniform across hardware platforms and kernel base platforms. Usually,
each device driver can accommodate only one client at a time.
@@ -64,7 +64,7 @@ of them is briefly characterized as follows:
Device drivers
##############
Device drivers usually reside in the 'src/drivers' subdirectory of source-code
Device drivers usually reside in the _src/drivers/_ subdirectory of source-code
repositories. The most predominant repositories hosting device drivers are
'os', 'dde_ipxe', 'dde_linux'.
@@ -72,23 +72,23 @@ repositories. The most predominant repositories hosting device drivers are
Platform devices
================
:'os/src/drivers/platform/': Platform drivers for various platforms.
:_os/src/drivers/platform/_: Platform drivers for various platforms.
On x86, the platform driver uses the PCI controller as found on x86 PC
hardware. A client can probe for a particular device and request information
about physical device resources (using the 'platform_device' interface). I/O
resources for MMIO regions, I/O ports, and interrupts can be requested by the
provided device abstraction.
:'os/src/drivers/acpi':
:_os/src/drivers/acpi/_:
On x86 platforms that use the APIC (namely Fiasco.OC, NOVA, and hw_x86_64)
this simple ACPI parser traverses the ACPI tables and reports device-resource
information (e.g., interrupt lines of PCI devices).
:'os/src/app/smbios_decoder':
:_os/src/app/smbios_decoder/_:
A component that parses SMBIOS information on x86 platforms and makes the
result available as a report.
:'libports/src/app/acpica':
:_libports/src/app/acpica/_:
In addition to our ACPI base driver, the acpica component uses the
ACPICA library to provide access to dynamic functions like battery
states, events (e.g., notebook lid close and power buttons), as well
@@ -102,82 +102,75 @@ UART devices
The UART device drivers implement the UART-session interface.
:'os/src/drivers/uart/spec/pbxa9':
:_os/src/drivers/uart/spec/pbxa9/_:
Driver for the PL011 UART as found on many ARM-based platforms.
:'os/src/drivers/uart/spec/x86':
:_os/src/drivers/uart/spec/x86/_:
Driver for the i8250 UART as found on PC hardware.
Framebuffer and input drivers
=============================
Framebuffer and input drivers implement the framebuffer-session interface and
input-session interfaces respectively.
Framebuffer and input drivers are implemented as clients of the
capture-session and event-session interfaces respectively.
:'os/src/drivers/input/dummy':
Pseudo input driver without accessing any hardware. This component is useful
to resolve a dependency from an input session for scenarios where no user
input is required.
:'os/src/drivers/input/spec/ps2/x86':
:_os/src/drivers/ps2/x86/_:
Driver for the 'i8042' PS/2 controller as found in x86 PCs. It supports both
mouse (including ImPS/2, ExPS/2) and keyboard.
:'os/src/drivers/input/spec/ps2/pl050':
:_os/src/drivers/ps2/pl050/_:
Driver for the PL050 PS/2 controller as found on ARM platforms such as
VersatilePB. The physical base address used by the driver is obtained at
compile time from a header file called 'pl050_defs.h'. The version of the
VersatilePB platform can be found at 'os/include/platform/vpb926/' and
compile time from a header file called _pl050_defs.h_. The version of the
VersatilePB platform can be found at _os/include/platform/vpb926/_ and
is made available to the driver via the SPECS machinery of the Genode build
system.
:'os/src/drivers/input/spec/imx53':
Input driver for Egalaxy touchscreen and Freescale's MPR121
capacitative touch buttons on i.MX53.
:'libports/src/drivers/framebuffer/vesa':
:_libports/src/drivers/framebuffer/vesa/_:
Driver using VESA mode setting on x86 PCs. For more information, please refer
to the README file in the driver directory.
:'libports/src/drivers/framebuffer/boot':
:_libports/src/drivers/framebuffer/boot/_:
Driver for boot-time initialized framebuffers (e.g., UEFI GOP)
discovered from the 'platform_info' ROM
:'os/src/drivers/framebuffer/pl11x':
:_os/src/drivers/framebuffer/pl11x/_:
Driver for the PL110/PL111 LCD display.
:'os/src/drivers/framebuffer/spec/imx53':
:_os/src/drivers/framebuffer/imx53/_:
Driver for LCD output on i.MX53 SoCs.
:'os/src/drivers/framebuffer/spec/rpi':
:_os/src/drivers/framebuffer/rpi/_:
Driver for the HDMI output of the Raspberry Pi.
:'os/src/drivers/framebuffer/spec/sdl':
:_os/src/drivers/framebuffer/sdl/_:
Serves as both framebuffer and input driver on Linux using libSDL. This
driver is only usable on the Linux base platform.
:'os/src/drivers/gpu/intel':
:_os/src/drivers/gpu/intel/_:
An experimental Intel Graphics GPU multiplexer for Broadwell and newer.
:'dde_linux/src/drivers/framebuffer/intel':
:_dde_linux/src/drivers/framebuffer/intel/_:
Framebuffer driver for Intel i915 compatible graphic cards based on
the Linux Intel KMS driver.
:'dde_linux/src/drivers/usb':
USB driver that makes USB HID and USB storage devices available as input
sessions and block session respectively. For examples of using this driver,
refer to the run scripts at 'dde_linux/run/usb_hid' and
'dde_linux/run/usb_storage'.
:_dde_linux/src/drivers/usb_host/_:
USB host-controller driver that provides an USB session interface to
USB drivers.
:'dde_linux/src/drivers/usb_hid':
:_dde_linux/src/drivers/usb_hid/_:
USB Human Interface Device driver using the USB session interface.
:_os/src/drivers/usb_block/_:
USB storage driver that uses the USB session interface and provides
a block-session interface.
Timer drivers
=============
The timer driver located at 'os/src/drivers/timer' implements the timer-session
The timer driver located at _base/src/timer/_ implements the timer-session
interface. Technically, it is both a device driver (accessing a timer
device) and a resource multiplexer (supporting multiple timer-session clients
at the same time). Depending on the base platform, the implementation uses
@@ -198,13 +191,13 @@ Audio drivers
=============
Audio drivers implement the Audio_out session interface defined at
'os/include/audio_out_session/' for playback and optionally the audio_in
_os/include/audio_out_session/_ for playback and optionally the audio_in
interface for recording.
:'os/src/drivers/audio/spec/linux':
:_os/src/drivers/audio/spec/linux/_:
Uses ALSA as back-end on the Linux base platform and supports only playback.
:'dde_bsd/src/drivers/audio':
:_dde_bsd/src/drivers/audio/_:
Sound drivers ported from OpenBSD. Currently, the repository
includes support for Intel HD Audio as well as for Ensoniq AudioPCI
(ES1370) compatible sound cards.
@@ -214,31 +207,31 @@ Block drivers
=============
All block drivers implement the block-session interface defined at
'os/include/block_session/'.
_os/include/block_session/_.
:'os/src/drivers/sd_card/spec/pl180':
:_os/src/drivers/sd_card/spec/pl180/_:
Driver for SD-cards connected via the PL180 device as found on the PBX-A9
platform.
:'os/src/drivers/sd_card/spec/imx53':
:_os/src/drivers/sd_card/spec/imx53/_:
Driver for SD-cards connected to the Freescale i.MX53 platform like the
Quick Start Board or the USB armory device.
:'os/src/drivers/sd_card/spec/rpi':
:_os/src/drivers/sd_card/spec/rpi/_:
Driver for SD-cards connected to the Raspberry Pi.
:'dde_linux/src/drivers/usb':
:_dde_linux/src/drivers/usb/_:
USB driver that makes USB storage devices available as block sessions.
For an example of using this driver, refer to the run script at
'dde_linux/run/usb_storage'.
_dde_linux/run/usb_storage.run_.
:'os/src/drivers/ahci':
:_os/src/drivers/ahci/_:
Driver for SATA disks and CD-ROMs on x86 PCs.
:'os/src/drivers/nvme':
:_os/src/drivers/nvme/_:
Driver for NVMe block devices on x86 PCs.
:'os/src/drivers/usb_block':
:_os/src/drivers/usb_block/_:
USB Mass Storage Bulk-Only driver using the USB session interface.
@@ -246,82 +239,83 @@ Network interface drivers
=========================
All network interface drivers implement the NIC session interface
defined at 'os/include/nic_session'.
defined at _os/include/nic_session/_.
:'os/src/drivers/nic/spec/linux':
:_os/src/drivers/nic/spec/linux/_:
Driver that uses a Linux tap device as back end. It is only useful on the
Linux base platform.
:'os/src/drivers/nic/spec/lan9118':
:_os/src/drivers/nic/spec/lan9118/_:
Native device driver for the LAN9118 network adaptor as featured on the
PBX-A9 platform.
:'dde_ipxe/src/drivers/nic':
:_dde_ipxe/src/drivers/nic/_:
Device drivers ported from the iPXE project. Supported devices are Intel
E1000 and pcnet32.
:'dde_linux/src/drivers/wifi':
:_dde_linux/src/drivers/wifi/_:
The wifi_drv component is a port of the Linux mac802.11 stack, including the
iwlwifi driver. It enables the use of Intel Wireless 6xxx and 7xxx cards.
:'dde_linux/src/drivers/usb':
:_dde_linux/src/drivers/usb/_:
For the OMAP4 platform, the USB driver contains the networking driver.
:'dde_linux/src/drivers/nic/fec':
:_dde_linux/src/drivers/nic/fec/_:
Driver for ethernet NICs of the i.MX SoC family.
General-purpose I/O drivers
===========================
:'os/src/drivers/gpio/spec/imx53':
:_os/src/drivers/gpio/spec/imx53/_:
Driver for accessing the GPIO pins of i.MX53 platforms.
:'os/src/drivers/gpio/spec/rpi':
:_os/src/drivers/gpio/spec/rpi/_:
Driver for accessing the GPIO pins of Raspberry Pi platforms.
Resource multiplexers
#####################
By convention, resource multiplexers are located at the 'src/server'
By convention, resource multiplexers are located at the _src/server/_
subdirectory of a source repository.
:Framebuffer and input: The framebuffer and input session interfaces can be
multiplexed using the Nitpicker GUI server, which allows multiple clients to
create and manage rectangular areas on screen. Nitpicker uses one input
session and one framebuffer session as back end and, in turn, provides
so-called nitpicker sessions to one or multiple clients. Each nitpicker
session contains a virtual framebuffer and a virtual input session. Nitpicker
(including a README file) is located at 'os/src/server/nitpicker'.
:Framebuffer and input: Framebuffer and input devices can be multiplexed using
the Nitpicker GUI server, which allows multiple clients to create and manage
rectangular areas on screen. Nitpicker serves as broker between input
devices, output devices, and graphical applications. It provides an event
service for input drivers, a capture service for output drivers, and a GUI
service for the applications. Each GUI session contains a virtual
framebuffer and a virtual input interface. Nitpicker (including a README
file) is located at _os/src/server/nitpicker/_.
:Audio output: The audio mixer located at 'os/src/server/mixer' enables
:Audio output: The audio mixer located at _os/src/server/mixer/_ enables
multiple clients to use the audio-out interface. The mixing is done by simply
adding and clamping the signals of all present clients.
:Networking: The NIC bridge located at 'os/src/server/nic_bridge' multiplexes
:Networking: The NIC bridge located at _os/src/server/nic_bridge/_ multiplexes
one NIC session to multiple virtual NIC sessions using a proxy-ARP
implementation. Each client has to obtain a dedicated IP address visible to
the physical network. DHCP requests originating from the virtual NIC sessions
are delegated to the physical network.
The NIC router located at 'os/src/server/nic_router' multiplexes one NIC
The NIC router located at _os/src/server/nic_router/_ multiplexes one NIC
session to multiple virtual NIC sessions by applying network address
translation (NAT).
:Block: The block-device partition server at 'os/src/server/part_block' reads
:Block: The block-device partition server at _os/src/server/part_block/_ reads
the partition table of a block session and exports each partition found as
separate block session. For using this server, please refer to the run
script at 'os/run/part_block'.
script at _os/run/part_block.run_.
:File system: The VFS file-system server allows multiple clients to
concurrently access the same virtual file system. It is located at
'os/src/server/vfs'. The VFS can be assembled out of several builtin
_os/src/server/vfs/_. The VFS can be assembled out of several builtin
file-system types (like a RAM file system, or pseudo file systems for
various Genode session interfaces) as well as external plugins such as rump
(mounting file systems supported by the NetBSD kernel).
:Terminal: The terminal_mux service located at gems/src/server/terminal_mux
:Terminal: The terminal_mux service located at _gems/src/server/terminal_mux/_
is able to provide multiple terminal sessions over one terminal-client
session. The user can switch between the different sessions using a keyboard
shortcut, which brings up an ncurses-based menu.
@@ -336,130 +330,125 @@ one session interface to another, or in the form of libraries.
Separate components
===================
:'os/src/server/nit_fb':
Translates a nitpicker session to a pair of framebuffer and input sessions.
Each 'nit_fb' instance is visible as a rectangular area on screen presenting
:_os/src/server/gui_fb/_:
Translates a GUI session to a pair of framebuffer and input sessions.
Each 'gui_fb' instance is visible as a rectangular area on screen presenting
a virtual frame buffer. The area is statically positioned. For more
information, please refer to 'os/src/server/nit_fb/README'.
information, please refer to _os/src/server/gui_fb/README_.
:'gems/src/server/wm':
Window manager that implements the nitpicker session interface but manages
:_gems/src/server/wm/_:
Window manager that implements the GUI session interface but manages
each client view as a separate window. The window decorations are provided
by a so-called decorator (e.g., 'gems/src/app/decorator'). The behaviour
by a so-called decorator (e.g., _gems/src/app/decorator/_). The behaviour
is defined by a so-called window layouter such as the floating window
layouter located at 'gems/src/app/floating_window_layouter/'.
layouter located at _gems/src/app/floating_window_layouter/_.
:'demo/src/server/liquid_framebuffer':
Implements the same translation as 'nit_fb' but by presenting an interactive
:_demo/src/server/liquid_framebuffer/_:
Implements the same translation as 'gui_fb' but by presenting an interactive
window rather than a statically positioned screen area.
:'os/src/server/tar_rom':
:_os/src/server/tar_rom/_:
Provides each file contained in a tar file obtained via Genode's ROM session
as separate ROM session.
:'os/src/server/iso9660':
:_os/src/server/iso9660/_:
Provides each file of an ISO9660 file system accessed via a block session as
separate ROM session.
:'os/src/server/lx_fs':
:_os/src/server/lx_fs/_:
A file system server that makes the file system of a Linux base platform
available to Genode.
:'os/src/server/rom_block':
Provides the content of a ROM file as a block session, similar to the
loop-mount mechanism on Linux
:_os/src/server/vfs_block/_:
Provides the content of a file obtained from a VFS as a block session,
similar to the loop-mount mechanism on Linux
:'os/src/server/ram_block':
Provides the content of a RAM dataspace as a block session. In contrast
to 'rom_block', this server provides a writeable block device.
:'os/src/server/terminal_log':
:_os/src/server/terminal_log/_:
Adapter for forwarding LOG messages to a terminal session.
:'os/src/server/log_terminal':
:_os/src/server/log_terminal/_:
Adapter for forwarding terminal output to a LOG session.
:'os/src/server/fs_log':
:_os/src/server/fs_log/_:
Adapter that writes LOG messages to files on a file system.
:'demo/src/server/nitlog':
Provides a LOG session, printing log output on screen via a nitpicker
session.
:_demo/src/server/nitlog/_:
Provides a LOG session, printing log output on screen via a GUI session.
:'os/src/app/rom_logger':
:_os/src/app/rom_logger/_:
The rom_logger component requests a ROM session and writes the
content of the ROM dataspace to the LOG.
:'os/src/server/rom_filter':
:_os/src/server/rom_filter/_:
The ROM filter provides a ROM module that depends on the content of
other ROM modules steered by the filter configuration, e.g., dynamic
switching between configuration variants dependent on the state of
the system.
:'os/src/server/log_terminal':
:_os/src/server/log_terminal/_:
Forwards terminal output to a LOG session.
:'gems/src/server/file_terminal':
:_gems/src/server/file_terminal/_:
Provides terminal sessions that target files on a file system.
:'gems/src/server/terminal':
:_gems/src/server/terminal/_:
Provides a terminal session via a graphical terminal using a framebuffer
session and an input session.
:'gems/src/server/tcp_terminal':
:_gems/src/server/tcp_terminal/_:
Provides one or multiple terminal sessions over TCP connections.
For further information, refer to 'gems/src/server/tcp_terminal/README'.
For further information, refer to _gems/src/server/tcp_terminal/README_.
:'os/src/server/terminal_crosslink':
:_os/src/server/terminal_crosslink/_:
The terminal crosslink service allows to terminal clients to talk to each
other.
:'gems/src/server/http_block':
:_gems/src/server/http_block/_:
A block service that fetches a virtual block device over the network from
a HTTP server.
:'os/src/server/fs_rom':
:_os/src/server/fs_rom/_:
A ROM service that translates the 'File_system' session interface to the
'ROM' session' interface. Each request for a ROM file is handled by looking
up an equally named file on the file system.
Please refer to 'os/src/server/fs_rom' for more information.
Please refer to _os/src/server/fs_rom/_ for more information.
For use cases where ROMs are known to be static, the
'os/src/server/cached_fs_rom' can be considered as a faster alternative to
_os/src/server/cached_fs_rom/_ can be considered as a faster alternative to
the regular 'fs_rom' server. Note that 'cached_fs_rom' is not supported
in base-linux though.
:'os/src/server/chroot':
:_os/src/server/chroot/_:
An intermediate file-system server that makes a sub directory of a file
system available as the root of a file system handed out to its client.
:'os/src/server/dynamic_rom':
:_os/src/server/dynamic_rom/_:
A simple ROM service that provides ROM modules that change in time according
to a configured timeline.
:'os/src/server/report_rom':
:_os/src/server/report_rom/_:
A service that implements both the report session interface and the ROM
session interface. It reflects incoming reports as ROM modules.
:'os/src/server/fs_report':
:_os/src/server/fs_report/_:
Report server that writes reports to file-systems
:'os/src/server/clipboard':
:_os/src/server/clipboard/_:
This component is both a report service and a ROM service. The
clients of the report service can issue new clipboard content, which
is then propagated to the clients of the ROM service according to a
configurable information-flow policy.
:'os/src/server/input_filter':
:_os/src/server/event_filter/_:
A component that transforms and merges input events from multiple sources
into a single stream.
into a single event stream.
:'libports/src/server/acpi_input':
:_libports/src/app/acpi_event/_:
A component that transforms ACPI events into Genode input events.
:'gems/src/server/nit_fader':
A wrapper for nitpicker's session interface that applies alpha-blending to
the of views a nitpicker client.
:_gems/src/server/gui_fader/_:
A wrapper for nitpicker's GUI session interface that applies alpha-blending
to the of views a GUI client.
VFS plugins
@@ -470,37 +459,37 @@ implement the VFS-plugin interface. They can be combined with any application
based on Genode's C runtime, with the VFS server, and with non-POSIX
components that use the Genode's VFS library directly.
:'gems/src/lib/vfs/trace':
:_gems/src/lib/vfs/trace/_:
A VFS plugin that makes core's TRACE service accessible as a pseudo
file system.
:'gems/src/lib/vfs/import':
:_gems/src/lib/vfs/import/_:
A VFS plugin that pre-populates a VFS with initial content.
:'gems/src/lib/vfs/pipe':
:_gems/src/lib/vfs/pipe/_:
A VFS plugin that provides bi-directional pipes for exchanging streamed
data between components.
:'gems/src/lib/vfs/ttf':
:_gems/src/lib/vfs/ttf/_:
A VFS plugin that makes rendered pixel data of the glyphs of Truetype fonts
available as a pseudo file system.
:'libports/src/lib/vfs/jitterentropy':
:_libports/src/lib/vfs/jitterentropy/_:
A VFS plugin that provides random numbers based on the jitter of executing
CPU instructions.
:'libports/src/lib/vfs/lwip':
:_libports/src/lib/vfs/lwip/_:
A VFS plugin that uses the light-weight IP (lwIP) stack to provide a
network socket interface as a pseudo file system.
:'dde_linux/src/lib/vfs/lxip':
:_dde_linux/src/lib/vfs/lxip/_:
A VFS plugin that uses the TCP/IP stack ported from the Linux kernel to
provide a network socket interface as a pseudo file system.
:'libports/src/lib/vfs/fatfs':
:_libports/src/lib/vfs/fatfs/_:
A VFS plugin that allows for the mounting of FAT-formatted block devices.
:'dde_rump/src/lib/vfs/rump':
:_dde_rump/src/lib/vfs/rump/_:
A VFS plugin that enables the use of NetBSD's file-system drivers such
as ext2 or msdos.
@@ -508,41 +497,41 @@ components that use the Genode's VFS library directly.
Libraries
=========
:'libports/lib/mk/libc':
:_libports/lib/mk/libc/_:
C runtime ported from FreeBSD.
:'libports/lib/mk/stdcxx':
:_libports/lib/mk/stdcxx/_:
Standard C++ library
:'libports/lib/mk/mesa_api':
:_libports/lib/mk/mesa_api/_:
Mesa OpenGL API with backends for software rasterization (egl_swrast)
and Intel Graphics (egl_i965)
:'libports/lib/mk/mupdf':
:_libports/lib/mk/mupdf/_:
PDF rendering engine.
:'libports/lib/mk/ncurses':
:_libports/lib/mk/ncurses/_:
Library for implementing pseudo-graphical applications (i.e., VIM) that
run on a text terminal.
:'libports/lib/mk/qt5_*':
Qt5 framework, using nitpicker session and NIC session as back end.
:_libports/lib/mk/qt5_*/_:
Qt5 framework, using GUI session and NIC session as back end.
:'libports/lib/mk/vfs_jitterentropy.mk':
:_libports/lib/mk/vfs_jitterentropy.mk_:
A VFS plugin that makes a jitter-based random-number generator available
as a file within the process-local VFS.
:'libports/lib/mk/libarchive.mk':
:_libports/lib/mk/libarchive.mk_:
Library providing a common interface to a variety of archive
formats.
:'libports/lib/mk/lz4.mk':
:_libports/lib/mk/lz4.mk_:
Library for processing LZ4 lossless compression archives.
:'libports/lib/mk/liblzma.mk':
:_libports/lib/mk/liblzma.mk_:
Library for processing LZMA archives.
:'libports/lib/mk/libgcrypt.mk':
:_libports/lib/mk/libgcrypt.mk_:
GnuPG library for OpenPGP processing, e.g., signature verification.
@@ -550,100 +539,96 @@ Applications
############
Applications are Genode components that use other component's services but
usually do not provide services. They are typically located in the 'src/app/'
usually do not provide services. They are typically located in the _src/app/_
subdirectory of a repository. Most applications come with README files
located in their respective directory.
:'gems/src/app/backdrop':
Nitpicker client application that sets a composition of PNG images as
desktop background.
:_gems/src/app/backdrop/_:
GUI client application that sets a composition of PNG images as desktop
background.
:'demo/src/app/launchpad':
:_demo/src/app/launchpad/_:
Graphical application for interactively starting and killing subsystems.
:'gems/app/launcher': Graphical launcher of Genode subsystems.
:'demo/src/app/scout':
:_demo/src/app/scout/_:
Graphical hypertext browser used for Genode's default demonstration scenario.
:'libports/src/test/mesa_demo':
Example programs for using the Mesa OpenGL graphics stack.
:'ports/src/app/arora':
Arora is a Qt-based web browser using the Webkit engine.
:'ports/src/app/gdb_monitor':
:_ports/src/app/gdb_monitor/_:
Application that allows the debugging of a process via GDB over a remote
connection.
:'libports/src/app/qt5/qt_launchpad':
:_libports/src/app/qt5/qt_launchpad/_:
Graphical application starter implemented using Qt.
:'libports/src/app/qt5/examples/':
:_libports/src/app/qt5/examples/_:
Several example applications that come with Qt.
:'os/src/app/sequence':
:_os/src/app/sequence/_:
Simple utility to serialize the execution of multiple components
:'ports/src/noux-pkg':
:_ports/src/noux-pkg/_:
Ports of popular commandline-based Unix software such as VIM, bash,
coreutils, binutils, gcc, findutils, and netcat. The programs are supposed
to be executed within the Noux runtime environment.
:'ports/src/app/lighttpd':
:_ports/src/app/lighttpd/_:
Lighttpd is a fast and feature-rich web server. The port of lighttpd uses
a file-system session to access the website content and the web-server
configuration.
:'os/src/app/trace_logger':
:_os/src/app/trace_logger/_:
Convenient, runtime-configurable frontend to the tracing facility.
:'os/src/app/rom_reporter':
:_os/src/app/rom_reporter/_:
The ROM-reporter component requests a ROM session and reports the
content of the ROM dataspace to a report session with the same label
as the ROM session.
:'os/src/app/log_core':
:_os/src/app/log_core/_:
Component transforming core and kernel output to Genode LOG output.
Package-management components
=============================
:'gems/src/app/depot_query':
:_gems/src/app/depot_query/_:
Tool for querying subsystem information from a depot.
:'gems/src/app/depot_download_manager':
:_gems/src/app/depot_download_manager/_:
Tool for managing the download of depot content.
:'gems/src/app/depot_deploy':
:_gems/src/app/depot_deploy/_:
Subsystem init configuration generator based on blueprints.
:'libports/src/app/fetchurl':
:_libports/src/app/fetchurl/_:
A runtime-configurable frontend to the libcURL library for
downloading content.
:'libports/src/app/extract':
:_libports/src/app/extract/_:
Tool for extracting archives using libarchive.
:'ports/src/app/verify':
:_ports/src/app/verify/_:
This component verifies detached OpenPGP signatures using libgcrypt.
Runtime environments
####################
:'ports/src/app/seoul': Seoul is a virtual-machine monitor developed for
:_ports/src/app/seoul/_: Seoul is a virtual-machine monitor developed for
the use with the NOVA platform. It virtualizes 32bit x86 PC hardware
including various peripherals.
:'os/src/server/loader': A service that allows the creation and destruction
:_os/src/server/loader/_: A service that allows the creation and destruction
of Genode subsystems via a session interface. For further information,
refer to 'os/src/server/loader/README'.
refer to _os/src/server/loader/README_.
:'ports/src/virtualbox': VirtualBox running on top of the NOVA hypervisor.
:_ports/src/virtualbox5/_: VirtualBox running on top of the NOVA hypervisor.
:'os/src/server/vmm': A virtual machine monitor that is based on
:_os/src/server/vmm/_: A virtual machine monitor that is based on
hardware-assisted virtualization of ARM platforms. It is supported on
the base-hw kernel only.
:_os/src/server/cpu_balancer/_: The CPU balancer intercepts the interaction
of components with core's low-level services to migrate threads dynamically
between CPU cores.

View File

@@ -50,9 +50,17 @@ This creates a new build directory for building x86_64 binaries in './build'.
The build system creates unified binaries that work on the given
architecture independent from the underlying base platform, in this case Linux.
To give Genode a try, build and execute a simple demo scenario via:
Now change into the fresh build directory:
! cd build/x86_64
Please uncomment the following line in 'etc/build.conf' to make the
build process as smooth as possible.
! RUN_OPT += --depot-auto-update
To give Genode a try, build and execute a simple demo scenario via:
! make KERNEL=linux BOARD=linux run/demo
By invoking 'make' with the 'run/demo' argument, all components needed by the

View File

@@ -4,6 +4,207 @@
===========
Genode OS Framework release 21.02 | 2021-02-25
##############################################
| The highlights of version 21.02 are the addition of VirtualBox 6,
| mobile-data connectivity via LTE, pluggable network drivers, initial
| support for the Pine-A64-LTS board, and revived work on RISC-V.
Many topics of the current release draw a connection to our overarching goal
to use Genode on the Pinephone by the end of the year. Besides the obvious
steps of enabling the hardware - starting with the Pine-A64-LTS board - the
release introduces mobile-data connectivity as a Genode feature, and changes
the network-driver architecture in anticipation of dynamic power-management
schemes.
For PC hardware, the flagship feature of version 21.02 is the addition of
VirtualBox 6, giving us the prospect to eventually replace the aging port of
VirtualBox 5. Speaking of VirtualBox, the release comes with profound
improvements of the USB-device pass-through abilities, most importantly
covering audio headsets.
Besides these prominent features, the new version comes with many further
improvements. Just to name a few, virtual machines on ARM have become
able to provide VirtIO-block devices to guests, named pipes can now
be used to connect components, Genode's RISC-V support received an
update to ISA spec 1.10, and OpenSSL has been bumped to version 1.1.1.
For the full story, please refer to the
[https:/documentation/release-notes/21.02 - release documentation of version 21.02...]
Road Map for 2021 | 2021-01-15
##############################
| In 2021, we plan to bring Genode to the Pinephone, advance the framework's
| GPU support, and focus on development workflows.
During the annual road-map discussion on Genode's public
[https://genode.org/community/mailing-lists - mailing list],
the following hot topics for this year emerged.
First and most inspiring for many Genode developers, we aspire to have
Genode running on the Pinephone with basic feature-phone functionality by the
end of the year. Since this will involve substantial device-driver-related
developments, the team will take this line of work as an opportunity to
advance the tooling and workflows for carrying out such tasks. This, in turn,
will hopefully ease the on-boarding of new driver developers in the future.
Closely related to the Pinephone scenario, the project will make optimizations
a top priority this year. The opportunities are plenty, ranging from
micro-optimizations, over API refinements, to architectural changes if
needed.
Another recurring topic is the request for GPU support, which is required
by many modern workloads such as video conferencing or streaming on mobile
device. Therefore, we will revamp our past developments of GPU multiplexing
on Intel hardware while also starting the investigation of GPUs on ARM-based
devices.
More information about our review of the past year, this year's focus, and a
rough schedule are presented at our official
[https:/about/road-map - road-map page].
Genode OS Framework release 20.11 | 2020-11-27
##############################################
| Genode 20.11 brings Sculpt OS to 64-bit ARM hardware, introduces dynamic
| CPU-load balancing, and enables multicore virtualization on ARM. Driver-wise,
| the release improves audio on PC hardware, and adds VirtIO networking support.
ARM 64-bit has been a recurring theme of the Genode releases this year and the
just released version 20.11 is no exception. We are proud to announce that our
Genode-based custom general-purpose OS called Sculpt has come to life on
64-bit ARM hardware, namely the NXP i.MX8 EVK board. This is the result of
intensive work on the framework's driver architecture for ARM and several
SoC-specific device drivers. Closely related to this line of work is the new
ability to run multicore virtual machines on ARM.
Another highlight of version 20.11 is a new CPU balancing mechanism, which
automates the dynamic assignment of threads to CPU cores for complex
workloads. With traditional operating systems, such policies are normally part
of the OS kernel. Thanks to Genode's component architecture, we are able to
implement such potentially complex policies in the form of an optional
component, which offers ultimate flexibility while keeping the kernel
untainted by complex heuristics.
Further topics of the current release are improved power management and audio
support on PC hardware, a new OSS API emulation that allows for the
reuse of popular audio applications on Genode, and new support for VirtIO
networking. The full picture is given by the
[https:/documentation/release-notes/20.11 - release documentation of version 20.11...]
Sculpt OS release 20.08 | 2020-09-17
####################################
| Version 20.08 of the Sculpt operating system refines the user experience
| and becomes able to host the Chromium-based Falkon web browser.
The new version of Sculpt OS is based on the latest Genode release
[https://genode.org/documentation/release-notes/20.08 - 20.08].
In particular, it incorporates the
[https://genode.org/documentation/release-notes/20.08#The_GUI_stack__restacked - redesigned GUI stack]
to the benefit of quicker boot times, improved interactive responsiveness, and
better pixel output quality.
It also removes the last traces of the
[https://genode.org/documentation/release-notes/20.05#Retired_Noux_runtime_environment - noux runtime].
Fortunately, these massive under-the-hood changes do not disrupt the
user-visible surface of Sculpt. Most users will feel right at home.
Upon closer inspection, there are couple of new features to appreciate. The
CPU-affinity of each component can now be restricted interactively by the user,
components can be easily restarted via a click on a button, font-size changes
have an immediate effect now, and the VESA driver (used when running Sculpt in
a virtual machine) can dynamically change the screen resolution.
Thanks to our continuous efforts of strengthening of the base system, Sculpt
OS has become able to host a first version of the Chromium-based Falkon web
browser from an installable package. Even though this version is still rough
around the edges and unoptimized, it already enables Sculpt users to casually
browse the modern web without the need for a virtual machine.
The updated [https://genode.org/documentation/articles/sculpt-20-08 - manual]
goes into detail about the use of the new system.
The ready-to-use system image for version 20.08 is available at the
[https://genode.org/download/sculpt - Sculpt download page].
Genode OS Framework release 20.08 | 2020-08-28
##############################################
| With Genode 20.08, the low-level GUI stack underwent a profound redesign,
| the Chromium web engine comes to life, the i.MX8 support covers clock and
| power management, and the CBE block encrypter becomes highly modular.
The most stunning feature of Genode 20.08 is most certainly the new ability
to host the Chromium web engine as native component in the form of the Falkon
web browser. This long-time project involved overcoming countless road
blocks along the way to the great benefit of Genode's users at large: building
bridges between 3rd-party build systems and Genode, covering seemingly obscure
corner cases of POSIX, solving instruction-cache invalidation issues on ARM -
just to name a few.
Under the hood, we took the release cycle as opportunity to tackle a major
surgery of the low-level GUI stack that we planned for more than two years.
The architectural change lays the groundwork for swapping out graphics and
input drivers on the fly without reboot. It also paves the ground for features
like screen capturing and remote desktop scenarios in a privacy-protecting
way.
On our mission of bringing the driver support for the 64-bit ARM-based i.MX8
SoC on par with our driver coverage on Intel PCs, the release introduces a
platform driver specifically for this SoC that covers clock and power
management. One step closer to using Sculpt OS on the MNT Reform laptop.
Furthermore, Genode's custom block encrypter called CBE received continuous
development. In particular, the cryptographic algorithm and trust anchor
have become pluggable modules. This will allow for tailoring the CBE to
custom products - like hardware trust anchors - without changing its
implementation.
These and many more improvements are covered in detail in the
[https:/documentation/release-notes/20.08 - release documentation of version 20.08...]
Genode OS Framework release 20.05 | 2020-05-28
##############################################
| Version 20.05 wraps up the consolidation of Noux with the C runtime,
| advances the device-driver infrastructure and virtualization support on ARM,
| reaches feature-completion of our block encryptor, and leverages seccomp for
| sandboxing components on top of Linux.
It has become almost a tradition to dedicate the spring release to topics
under the hood of the Genode OS framework, taking the time for careful
consolidation, and architectural improvements.
On the latter account, the Linux version gained an architectural revamp of its
inter-component communication model, leveraging the combination of the
seccomp and epoll kernel mechanisms to enable Genode's capability-based
security concept on this kernel. The new version applies strict sandboxing
to each component individually. In particular, the host file system is
shielded from Genode components and Genode's least-privilege access-control
scheme comes into effect.
As the second prominent architectural topic, the release features new
device-driver infrastructure for the ARM universe along with a unified
version of the formerly distinct virtual machine monitors for ARMv7 and
ARMv8. These are important steps to bring Genode on ARM to parity with the
x86 version.
Further highlights of the release are the first feature-complete version
of our custom block-encryption component, the improved management of CPU
affinities on x86, and new tracing utilities. Last but not least, the
release is accompanied with an updated version of the Genode Foundations
book, reflecting the changes of the framework since one year ago.
Read the details of the new release in the
[https:/documentation/release-notes/20.05 - release documentation of version 20.05...]
Sculpt OS release 20.02 | 2020-03-10
####################################
@@ -72,7 +273,7 @@ please consult the
Road Map for 2020 | 2020-01-20
##############################
| In 2019, we will be concerned about dwarfing the barrier of entry into
| In 2020, we will be concerned about dwarfing the barrier of entry into
| the Genode world.
Following the last year's leitmotif of "bridging worlds", we turn our
@@ -2815,7 +3016,7 @@ applications, most prominently, it serves as the foundation of the KDE project.
Since the release 9.05, the official distribution of Genode supports Qt4 as a
regular feature. The document "Portierung von Qt auf Genode" _(german)_
describes the challenging endeavor of porting this high-complexity C++
framework to Genode. Major problems to overcome had been the missing C libary
framework to Genode. Major problems to overcome had been the missing C library
(at the time when the project started), the integration of the Qt4 project
files with Genode's build system, the adaption of Qt4 to the basic primitives
provided by Genode, and the integration of Qt4 with Genode's GUI. In addition

View File

@@ -274,7 +274,7 @@ generates configurations for some of those drivers. For the time being, the
changes to the Sculpt manager are not yet part of the official release.
Nevertheless, you can produce a Sculpt OS image to be run on an i.MX 8M EVK
board by using the following
[https://github.com/skalk/sculpt_20.02_imx8q_evk/ - topic branch].
[https://github.com/skalk/genode/commits/sculpt_20.02_imx8q_evk - topic branch].
Alternatively, you can also have a look at Sculpt OS on ARMv8 hardware by
following the video recordings of the following talk at FOSDEM 2020.

1015
doc/release_notes/20-08.txt Normal file

File diff suppressed because it is too large Load Diff

629
doc/release_notes/20-11.txt Normal file
View File

@@ -0,0 +1,629 @@
===============================================
Release notes for the Genode OS Framework 20.11
===============================================
Genode Labs
With Genode 20.11, we focused on the scalability of real-world application
workloads, and nurtured Genode's support for 64-bit ARM hardware. We thereby
follow the overarching goal to run highly sophisticated Genode-based systems
on devices of various form factors.
When speaking of real-world workloads, we acknowledge that we cannot always
know the exact behavior of applications. The system must deal gracefully with
many unknowns: The roles and CPU intensity of threads, the interplay of
application code with I/O, memory-pressure situations, or the sudden fragility
of otherwise very useful code. The worst case must always be anticipated. In
traditional operating systems, this implies that the OS kernel needs to be
aware of certain behavioral patterns of the applications, and has to take
decisions based on heuristics. Think of CPU scheduling, load balancing among
CPU cores, driving power-saving features of the hardware, memory swapping,
caching, and responding to near-fatal situations like OOM.
Genode allows us to move such complex heuristics outside the kernel into
dedicated components. Our new CPU balancer described in Section
[CPU-load balancing] is a living poster child of our approach. With this
optional component, a part of a Genode system can be subjected to a CPU-load
balancing policy of arbitrary complexity without affecting the quality of
service of unrelated components, and without polluting the OS kernel with
complexity.
A second aspect of real-world workloads is that they are usually *not*
designed for Genode. To accommodate the wealth of time tested applications, we
need to bridge the massive gap between APIs of olde (think of POSIX) and
Genode's clean-slate interfaces.
Section [Streamlined ioctl handling in the C runtime / VFS] shows how the
current release leverages our novel VFS concept for the emulation of
traditional ioctl-based interfaces. So useful existing applications come to
live without compromising the architectural benefits of Genode.
Platform-wise, the new release continues our mission to host Genode-based
systems such as [https://genode.org/download/sculpt - Sculpt OS] on 64-bit
ARM hardware. This work entails intensive development of device drivers and
the overall driver architecture.
Section [Sculpt OS on 64-bit ARM hardware (i.MX8 EVK)] reports on the
achievement of bringing Sculpt to 64-bit i.MX8 hardware. This line of work
goes almost hand in hand with the improvements of our custom virtual machine
monitor for ARM as outlined in Section [Multicore virtualization on ARM].
CPU-load balancing
##################
Migrating load over CPUs may be desirable in dynamic scenarios, where the
workload is not known in advance or too complex. For example, in case of POSIX
software ported to Genode, amount and roles of threads and processes can
generally not planned for. With the current release, we add an optional CPU
service designated for such dynamic scenarios. The new component called
[https://genodians.org/alex-ab/2020-11-16-cpu-balancer - CPU balancer] is able
to monitor threads and their utilization behaviour. Depending on configured
policies, the balancer can instruct Genode's core via the CPU session
interface to migrate threads between CPUs.
[image cpu_balancer]
The CPU balancer intercepts the interaction of a Genode subsystem
(workload) with core's low-level CPU service.
This feature requires a kernel that supports thread migration, which are
Fiasco.OC, seL4, and to some degree the NOVA kernel. For the NOVA kernel,
solely threads with an attached scheduling context can be migrated, which are
'Genode::Thread' and POSIX pthread instances. Genode's entrypoint and virtual
CPU instances are not supported.
The feature can be tested by the scenario located at _repos/os/run/cpu_balancer.run_.
Further information regarding policy configuration, a demo integration into
Sculpt 20.08, and a screencast video are available as a dedicated
[https://genodians.org/alex-ab/2020-11-16-cpu-balancer - CPU balancer]
article.
Sculpt OS on 64-bit ARM hardware (i.MX8 EVK)
############################################
Within the last year, a lot of effort was put into Genode's support for ARM
64-bit hardware. A consequent next step was to port Sculpt OS to the i.MX8 EVK
board, which we have used so far as reference platform. With the current
release, we proudly present the first incarnation of Sculpt OS for this board.
In contrast to the original x86 PC variant, this first ARM version ships with
a static set of devices inside the drivers subsystem. No device manager
component probes for the used hardware and starts drivers on demand. Instead,
the set of drivers defined in the _drivers_managed-imx8q_evk_ package enables
USB HID devices to make use of mouse and keyboard peripherals connected to the
board. It drives the SD-card, which can be used as storage back end for
Genode's depot package management. Finally, it contains drivers to manage the
display engine and the platform's device resources.
With Sculpt OS for ARM 64-bit, we not only aim for classical desktop/notebook
systems - like on x86 - but also for embedded consumer hardware like phones
and tablets. In order to leverage this goal, we enabled support for
[https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-8-series-accessory-boards:i.MX8-ACCESSORY-BOARDS - NXP's MX8_DSI_OLED1]
display on the i.MX8 platform on Genode. The panel features an OLED display as
well as a Synaptics RMI4 compliant touch screen.
Genode's i.MX8 display driver that we released with version
[https://genode.org/documentation/release-notes/20.02#Display_engine - 20.02]
supported HDMI devices only, whereas the OLED display is connected via
[https://www.mipi.org/specifications/dsi - MIPI DSI] to the SoC. Therefore, we
extended the display driver by the MIPI DSI infrastructure as well as the
actual driver for the OLED display. This endeavor turned out to be a very
rocky one, which we have documented in detail on our
[https://genodians.org/ssumpf/2020-09-30-mipi_touch - Genodians] website.
[image imx8_oled]
The administrative user interface of Sculpt OS responds to touch input.
In order to enable the touch screen device, we implemented a new Genode
component from scratch. The touch screen is connected via an I2C bus to the
SoC where data can be sent to and received from. At the moment, the I2C
implementation is hidden within the driver but as more devices require I2C
access, it will eventually become a standalone component. Interrupts are
delivered via GPIO pins from the touch screen to the SoC, which made it
necessary to enable i.MX8 support within Genode's generic i.MX GPIO driver. We
took this as an opportunity to streamline, cleanup, and make the driver more
robust. Additionally, all driver components now take advantage of the new
platform driver API for ARM that has been introduced with release
[https://genode.org/documentation/release-notes/20.05#New_platform_driver_for_the_ARM_universe - 20.05].
In its current incarnation, the driver for the display management is not able
to switch in between HDMI or MIPI-DSI connected displays dynamically.
Therefore, the display to be used in Sculpt has to be configured in the
framebuffer configuration manually. By default the HDMI connector is used.
Beyond the driver subsystem, there are few components dependent on the actual
hardware, which is why the look & feel of the Sculpt desktop does not actually
differ from the x86 PC version, with the following exceptions:
When you select the network configuration dialog, you'll have no "Wifi" option
because of the missing hardware. However, the "Wired" option allows you to
start the corresponding driver for the i.MX FEC Ethernet device. The second
difference to the Sculpt OS x86 PC variant is the absence of a virtual machine
solution at the moment. Although Genode comprises a mature
virtual-machine-monitor solution for ARM - see
Section [Multicore virtualization on ARM] - it still lacks a reasonable
storage back end. Therefore, we left virtualization out of the picture for
now. Lastly, there is no possibility to use USB block devices, because the
required management component - a driver manager for i.MX8 - does not exist
yet. We plan to bridge these remaining few gaps compared to the x86 version
with the upcoming Genode releases.
To give Sculpt a try on the i.MX8 EVK board, you have to start the well-known
Sculpt run-script as usual, but for the base-hw kernel. For example:
! tool/create_builddir arm_v8a
! cd build/arm_v8a
! make run/sculpt KERNEL=hw BOARD=imx8q_evk
Under the hood, the run script requests a sculpt-<board> specific package from
the depot package system. Currently, _sculpt-pc_ and _sculpt-imx8q_evk_ are
available.
Multicore virtualization on ARM
###############################
The written-from-scratch virtualization solution for Genode on ARMv8 entered the
picture exactly one year ago with
[https://genode.org/documentation/release-notes/19.11#Virtualization_of_64-bit_ARM_platforms - release 19.11].
Since then, a couple of improvements and validations have been incorporated
into it. Support for VirtIO network and console models had been added.
Moreover, it got streamlined with our prior existing ARMv7 hypervisor and
virtual-machine monitor (VMM). But although the architecture of the VMM was
designed from the very beginning with more than one virtual-CPU (VCPU) in
mind, running a VM on multiple cores had not been addressed nor tested.
With this release, we enhance the virtualization support of the base-hw
kernel, acting as the ARM hypervisor, to support multicore virtual machines.
The VMM implementation got extended to start an entrypoint for each VCPU owned
by a VM. The affinities of those entrypoints are configured to distribute over
all physical CPUs available to the VMM. The affinity of an entrypoint that
handles events of a VCPU is automatically used as the affinity of the VCPU
itself. Whenever a VCPU exit needs to be handled, this is delegated to the VMM
entrypoint running on the same CPU. Once the VMM's entrypoint successfully
handled the exit reason, it resumes the VCPU.
Formerly, the control to start or stop a VCPU was implemented by core's VM
service that runs on the first CPU. But that implied that all different VMM
entrypoints running on distinct CPUs would have needed to frequently call
core's service entrypoint on the first CPU, inducing costly cross-CPU
communication. This is amplified by the fact that core's entrypoint uses a
system call to instruct the kernel's internal scheduler of the corresponding
target CPU, which again would potentially target a remote CPU. For simplifying
the implementation and for improving performance, we slightly extended the
VM-session interface to return a kernel-specific capability addressing a VCPU
directly. With this capability, a VMM's entrypoint is able to directly call
the kernel to start or stop a VCPU instead of using the indirection over core.
However, the detail whether the kernel is called directly or not is hidden
behind the VM session client API and transparent to the user.
Base framework and OS-level infrastructure
##########################################
C runtime
=========
We improved the support for aligned memory allocations to fix sporadic memory
leaks, which occurred with our port of the Falkon web browser. One relevant
change is the implementation of the 'posix_memalign()' function, another
change is that the address alignment of anonymous 'mmap()' allocations is now
configurable like follows:
! <config>
! <libc>
! <mmap align_log2="21"/>
! </libc>
! </config>
Standard C++ library
====================
Even though Genode uses C++ as its primary programming language, we do not
rely on or make use of any C++ standard library within the Genode OS
framework. However, since a C++ STL is a vital part of application programming
with C++, we provide one for applications built on top of the base framework;
in particular the GNU C++ STL library (_libstdc++_). It is treated as a
regular 3rd party library and its functionality is extended on demand. This
approach worked well enough to even enable larger C++-based software like Qt5
and Chromium's Blink engine (as part of QtWebEngine) to run on Genode. That
being said, for developers using _libstdc++_ on Genode, it is not immediately
clear, which features are supported and which are not.
Fortunately, _libstdc++_ includes a testsuite that - as the name suggests -
allows for testing the range of functionality of the library on a given
platform. So we turned to it to establish a base line of supported features.
We were particularly interested in how our port behaves when C++17 is
requested. It goes without saying that this only includes the aspects, which
are specifically probed by the testsuite. Rather than adding thorough Genode
support to the testsuite, we opted for providing an
[https://github.com/cnuke/genode-libstdcxx-testsuite/ - environment] that
mimics the common 'unix' target and allows us to execute the testsuite on
the Linux version of Genode via a regular Linux host OS. It uses the Genode
tool chain to compile the tests and spawns a Genode base-linux system to
execute them.
Executing the testsuite was an iterative process because in the beginning, we
encountered many falsely failed tests. On one hand, most of them were due to
the way C++ is applied in Genode or rather how our build system works
internally. For one, _libsupc++_ on Genode is part of the _cxx_ library. This
library in turn is part of _ldso.lib.so_, the dynamic linker that provides
the base API. As the build system uses stub libraries generated from 'symbol'
files containing the ABI of a given shared object, each missing symbol must
be made available. Otherwise the linking step is going to fail complaining
about undefined references because components use these stub libraries
during compilation. On the other hand, we had to get cozy with the testsuite's
underlying test framework in order to get our test environment straight.
In case of the testsuite, there were a lot of symbols missing because we did
not encounter them so far in our workloads, and thus, were not part of the
symbols file. After all, templates will always generate specific symbols that
are difficult to foresee. Besides that, we lacked support for aligned 'new'
and 'delete' operators. With these adaptions in place, we were able to
successfully execute the testsuite.
In the end, the results paint a good picture. The current short-comings boil
down to
* Support for the *stdc++fs* library is not available as the library is
not ported yet.
* Proper *locale* support in the 'libc' as well as 'stdc++' is not available.
* Support for parallel operations with *openmp* is not available.
* Various subsystems ('std::thread', 'std::random_device', numerics library)
need further attention for proper functionality. This is most prominent
for the failing execution tests where sometimes the threads appear to
get stuck.
These findings are documented at issue
[https://github.com/genodelabs/genode/issues/3925 - 3925].
Consistent Block Encrypter (CBE)
================================
The CBE is a library for the management of encrypted block-devices that is
entirely written in SPARK. It was first announced and integrated with
[https://genode.org/documentation/release-notes/19.11#Preliminary_block-device_encrypter - Genode 19.11],
reached feature-completeness with
[https://genode.org/documentation/release-notes/20.05#Feature-completeness_of_the_consistent_block_encrypter - Genode 20.05],
and has received a highly modular back-end system with version
[https://genode.org/documentation/release-notes/20.08#Consistent_Block_Encrypter - 20.08].
For this release, we thoroughly streamlined the CBE repository, added enhanced
automated quality assurance, and switched to another default encryption
back end.
Repository restructuring
------------------------
Generally speaking, the [https://github.com/m-stein/cbe - CBE repository] has
been freed from everything that is not either part of the SPARK-based core
logic (cbe, cbe_common, and the hashing algorithm), the essential SPARK-based
tooling (initialization, checking), or the Ada-based C++ bindings (*_cxx
libraries). The whole Genode-specific integration, testing, and packaging
moved to Genode's 'gems' repository and the former Genode sub-repository 'cbe'
was replaced by the new CBE port _gems/ports/cbe.port_. We also took the
opportunity to remove many unused remnants of earlier development stages and
to drastically simplify the ecosystem of CBE-related packages.
We hope that this allows for certain characteristics of the CBE project, like
its strong OS-independence or a completely "flow-mode"-provable core logic to
become more clear, while at the same time, the Genode-specific accessories can
benefit from being part of Genode's mainline development.
Automated testing, benchmarking, and proving
--------------------------------------------
The CBE tester is a scriptable environment meant for testing all aspects of
the CBE library and its basic tooling. Through its XML command interface, one
can not only access and validate data of CBE devices but also initialize them,
check their consistency, analyze their meta data, execute performance
benchmarks, manage device snapshots, perform online re-keying or online
re-dimensioning of devices, and, last but not least, manage the required Trust
Anchors.
Before this release, the CBE tester was a mere patchwork solution and many of
the above mentioned features were limited or even missing. For instance block
access was issued only in a synchronous fashion, the Trust-Anchor was managed
implicitly, and validating read data wasn't possible. Besides adding the
missing features, we also reworked the component entirely to follow a clean
and comprehensible implementation concept. The new CBE tester comes together
with the run script _gems/run/cbe_tester.run_ that shall serve as both a
demonstration how to use the tester and an extensive automated test and
benchmark for the CBE.
Furthermore, we created the CBE-specific autopilot tool _tool/cbe_autopilot_
that is meant to establish a common reference for the quality of CBE releases
as well as for their integration in Genode. Running the tool without arguments
will give instructions how to use it. In a nutshell, when running
'tool/cbe_autopilot basics', the tool will GNAT-prove what is expected to be
provable, run all CBE-related run scripts expected to work, and build all
CBE-related packages (existing build and depot directories are not touched in
this process). The idea is to make the successful execution of the test
mandatory before advancing the master branch of the CBE repository or
releasing a new version of the integration in Genode. A handy side-feature of
the tool is that one can run 'tool/cbe_autopilot prove' to do only the
GNAT-proving part. With 'tool/cbe_autopilot clean' finally, the tool cleans up
all of its artifacts.
Libcrypto back end for block encryption
---------------------------------------
The introduction of VFS plugins for CBE back ends in the previous Genode
release made it much easier to interchange concrete implementations. This
motivated us to play around a bit in our endeavour of optimizing execution
time. It turned out that especially the choice of the block-encryption back
end has a significant impact on the overall performance of CBE block
operations. It furthermore seemed that especially the 'libsparkcrypto'
library, our former default for block encryption, prioritizes other qualities
over performance.
That said, in general, we want to enable an informed user to decide for him-
or herself which qualities one prefers in such an algorithm. The VFS plugin
mechanism pays tribute to this. And it also seems very natural to us to
combine a SPARK-based block-device management with a SPARK-based encryption
back-end like 'libsparkcrypto'. But for our default use case, we came to the
conclusion that the 'libcrypto' library might be a better choice.
Streamlined ioctl handling in the C runtime / VFS
=================================================
The Genode release
[https://genode.org/documentation/release-notes/19.11#C_runtime_with_improved_POSIX_compatibility - 19.11]
introduced the emulation of ioctl operations via pseudo files. This feature
was first used by the Terminal. With the current release, we further employ
this mechanism for additional ioctl operations, like the block-device related
I/O controls, as the long-term plan is to remove the notion of ioctl's from
the 'Vfs::File_io_services' API all-together.
We therefore equipped the block VFS-plugin with a compound directory hosting
the pseudo files for triggering device operations:
:info: This file contains the device information structured as 'block'
XML node having 'size' and 'count' attributes providing the used block size
as well as the total number of blocks.
:block_count: contains the total number of blocks.
:block_size: contains the size of one block in bytes.
Furthermore, we split the existing 'ioctl' handling method in the libc into
specific ones for dealing with terminals and block devices because at some
point more different groups of I/O controls are to follow.
The first one to follow is the 'SNDCTL' group. This group deals with audio
devices and corresponds to the standard set by the OpenSoundSystem (OSS)
specification years ago. In the same vein as the terminal and block I/O
controls, the sound controls are implemented via property files.
The controls currently implemented are the ones used by the OSS-output plugin
of [https://cmus.github.io/ - cmus], the driving factor behind the
implementation, which uses the (obsolete) version 3 API.
At the moment, it is not possible to set or rather change any parameters. In
case the requested setting differs from the parameters of the underlying
audio-out session - in contrast to the suggestion in the OSS manual - we do
not silently adjust the parameters returned to the callee but let the I/O
control operation fail.
The following list contains the currently handled SNDCTL I/O controls:
:SNDCTL_DSP_CHANNELS: sets the number of channels. We return the available
channels here and return ENOTSUP if it differs from the requested number of
channels.
:SNDCTL_DSP_GETOSPACE: returns the amount of playback data that can be written
without blocking. For now it amounts the space left in the stream buffer of
the audio-out session.
:SNDCTL_DSP_POST: forces playback to start. We do nothing and return success.
:SNDCTL_DSP_RESET: is supposed to reset the device when it is active before
any parameters are changed. We do nothing and return success.
:SNDCTL_DSP_SAMPLESIZE: sets the sample size. We return the sample size of the
underlying audio-out session and return ENOTSUP if it differs from the
requested format.
:SNDCTL_DSP_SETFRAGMENT: sets the buffer size hint. We ignore the hint and
return success.
:SNDCTL_DSP_SPEED: sets the sample rate. For now, we always return the rate of
the underlying audio out session and return ENOTSUP if it differs from the
requested one.
The libc extension is accompanied by an OSS VFS plugin that gives access to an
audio-out session by roughly implementing an OSS pseudo-device. It merely
wraps the session and does not provide any form of resampling or re-coding of
the audio stream.
[image cmus]
Image [cmus] depicts how the various pieces work together in a real-world
scenario. The interplay of the extended libc with the OSS VFS plugin allows
for listening to MP3s - for the time being the format is restricted to
44.1kHz/16bit - on Sculpt using the [https://cmus.github.io/ - cmus]
audio player.
The current state serves as a starting point for further implementing the OSS
API to cover more use cases, especially with ported POSIX software like
VirtualBox and Qt5 or even as SDL2 audio back end. While showing its age, OSS
is still supported by the majority of middle ware and makes for a decent
experimentation target.
Device drivers
##############
VirtIO support
==============
Thanks to the remarkable contribution by Piotr Tworek, the Genode OS framework
has become able to drive VirtIO network devices.
He did not only provide a single VirtIO network driver but a framework to
easily add more VirtIO driver classes in the future. Either the devices are
connected as PCI devices or directly as platform devices with fixed
memory-mapped I/O addresses. The framework supports both and abstracts away
from the concrete connection type.
The VirtIO network driver enables networking for Genode when using the
'virt_qemu' board on either the ARMv7a or ARMv8a architecture. However, the
VirtIO device configuration on Qemu is dynamic. The order and presence of
different command line switches affect the bus address and interrupt
assignment of each device. To make the use of Genode with Qemu robust in
changing environments, a tiny helper component was supplemented. This
component named 'virtdev_rom' probes the memory-mapped I/O areas of the system
bus and detects available and known VirtIO devices. The results are provided
in the form of a configuration that can be consumed by the platform driver to
assign the correct device resources to the corresponding VirtIO driver.
The VirtIO network driver in action, as well as the interplay of the platform
driver and the 'virtdev_rom' component can be observed when using the
'drivers_nic-virt_qemu' package.
Improved support for OpenBSD audio drivers
==========================================
So far, the supported drivers exclusively used PCI as transport bus and for
practical reasons, the emulation environment was tied to it. The bus handling
has now moved into its own compilation unit to make future addition of drivers
that employ other transport buses easier. On the same account, the component
got renamed to 'pci_audio_drv' to reflect its bus connection.
While at it, the execution flow of the component got adapted. The kernel code
should have been executed within the context of the main task like it is done
in the DDE Linux drivers. The initial port of the HDA driver, however, called
the code directly from within the session as there was no immediate reason to
use a task context because suspending the execution was not needed. When using
USB devices, that is no longer possible as we have to suspend the execution
during the execution of the kernel code. So we pass in the audio data and
schedule the emulated BSD kernel code.
The above mentioned changes are mostly preliminary clean-up work for the
upcoming support of USB audio devices.
Furthermore, we implemented timeout handling in the driver and use Genode's
timeout framework API to schedule timeouts and for providing the current time.
For now there is only one timeout - the unsolicited Azalia codec event - and
therefore the timeout queue consists of solely one timeout object. Those
events are important for detecting plugged in headphones.
Supporting headphones was further refined by accounting for the situation
where the driver is started while headphones are already plugged in and the
mixer needs to be configured accordingly. In particular, on the Fujitsu S938
the driver lacked the proper quirk for switching between the internal and
external microphone.
In addition to the changes made to the audio driver component, the behaviour
of the audio mixer was adjusted with regard to handling the configuration
of a new session. The mixer now applies the settings already stored in its
configuration to new sessions instead of only reporting them. In case of
Sculpt, where an existing launcher already contains a valid configuration,
that allows for setting the volume levels appropriately for known sessions
prior to establishing the connection.
Retiring the monolithic USB driver
==================================
With [https://genode.org/documentation/release-notes/18.08#Decomposed_USB_stack - release 18.08],
a componentized USB stack got introduced next to our time-tested monolithic
USB driver. With the current release, the driver manager as used by Sculpt OS
switched to use the new USB stack in order to benefit from the de-composition
and from more supported USB devices. The monolithic driver was still based on
an older DDE-Linux revision compared to the componentized version. This step
paves the ground to retire the monolithic USB driver with the next Genode
release and will improve the number of supported USB devices with the upcoming
Sculpt OS release.
Platforms
#########
Hardware P-State support on PC hardware
=======================================
Intel CPUs feature Speed Shift respectively Hardware P-State (HWP)
functionality in order to balance CPU frequency and voltage for performance
and power efficiency. Up to now, the UEFI firmware of the notebooks we worked
with selected or made an option selectable in the UEFI configuration to
specify the desired behaviour, e.g. optimize for performance or power
efficiency.
With a recent Lenovo notebook, however, we faced the issue that either the fan
would run for too long after some load and/or the performance of the CPUs
regressed. Finding a well working sweet spot
[https://github.com/genodelabs/genode/issues/3871 - seems hard].
This experience prompted us to investigate how the Intel HWP feature can be
set and configured. After some experiments, we achieved to reduce the fan
noise and received better performance by tweaking the Intel HWP settings.
However, changing the Intel HWP settings requires access to the privileged
mode on all available CPUs. Since Genode supports several kernels, a solution
would require us to modify all kernels or the feature would remain solely
available to one kernel. We went for a different approach.
On x86, we use the tools from the
[https://genode.org/documentation/release-notes/18.08#New_Intel_Microcode_update_mechanism - Morbo project],
e.g., bender and microcode, to run code before the kernels are booted. The
jobs of the tools are to scan, enable, or apply changes to the CPUs and
chipset, which are not required to change during runtime. We came to the
conclusion that the named bootstrap tools are good places to apply such
one-time Intel HWP settings for the moment.
During the course of adding the Intel HWP functionality, we merged the
microcode functionality into the bender tool and made it configurable via the
boot options 'microcode' and 'intel_hwp'. A typical generated grub2
configuration by using both options would look like this:
| insmod multiboot2
| insmod gzio
| multiboot2 /boot/bender bender microcode intel_hwp
| module2 /boot/micro.code micro.code
| module2 /boot/hypervisor hypervisor ...
| module2 /boot/image.elf.gz image.elf ...
When using the NOVA kernel and Genode's _run_ tool for booting respectively
disk-image creation, one may use the existing 'options_bender' variable in
_tool/run/boot/nova_. The microcode option is added by setting the
'apply_microcode' flag in the same file. The 'intel_hwp' option, at the other
hand, can simply be appended to 'options_bender'. On startup, bender will print
the applied HWP settings for each core to the serial output if the
'intel_hwp' option was set. The new feature will try to set Intel HWP to
'PERFORMANCE' mode, the mode for which we observed the best results.
NOVA microhypervisor
====================
The IO-MMU is a hardware feature to protect operating systems, e.g., Genode,
against misbehaving devices and/or corresponding device drivers. The feature
is supported on x86 since the
[https://genode.org/documentation/release-notes/13.02#DMA_protection_via_IOMMU - 13.02 release]
and described in the release notes. Up to now, this feature is solely
supported for Intel hardware, in particular CPUs and chipsets supporting Intel
VT-d.
With the current release, we add support for AMD's IO-MMU variant to the
Genode framework for the NOVA kernel - being the first one out of the
supported microkernels. Being conceptionally equivalent, the actual
implementation for AMD differs from Intel unsurprisingly. In order to add the
support, a new IO-MMU interface abstraction for accommodating both versions -
Intel and AMD - has been added to the NOVA kernel. Further, the discovery of
the available AMD IO-MMUs required the traversal of different ACPI tables than
for Intel and another page table format for the IO-MMU had to be added. On the
Genode framework side, only very few changes were necessary, namely the
detection of the IO-MMU feature by parsing the ACPI tables in Genode's ACPI
driver as well as the ported Intel ACPICA component.
The change has been already successfully tested on various Ryzen desktops and
notebooks on a backported Sculpt 20.08 branch.

663
doc/release_notes/21-02.txt Normal file
View File

@@ -0,0 +1,663 @@
===============================================
Release notes for the Genode OS Framework 21.02
===============================================
Genode Labs
Genode 21.02 stays close to the plan laid out on our
[https://genode.org/about/road-map - road map], featuring a healthy dose
of optimizations, extends the framework's ARM SoC options, and introduces
three longed-for new features.
First, we extended our concept of pluggable device drivers to all network
drivers, including Ethernet and Wifi.
As reported in Section [Pluggable network device drivers], such drivers can
now gracefully be started, restarted, removed, and updated at runtime without
disrupting network-application stacks.
Second, the release features the infrastructure needed for mobile-data
communication over LTE, which is a prerequisite for our ambition to use Genode
on the Pinephone. Section [LTE modem stack] gives insights into the involved
components and the architecture.
Third, we are happy to feature the initial version of VirtualBox 6 for
Genode. Section [VirtualBox 6.1.14] gives an overview of the already
supported feature set and the outlook to reach feature-parity to our version
of VirtualBox 5 soon.
Speaking of VirtualBox in general (both versions), we were able
to significantly improve the USB-device pass-through abilities, specifically
covering audio headsets.
Further noteworthy improvements of the current release range from added
VirtIO-block device support for virtual machines on ARM
(Section [VirtIO block devices for virtual machines on ARM]),
revived developments on RISC-V (Section [RISC-V]),
over VFS support for named pipes (Section [VFS support for named pipes]),
to streamlined tooling (Section [Build system and tools]).
Pluggable network device drivers
################################
The results of our approach to
[https://genode.org/documentation/release-notes/20.08#The_GUI_stack__restacked - pluggable framebuffer and input drivers]
encouraged us to take on the third major driver category, namely networking
drivers, which subsumes not only Ethernet drivers but also wireless networking
drivers and mobile baseband drivers. The latter two are of course particularly
interesting for mobile communication devices.
Similarly to the story linked above for the framebuffer and input drivers,
Genode's network drivers used to play the roles of NIC servers, providing a
network-interface service to network applications. As a consequence, the
lifetime of a network application was always bound to the lifetime of the
underlying NIC driver. This is unfortunate because those drivers can be
obscenely complex, putting the liveliness of the dependent application stack
at risk.
[image layered_nic_multi_app_risk]
However, in most scenarios, networking applications do not operate directly on
a network interface because this would prevent the use of the network interface
by more than one application at a time. Instead, there is usually a NIC
multiplexing component in-between the driver and one or multiple applications.
In most contemporary scenarios this is the NIC router that acts as NIC client
towards the driver and as NIC server towards the applications.
Thus, we contemplated the idea of letting the NIC driver operate as NIC client
of the NIC router instead. This would decouple the application from the
driver's lifetime while the driver's special role would be modeled solely by a
routing policy. However, even though the data channel of the NIC interface is
bi-directional, we realized that the reversal of the role of the driver does
not only entail the communication of network payload but also propagation of
the link state and the MAC address. This prompted us to introduce a new Genode
session type called "Uplink" that precisely models the NIC-driver-as-client
scenario.
[image nic_router_services]
In a nutshell, an Uplink session is almost the same as a NIC session with only
three minor differences. First, the MAC address is given by the client (the
driver) as an argument at session-creation time. Second, the roles of the TX
and RX packet streams are interchanged compared to a NIC session. I.e., the
_client_ transmits via TX and receives through RX while at the server side it's
vice-versa. And third - as a mere interface optimization - the link state of an
uplink session is always "up". The session is requested by the client (the
driver) only in the event of a "link-up" edge. Analogously, whenever the link
goes "down", the client closes the session again.
With this new session interface in place, the NIC router becomes the only
long-running component in the scenario. It provides both a NIC and an uplink
session interface. The NIC session interface is used by network applications.
The uplink session interface is used by drivers. Inside the router, uplink
sessions are treated the same as NIC sessions. Therefore, we decided that the
well known '<policy>' tags in the configuration are now simply applied to both
session types. This means, that each '<uplink>' tag that connected a driver in a
router configuration can now be replaced by a '<policy>' tag with a label
attribute that matches the driver's session request.
[image nic_uplink_multi_app]
We divided the process for this architectural change into the following
autonomous steps:
# Introduce the uplink session and uplink-session support in the NIC router.
# Let NIC drivers support both modes, "NIC session server" and "Uplink session
client" depending on a new _transitional_ <config>-tag attribute 'mode'.
This attribute is optional and has two possible values, 'uplink_client'
and 'nic_server', of which it defaults to the latter.
# Adapt all network scenarios in the basic Genode repositories to use NIC
drivers only with '<config mode="uplink_client">'.
# Remove support for the "NIC session server" mode from all NIC drivers and
with it also the transitional 'mode' attribute.
All steps except the last one are completed by now. The transitional 'mode'
attribute and the "NIC session server" mode will remain available in all NIC
drivers until the next Genode release in order to give others the opportunity
to gracefully adapt their NIC drivers and network scenarios to the change.
Further information
-------------------
The overarching topic of pluggable device drivers was covered by our recent
presentation at [https://fosdem.org/2021/ - FOSDEM 2021]. You can find the
video recording and the presentation slides at the following link.
:Pluggable device drivers for Genode:
_presented at FOSDEM 2021_
[https://fosdem.org/2021/schedule/event/microkernel_pluggable_device_drivers_for_genode/]
LTE modem stack
###############
With the current release, Genode adds LTE broadband modem support for packet data
connections. This way, it becomes possible to browse the internet using the SIM
card of your broadband service provider. For a description of the protocols and
the general terminology when talking about LTE modems, our
[https://genodians.org/ssumpf/2020-12-04-mbim - LTE modem support for Genode]
Genodians article is a good starting point.
From the device side, LTE modems register themselves as USB devices at the USB
host controller. The speciality is that a modem offers two interfaces. First, a USB
network interface (like NCM or ECM) and second, a
[https://www.usb.org/document-library/class-definitions-communication-devices-12 - Wireless Mobile Communication Device],
which is a challenge/response control channel to the modem and used to configure
the device. For the actual communication through the control channel, there exist two
binary protocols: Namely, Mobile Broadband Interface Model (MBIM) and Qualcomm
Mobile Station Interface (QMI). Whereas the former is a USB standard, QMI is a
proprietary protocol by Qualcomm. Therefore, we picked a modem that supports the
MBIM standard for our line of work.
USB modem support
=================
In order to enable modem communication, we added the Linux USB modem driver for
MBIM to our _dde_linux_ device driver environment. This driver implements the
NCM and WDM interfaces for the modem and provides a network uplink session for
the NCM network interface and a terminal session for the WDM interface.
[image lte_mbim]
MBIM protocol
=============
MBIM is a binary protocol that is, for example, implemented by
[https://www.freedesktop.org/wiki/Software/libmbim/ - libmbim]. Therefore, we
ported _libmbim_ to Genode. Since it requires _glib_, we had to enable features
and improve our _glib_ support on Genode. The _libmbim_ library offers MBIM command handling only.
For actually triggering modem-communication, the _mbimcli_ tool is required. We
ported _mbimcli_ and changed its front end to trigger a modem packet-connection
sequence via _libmbim_ through the terminal session of the USB modem driver.
During this sequence, the SIM card is unlocked through the PIN, the packet
service is attached, and connection information (e.g., IP, gateway, DNS server)
is retrieved. The connection data is then used by _mbimcli_ to configure the
uplink of Genode's NIC router, which in turn makes the network connectivity available
to network applications. The holistic view is shown in image [lte_mbim].
Base framework and OS-level infrastructure
##########################################
NIC router
==========
The NIC router received two practical features, the consideration of
multiple DNS server entries on DHCP and an ARP-less mode for domains.
The latter was motivated by the fresh support for LTE modems (see Section
[LTE modem stack]). An LTE modem normally doesn't respond to ARP. So when
using it as uplink for the NIC router, the corresponding domain can't request
IP-to-MAC-address resolutions as usual. This is addressed through the new
optional attribute 'use_arp' in '<domain>' tags of the NIC router configuration.
By default, it is set to 'yes', which yields the same behavior as in the past.
However, when set to 'no' for a domain, this domain will prevent sending ARP
requests in general. This leaves the question how to determine the destination
MAC address for a packet that shall be sent at this domain when only the
destination IP address is known. This is solved by the router by simply using
the source MAC address also as destination MAC address, an approach that we
could observe also in other IP stacks and that worked just fine in our tests.
The ARP-less domain mode is demonstrated through the run script
_repos/os/run/nic_router_disable_arp.run_.
The consideration of multiple DNS-server entries on DHCP comes in two parts.
First, when acting as DHCP client at a domain, the router will now parse all
option 6 entries in DHCP ACK replies from the server and memorize them as part
of the resulting IP config of the domain. These entries will then also be
reported if '<report config="yes"/>' is set in the router's config. A router
report with multiple DNS server entries will look like this:
! <state>
! <domain name="uplink_1" ipv4="10.0.0.3/24" gw="10.0.0.1">
! <dns ip="10.0.0.2"/>
! <dns ip="1.1.1.1"/>
! <dns ip="8.8.8.8"/>
! ...
! </domain>
! <domain name="uplink_2" ipv4="168.192.0.200/24" gw="168.192.0.1">
! <dns ip="168.192.0.10"/>
! <dns ip="168.192.0.8"/>
! ...
! </domain>
! ...
! </state>
On the other hand, when acting as DHCP server at a domain, one has two
options. Option 1 is to configure the DHCP server to fetch DNS server entries
automatically from another domain:
! <domain name="downlink" interface="10.0.1.1/24">
! <dhcp-server dns_server_from="uplink_1" .../>
! </domain>
In this case, the router will now reflect not only one but all DNS server
entries from the source domain ("uplink") through the DHCP replies sent at the
destination domain ("downlink") without changing the entry order. This approach
is demonstrated through the new _repos/os/run/nic_router_dhcp_unmanaged.run_
run script.
Option 2 is to configure the DNS server entries manually at the DHCP
server:
! <domain name="downlink" interface="10.0.1.1/24">
! <dhcp-server ...>
! <dns-server ip="10.0.0.2"/>
! <dns-server ip="1.1.1.1"/>
! <dns-server ip="8.8.8.8"/>
! </dhcp-server>
! </domain>
The order of the '<dns-server>' tags determines the order of
option 6 entries in the replies of the DHCP server. Besides its use for static
DNS server configurations, this option can also be used for more sophisticated
forwarding of DNS server entries through a separate management component. The
management component could listen to the reported IP config of the source
domains, apply custom policies like address filters to the result, and
re-configure the DHCP servers of the destination domains accordingly. This
approach is demonstrated in the new _repos/os/run/nic_router_dhcp_managed.run_
run script.
Please note that the former 'dns_server' attribute of the '<dhcp-server>' tag
is no longer considered by the router as the new '<dns-server>' tag replaces it.
Thus, you might want to adapt your NIC router scenarios accordingly.
VFS support for named pipes
===========================
The VFS-pipe plugin received new support for named pipes. The main motivation was to
easily stream data from pure Genode components to libc components via
file-system sessions that can be attached to stdin, stdout, and stderr. This
feature further makes it possible to chain the data flow between several components together,
similarly to how it is done on Unix. Additionally, the thread synchronization
has been improved so that large data chunks can be transferred without
blocking.
A named pipe can be created by adding a '<fifo>' sub node to the '<pipe>' node
of the VFS:
! <vfs>
! <pipe>
! <fifo name="upstream"/>
! </pipe>
! ...
! </vfs>
Each pipe is exposed as a set of pseudo files.
! /upstream
! /.upstream/in/in
! /.upstream/out/out
The _/upstream_ pseudo file can be opened either as read-only or write-only
file. It allows for the access of both ends of the pipe. In contrast, each of
the pseudo files _/.upstream/in/in_ and _/.upstream/out/out_ represents only
one end of the pipe, which can be subjected to an individual directory-based
access-control policy.
Thanks to Sid Hussmann for contributing this valuable feature!
Terminal
========
While
[https://genode.org/documentation/release-notes/20.08#The_GUI_stack__restacked - revising the GUI stack]
in Genode 20.08, we largely abolished the use of the framebuffer and input
session interfaces. The graphical terminal, however, still relied on those
interfaces instead of the GUI session. In practice, there was always a gui_fb
component needed as an intermediate between the terminal and the GUI server.
To complete the GUI-stack transition, we changed the terminal to use the GUI
session directly and adjusted all current scenarios that use the terminal.
One useful feature of the gui_fb component was the definition of an initial
window size. This enabled packages such as Sculpt's system shell to present
terminal windows with a reasonable default size smaller than the entire
screen.
To accommodate this special case, the initial terminal size can now be
explicitly configured in the terminal configuration.
! <config>
! <initial width="800" height="600"/>
! ...
! </config>
While we were at it, we also enhanced the terminal with the ability to
dynamically respond to font changes. So the adjustment of the global font
settings in Sculpt OS takes immediate effect on all terminal windows.
OpenSSL 1.1.1i, curl 7.70.0
===========================
OpenSSL experienced some quite important security updates during the last
months. This prompted us to update our port to version 1.1.1i. During
the porting work, we kept an eye on performance and enabled CPU-specific
optimizations where feasible. Optimizations are enabled by default on
x86 and ARMv8. For ARMv7, we enable NEON-based functions only when the
build SPECS include "neon" to support common SoCs that lack these
capabilities in the default configuration. Please note, the updated
port does only provide one combined depot archive "openssl" that
replaces the former "libcrypto" and "libssl" archives. The libraries
are still distinct for compatibility with existing applications and
build systems. As a side effect, we also updated the curl library to
version 7.70, which is compatible with recent OpenSSL versions.
Thanks to Pirmin Duss for his valuable contribution to this update.
Virtualization
##############
VirtualBox 6.1.14
=================
Genode supports virtualization with VirtualBox
[https://genode.org/documentation/release-notes/14.02#VirtualBox_on_top_of_the_NOVA_microhypervisor - since 2014].
Back then, we enabled VirtualBox version 4 to support use cases with unmodified
Linux and Windows guests like Sculpt's predecessor
[https://genode.org/documentation/release-notes/15.11#Genode_as_desktop_OS - "Turmvilla"].
In 2016, we updated VirtualBox to version 5 to enable recent guest OS
versions notably Ubuntu 16.04 and Windows 10. VirtualBox 5 is an
integral part of Sculpt OS since its first release.
As VirtualBox 5 is no longer maintained upstream and also shows its age
when running recent versions of Windows 10, we accepted the challenge
to once again enable a new version of this VMM. This time we did not
go for a NOVA-specific port but exclusively use the kernel-agnostic
virtualization interfaces introduced in
[https://genode.org/documentation/release-notes/19.05#Kernel-agnostic_virtual-machine_monitors - Genode 19.05].
This way, VirtualBox 6 is prepared to run on NOVA, seL4, and Fiasco.OC alike with
minimal extra efforts.
The first development snapshot we publish with this release is ready to
run Linux and Windows guests with limited support for multiple cores,
integrates network and USB-passthrough as well as preliminary support
for Guest Additions like mouse integration and display. We are
committed to finalize the feature set and optimize the performance of
VirtualBox 6 until the upcoming Sculpt release but do not plan to replace
version 5 completely yet. In fact, the update paves the way to explore
more experimental grounds like enablement of GPU-based
acceleration of guest OSes.
As a starting point for exploring VirtualBox 6 on Genode, we recommend the run script
_ports/run/virtualbox6.run_.
VirtualBox 5
============
With this release, we extended our VirtualBox port and made USB
pass-through more robust.
So far, we most prominently use VirtualBox on Intel systems that feature
VT-x. This release enables support for also running 64bit guests on AMD
systems with SVM.
When it comes to USB pass-through support, we rely on the xHCI device-model
ported from Qemu. With this release, we updated the 3rd-party sources to
version 5.2.0 and the type of the exposed device has changed to QEMU xHCI. Due to
this change, older guest OSes - namely Windows 7 - that relied on the NEC
xHCI device will no longer work.
Thanks to the update, it becomes possible to use USB devices requiring isochronous
transfers, in particular audio devices, with Windows 10 guests. For now
we focused on USB-Audio-Class v1 devices using adaptive
synchronisation, which enables a variety of popular USB headsets for
the passthrough use case.
A glimpse into our USB machinery unveils that fine-tuned buffering and USB
transfer configuration is the key to robust USB passthrough. On one hand, the
handling of isochronous OUT transfers in our host connection batches multiple
packets and queues transfers, which helps to smoothen out playback in case other
Genode components utilize the CPU concurrently. On the other hand, the number of
IN requests queued is increased but the number of packets per request set to 1.
We obtained the best results by following this configuration observed in Linux
and Windows guests alike.
VirtIO block devices for virtual machines on ARM
================================================
With release
[https://genode.org/documentation/release-notes/20.02#Custom_virtual_machine_monitor_on_ARM - 20.02],
the first VirtIO device models entered Genode's virtual
machine monitor for ARM. They enabled a virtual machine to access network and
terminal services. This time, the VMM got extended with a block device model,
which again is compliant to the VirtIO 1.1 specification. Moreover, the generic
model implementation, which is common to all VirtIO devices, got polished fairly.
The new block device model is not configurable yet. By now, the VMM is
hard-coded to provide exactly one block device. Consequently, one route to a
Block service needs to be provided to the VMM component.
The execution of the test run-script in _repos/os/run/vmm_arm.run_ shows
the new VirtIO block device in action.
Device drivers
##############
Power-gating of PCI devices on x86
==================================
PCI devices have several PCI capabilities that describe the feature set
the device supports, as defined by the PCI specification. The platform driver - which
is the gatekeeper of devices on Genode - got extended to power on and power off
devices whenever the PCI power capability is supported. When powering on, a device reset
is issued if it is supported by the PCI device. During release of a driver from a
device, all DMA memory associated to the device is
flushed from the IO-MMU TLB to avoid any further access.
Additionally, the platform driver has become able to respond to configuration
changes. Special care must be taken if the configuration of a running device
driver changes. If the configuration re-evaluation concludes that a driver is no longer
permitted to use an already assigned PCI device, the Platform session
will be closed forcefully, making the device inaccessible to the driver.
The extended features of the platform driver supplement our previous work of
restarting respectively replacing a running graphics driver in Sculpt OS. The driver
manager, as used by Sculpt, uses Genode's heartbeat monitoring to check for the
liveliness of the Intel framebuffer driver and restarts it automatically if the
driver becomes unresponsive. Restarting
involves closing the Platform session, thereby powering off the Intel device,
and reopening the Platform session, thereby powering and resetting the
Intel device into a functional state.
This self-healing mechanism can be seen in action in the recording of our
[https://fosdem.org/2021/schedule/event/microkernel_pluggable_device_drivers_for_genode/ - FOSDEM talk]
about pluggable device drivers.
USB drivers
===========
Additional HID devices
~~~~~~~~~~~~~~~~~~~~~~
It's a sad truth that some popular USB keyboards and mice do not fully
comply with the USB HID standard. The Linux kernel comes with dozens
of special functions to fix up quirks and enable these devices
for Linux systems also. With the current release, we adopt quirk functions
for Apple HID devices and mice based on the Holtek chipset (e.g., the
Sharkoon Drakonia) that are applied automatically if one of these
devices is plugged.
USB robustness
~~~~~~~~~~~~~~
We improved the robustness of the USB HID driver with regard to device
reconnection, as well as the robustness of the DWC OTG host driver for
the Raspberry Pi when used with HID devices.
Isochronous transfers
~~~~~~~~~~~~~~~~~~~~~
While looking more closely into supporting isochronous transfers
driven by the USB pass-through use-case, we encountered and addressed shortcomings
in the current implementation in the USB host-controller driver
when dealing with IN transfers containing multiple isochronous frames.
However, this is only a first step as we identified significant potential for
optimization and robustness improvements.
Platforms
#########
Pine-A64-LTS single board computer
==================================
Our [https://genode.org/about/road-map - road map] envisions
the use of Genode on the Pinephone by the end of the year. As a first stepping
stone, the current release adds basic board support for the
[https://pine64.com/product-category/pine-a64-ltslong-term-supply/ - Pine-A64-LTS]
single-board computer. We take this line of work as a welcome opportunity to
thoroughly document the porting process. You can find the work explained in
great detail in the following article series.
# [https://genodians.org/nfeske/2020-12-10-pine-fun-warmup - Warming up for some Pine fun]
# [https://genodians.org/nfeske/2020-12-17-pine-fun-serial - Bare-metal serial output]
# [https://genodians.org/nfeske/2021-01-28-pine-fun-kernel-skeleton - Kernel skeleton]
# [https://genodians.org/nfeske/2021-02-11-pine-fun-debugging - How did we come here?]
# [https://genodians.org/nfeske/2021-02-18-pine-fun-user-land - Excursion to the user land]
The latest state of this line of work is available at a dedicated repository:
:Genode board support for Allwinner SoCs:
[https://github.com/nfeske/genode-allwinner]
RISC-V
======
RISC-V development has been on the hold at Genode Labs for a while. But with the
current release this has changed. One of the main goals we had for a long time
is the use of Qemu instead of the Spike emulator for our test infrastructure, since
every other platform runs on Qemu, Spike causes additional overhead at Genode
Labs.
By updating the privileged ISA specification support from 1.9.1 to 1.10,
we became able to use recent Qemu versions (e.g., 4.2.1).
Thanks to this change, we could remove the _spike_ board and add a new
_riscv_qemu_ board to our _base_hw_ kernel implementation.
As another nice side effect, Qemu ships its own OpenSBI machine binary, which
implements the machine mode and SBI calls. It can be enabled through the "-bios"
command line option. With a machine mode for ISA 1.10 in place, we were able to
remove the old [https://github.com/ssumpf/bbl-lite - BBL] machine mode
implementation from Genode.
For more information on this topic please refer to the corresponding
[https://genodians.org/ssumpf/2021-02-24-riscv - Genodians article].
In order to improve development speed, we were able to reduce the link time for
_core_ and its debugging variant from about 50 to 5 seconds. Additionally, we
fixed long standing link errors that were caused by mixing up soft float and
hard float objects as well as misconfigured linker scripts.
Removal of Muen separation kernel support
=========================================
Since
[https://genode.org/documentation/release-notes/15.08#Genode_on_top_of_the_Muen_Separation_Kernel - version 15.08],
Genode supported the use of the [https://muen.sk - Muen] separation kernel as
underlying platform. The driving force behind the original development was the
joyful collaboration with the Muen developers Adrian-Ken Rueegsegger and Reto
Buerki and the prospect for products that combine the rigidity of a separation
kernel with the dynamic workloads enabled by Genode.
However, over the past 5 years, this potential synergy remained untapped.
In hindsight, the stacking of one microkernel-based system onto another
microkernel-based system is a tough sell. Hosting dynamic workloads in a Linux
VM atop Muen is certainly more relatable to Muen users. Vice versa, for Genode
users, Genode on bare hardware is less complex and more flexible than using
the framework atop a separation kernel.
Without adoption of the joint platform, neither of both teams can justify the
ongoing effort needed for the continued maintenance of Genode on Muen. Hence,
we [https://github.com/genodelabs/genode/issues/3995 - concluded] to remove
Muen as an officially supported platform.
Build system and tools
######################
Streamlined distinction of boards by build and run tools
========================================================
In
[https://genode.org/documentation/release-notes/20.05#Board_support_outside_the_Genode_main_repository - Genode 20.05],
we introduced the principle ability to decouple board-support packages from
the project's main repository. We thereby want to enable developers outside
the Genode core team to port Genode to diverse hardware platforms.
With the current release, we further refined the structure of the code base and
the tooling to largely eliminate remaining points of friction when hosting
board support in external repositories.
We ultimately removed the use of board-specific SPEC values throughout the
build system and run scripts. SPEC values are now solely used to refer to
aspects of an instruction-set architecture, e.g., x86, 64bit, or arm_v8a.
In run scripts, the new convenience function 'have_board' has become the
preferred way to distinguish the behavior of run scripts depending on the
targeted board now. It replaces all former uses of 'have_spec <board>'.
Moreover, the long deprecated option of the _create_builddir_ tool to create
board-specific build directories has been removed.
To simplify the hosting of board support in separate source-code repositories,
board-specific properties have moved from run-tool scripts to the new notion
of *board property directories*. Such directories named
_<repo>/board/<board>/_ contain files with board-specific information.
In particular, the 'image_link_address' file contains the physical
link address of the system image taking the board's physical memory
constraints into account, and the 'arch' file contains the CPU
architecture of the SoC. The run tool picks up this information
from the board-property files.
Furthermore, the *packaging* of the board-specific base-hw kernel has
become more formalized by leveraging the board-property directories.
This makes the packaging vastly simpler. Regardless of where the board-support
is hosted, the _content.mk_ file for a kernel source archive 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. 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 resulting depot archives
have become 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.
Compiler cache
==============
The [https://ccache.dev - ccache] tool is a fantastic way to accelerate the
developer workflow when repeatedly building software. Since ccache is -
strictly speaking - orthogonal to the build system, configuring the Genode
build system for the use of ccache was left to each developer.
Setting up ccache is not straight-forward though. One must manually create
hooks (symlinks shadowing the compiler executables), tweak the PATH
environment variable, and customize the CROSS_DEV_PREFIX in
_etc/tools.conf_. In short, only seasoned developers jump through those hoops.
Many others may miss out on the joys of ccache.
With the current release, the build-system front end makes ccache easily
available by enabling a simple option in the _etc/build.conf_ file:
! CCACHE := yes

View File

@@ -14,121 +14,92 @@ The road map is not fixed. If there is commercial interest of pushing the
Genode technology to a certain direction, we are willing to revisit our plans.
Review of 2019
Review of 2020
##############
For the road map 2019, we picked "bridging worlds" as our guiding theme:
(1) Lowering the friction when combining existing software with Genode,
(2) Fostering interoperability with widely used protocols and APIs, and
(3) Making Genode easier to approach and generally more practical.
The overarching theme of our road map for 2020 was "Dwarfing the barrier of
entry", which expressed the ambition to reach a wider audience. On that
account, we identified four promising directions: First, making Sculpt OS
palatable for a wider circle. Second, fostering the public perception of the
high quality of Genode to reinforce the confidence of people who are sceptical
towards novel operating-system technology. Third, lowering the barrier of
entry by providing frictionless tooling. And fourth, publicly presenting use
cases that prove the fitness and flexibility of Genode. These directions
certainly did a good job of motivating the working topics of last year's four
releases
[https://genode.org/documentation/release-notes/20.02 - 20.02],
[https://genode.org/documentation/release-notes/20.05 - 20.05],
[https://genode.org/documentation/release-notes/20.08 - 20.08], and
[https://genode.org/documentation/release-notes/20.11 - 20.11].
With respect to (1), we identified Genode's custom tooling (build
system, run scripts, ports mechanism, depot tools) as a point of
friction. They are arguably powerful and flexible but require a lot of
up-front learning. This is certainly a burden unacceptable for a casual
developer without a black belt in Make and Expect/Tcl. The new
[https://genode.org/documentation/release-notes/19.11#New_tooling_for_bridging_existing_build_systems_with_Genode - Goa]
tool rearranges the existing tools in a way that puts the concerns of casual
developers into focus, allowing for the use of commodity build systems,
eliminating Tcl syntax from the equation, running sub-second test cycles, and
streamlining the packaging of software.
The UI improvements of Sculpt OS in version 20.02 largely eliminated the need
to use the command line as presented
[https://www.youtube.com/watch?v=vmgWgzeKAjU - here].
The second direction - software quality - motivated the steady improvements of
our POSIX runtime, ultimately enabling highly sophisticated workloads like the
Chromium web engine on Genode. Regarding our stated commitment to 64-bit ARM
hardware, in particular supporting the NXP i.MX8 SoC, we covered 64-bit
multi-core virtualization, HDMI, touch input, OLED, networking, LTE, USB,
clock and power management, VirtIO, up to running Sculpt OS on this platform.
On account of (2), we
[https://genode.org/documentation/release-notes/19.05#Broadened_CPU_architecture_support_and_updated_tool_chain - switched to C++17]
by default, fostered the use of
[https://genodians.org/ssumpf/2019-02-27-java-19-02 - Java],
updated Qt5, and put
[https://genode.org/documentation/release-notes/19.11#C_runtime_with_improved_POSIX_compatibility - POSIX]
compatibility into the spotlight. We were eventually able to dissolve the need
for our custom Unix runtime (Noux) because all features of Noux are covered by
our regular libc now.
Our biggest step towards (3) is the [https://genodians.org] website we
started in winter 2019, which gives individual members of our community
an easy way to present thoughts, projects, and experiences.
Complementing Genode's formal documentation, it also conserves practical
tips and tricks that were previously not covered in written form.
When speaking of "bridging worlds", we should not forget to mention the
tremendous effort to bring Sculpt-OS-like workloads to the 64-bit ARM world.
Thanks to the added support for
[https://genode.org/documentation/release-notes/19.08#64-bit_ARM_and_NXP_i.MX8 - multi-core AARCH64],
hardware-based
[https://genode.org/documentation/release-notes/19.11#Virtualization_of_64-bit_ARM_platforms - virtualization],
and network/USB/graphics drivers for the i.MX8 SoC, the flexibility of Sculpt
OS will eventually become available on PC hardware and ARM-based devices
alike.
Over the course of 2019, we admittedly skipped a few topics originally
mentioned on our road map. In particular, the user-visible side of
Sculpt OS received less attention than originally envisioned. We also
deferred several ideas we had in mind about reworking our GUI stack.
Instead, we expanded our work in the areas of storage (block-level APIs,
test infrastructure,
[https://genode.org/documentation/release-notes/19.11#Preliminary_block-device_encrypter - block encryption])
and
[https://genode.org/documentation/release-notes/19.08#Flexible_keyboard_layouts - input processing].
This shift of focus is mostly attributed to the priorities of Genode Labs'
customers who fund our work.
Granted, Genode's audience hasn't increased by a large margin as a direct
result of these efforts. But as illustrated by the fruitful road-map
discussion for 2021 on the
[https://genode.org/community/mailing-lists - mailing list],
our community is more engaged and enthusiastic than ever before.
2020 - Dwarfing the barrier of entry
####################################
2021 - Optimization and Platform diversity
##########################################
Genode as a technology is there. For more than one decade, we walked unfathomed
territory, fought with countless deep rabbit holes, took risky decisions,
tracked back, explored design spaces, developed taste and distaste, pruned
technical debt, and eventually found formulas of success. Today, there are no
(fundamental) unsolved questions. All the puzzle pieces are in place. There
could be no better proof than our daily use of Sculpt OS. The time is right
to make Genode palatable for a wider circle. We identified four actionable
topics to achieve that.
For the initial conquering of 64-bit ARM territory, restraining our focus to
one particular SoC - namely NXP i.MX8 - was a healthy approach. Now it is the
right time to optimize and to branch out the development to further
platforms. The following key aspects of our road map for 2021 reflect that.
:User friendliness of Sculpt OS:
:Pinephone:
By the end of the year, we want be able to use Genode on the
[https://pine64.com/product-category/pinephone/ - Pinephone]
as a feature phone, covering basic web-browsing needs, placing calls, and
SMS.
Until now, Sculpt OS is not exactly friendly towards users who are
unfamiliar with the Unix command-line tools. Since Sculpt is not Unix
based, this is a bit paradoxical. 2020 will give Sculpt OS a friendlier
and discoverable user experience. In this context, we will inevitably
put our attention to Genode's GUI stack.
:Linux-device-driver environment re-imagined:
We are convinced that we have to dramatically reduce the engineering
effort needed to port device drivers from the Linux kernel to Genode. With
many years of driver-porting experience under our belts, we plan to condense
the lessons learned in the form of new tooling and documentation. This, in
turn, will hopefully pave the ground for more and more developers
contributing to Genode's device-driver coverage in the future.
:Perception of high quality:
:Developer experience:
Speaking of new developers, we see Genode's existing tool set as a barrier
because it requires a rather steep learning curve. Hence, this year, we will
have a fresh take on tooling and workflows. The starting point will be the
experimental [https://github.com/nfeske/goa - Goa] tool, which in principle
allows developers to use familiar build systems for Genode development. We
plan to extend Goa to cover more build systems, and shape the tool towards
system-integration tasks and quick compile-test cycles targeting embedded
devices.
Compared to commodity operating systems who stood the test of time,
Genode is a young and largely unproven technology. It understandably calls
for skepticism. All the more we must leave no doubts about our high
quality standards. There must be no room for uncertainty. Hence, during
2020, we will intensify the consolidation and optimization of the framework
and its API, and talk about it.
:Optimization:
Motivated by usage scenarios like the Pinephone, we are eager to tap into
plenty of opportunities for optimization. Based on data gathered by improved
system tracing, we consider interface refinements to improve the batching of
I/O (file-system access, networking), micro-optimizations of hot code paths
(like TLS lookup, parsers, and allocators), as well as structural changes
(like the consolidation of low-level services).
:Enjoyable tooling:
Genode's success at large will depend on developers. As of today, software
development for Genode requires a huge up-front learning curve. This is
fine for people who are already convinced of Genode. But it unacceptable
for casual developers who want to get their toes wet. We should aim for
tooling that allows new developers to keep up their flow and beloved
tools. The recently introduced [https://genodians.org/nfeske/2019-11-25-goa - Goa]
tooling is our first take in this respect. It is certainly too early to call
Goa a success. In order to find out if we are on the right track, we want to
expose Goa to as many problems as possible, primarily by the means of
porting software. Also, things like IDE usage or adapters for a variety of
build systems will certainly move into focus in 2020.
:Convincing use cases:
Use cases can give exemplary proof of the fitness of Genode. We already
took a few baby steps to extend the range of documented use cases beyond
Sculpt OS last year. The boot2java scenenario comes in mind. 2020 will
hopefully see several more illustrations of Genode's versatility.
:GPU support:
Distantly related to optimization, GPU support is an increasingly requested
feature. We already
[https://genode.org/documentation/release-notes/17.08#Hardware-accelerated_graphics_for_Intel_Gen-8_GPUs - wetted our toes]
in the past. But GPU support has not yet become routinely supported in
system scenarios like Sculpt OS. In 2021, we want to change that, making GPU
support a feature that can be relied on. We will primarily address Intel
graphics first but also explore GPUs on ARM-based devices.
Apart from this overall theme, we plan to continue our commitment to the
NXP i.MX SoC family, revisit Genode's low-latency audio support, and
extend the cultivation of Ada/SPARK within (and on top of) Genode.
Milestones for 2020
Milestones for 2021
###################
In the following, we present a rough schedule of the planned work. As usual,
@@ -136,64 +107,65 @@ it is not set in stone. If you are interested in a particular line of work,
please get in touch.
February - Release 20.02
February - Release 21.02
========================
* Consolidation: removal of the Noux runtime
* Library version of the init component
* Updated audio drivers
* Sculpt
* 64-bit ARM (i.MX8)
* Revised administrative user interface
* System image without Unix tools
* Pluggable device drivers (NIC, WLAN, framebuffer, input)
* VirtualBox 6
* Sculpt: basic UI for the consistent block encrypter (CBE)
* 64-bit ARM
* VirtIO block-device support for virtual machines
* Base platform support for the Pine A64 board (kernel base framework)
May - Release 20.05
May - Release 21.05
===================
* Updated "Genode Foundations" book
* Consolidation
* Block-level components (update to Genode's modern block APIs)
* ARM device drivers (introducing the notion of a platform driver)
* Improved STL support (e.g., threading and mutexes)
* Continuous POSIX-compliance testing
* Systematic network-stack stress and performance tests
* Desktop: panel and virtual desktops
* Use case: Genode-based network router
* Goa: broadened support for 3rd-party build systems
* Native tool chain, including Git
* Sculpt
* Interactive device management
* Keyboard-controlled administration
* Support for BSPs maintained outside of Genode's mainline repository
* Annual documentation update, including the "Genode Foundations" book
* GPU support
* MESA update
* Experiments on ARM (e.g., Vivante on i.MX8, or Mali-400 on A64)
* Sculpt OS on Pine A64 (USB, input, framebuffer, SD-card, networking)
* 64-bit ARM
* Platform-driver consolidation between ARM and x86
* PCI-express support for MNT Reform (i.MX8)
* Tool-chain update (e.g., switching to hard-float on ARM)
* Modernized client-side NIC and uplink APIs
* Goa
* Broadened architecture support and testing workflow
* API projects
* Inter-project dependencies
August - Release 20.08
August - Release 21.08
======================
* Revisited GUI-related framework interfaces
* Extended tooling for performance monitoring
* Goa: Qt development workflow
* Desktop
* Native mail client
* Native web browser
* Sculpt
* Configurable CPU resources
* On-screen documentation
* Block encryption via our
[https://genode.org/documentation/release-notes/19.11#Preliminary_block-device_encrypter - consistent block encrypter]
implemented in Ada/SPARK
* USB audio
* Initial version of a kernel implemented in Ada/SPARK
* Linux DDE re-imagined
* Improved tooling
* Exploring Goa-based development workflow
* GPU support
* GPU multiplexer for Intel Gen9 graphics
* Harmonization of GPU driver with Intel framebuffer driver
* Initial version of a custom kernel (Spunky) implemented in Ada/SPARK
* System-level tracing infrastructure for guiding and validating optimizations
* Pinephone
* Touchscreen and display
* Mobile web browser
* Goa
* CMake-based Qt5 applications
* QML-based applications
November - Release 20.11
November - Release 21.11
========================
* Consolidation of capability-space management across kernels
* CPU-load balancing
* Hardware-accelerated graphics on i.MX8 (experimental)
* Reworked audio stack (interfaces, mixing)
* Sculpt: component lifetime management, shutdown protocol
* VFS plugins for lwext4 and FUSE-based file systems
* Pinephone
* Mobile data connectivity (LTE)
* Phone calls (audio)
* SMS
* seL4
* Update to current kernel version, MCS scheduling
* Combining CAmkES with Genode
* SMMU (I/O-MMU for ARM) support for our custom (base-hw) kernel
* Multi-monitor support

View File

@@ -31,33 +31,25 @@ but build upon of each other:
:'nova':
NOVA hypervisor developed at University of Technology Dresden
See [https://genode.org/documentation/platforms/nova]
:'foc':
Fiasco.OC is a modernized version of the Fiasco microkernel with a
completely revised kernel interface fostering capability-based
security. It is not compatible with L4/Fiasco.
See [https://genode.org/documentation/platforms/foc]
:'hw':
The hw platform allows the execution of Genode on bare ARM and x86 hardware
without the need for a separate kernel. The kernel functionality is
included in core except in the special case of the Muen separation
kernel.
See [https://genode.org/documentation/platforms/hw] and
[https://genode.org/documentation/platforms/muen]
included in core.
:'okl4':
OKL4 kernel (x86_32 and ARM) developed at Open-Kernel-Labs.
See [https://genode.org/documentation/platforms/okl4]
:'pistachio':
L4ka::Pistachio kernel developed at University of Karlsruhe.
See [https://genode.org/documentation/platforms/pistachio]
:'fiasco':
L4/Fiasco kernel developed at University of Technology Dresden.
See [https://genode.org/documentation/platforms/fiasco]
:'sel4':
seL4 microkernel developed at NICTA/General Dynamics
@@ -111,11 +103,6 @@ but build upon of each other:
The repository contains a server that uses a rump kernel to provide
various NetBSD file systems to Genode.
:'dde_zircon':
This repository contains the emulation environment for drivers
ported from the Zircon kernel.
:'ports':
This source-code repository hosts ports of 3rd-party applications to

View File

@@ -1,4 +1 @@
This repository contains the L4/Fiasco-specific implementation of Genode.
For instructions to build and start the Fiasco version of Genode, please
consult the documentation located at 'base-fiasco/doc/fiasco.txt'.

View File

@@ -1 +1 @@
SPECS += fiasco x86_32
SPECS += fiasco

View File

@@ -1 +1 @@
2020-05-26 02e84ead88242170c4d025cb7a62c2c2a0549c61
2021-02-24 a7b98b5b89a2c7689f6580bc00c5fff8d4135bd6

View File

@@ -14,7 +14,10 @@
/* core includes */
#include <core_log.h>
namespace Fiasco {
#include <l4/sys/kdebug.h>
}
void Genode::Core_log::out(char const c) { Fiasco::outchar(c); }
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
void Core_log::out(char const c) { Fiasco::outchar(c); }

View File

@@ -1,4 +1,4 @@
LIBS := core-fiasco
CORE_OBJ := core-fiasco.o
CORE_LIB := core-fiasco.a
include $(BASE_DIR)/src/core/target.inc

View File

@@ -27,154 +27,153 @@
/* core includes */
#include <util.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {
class Mapping
{
private:
addr_t _dst_addr;
Fiasco::l4_fpage_t _fpage;
public:
/**
* Constructor
*/
Mapping(addr_t dst_addr, addr_t src_addr,
Cache_attribute cacheability, bool,
unsigned l2size, bool rw, bool)
:
_dst_addr(dst_addr),
_fpage(Fiasco::l4_fpage(src_addr, l2size, rw, false))
{
if (cacheability == WRITE_COMBINED)
_fpage.fp.cache = Fiasco::L4_FPAGE_BUFFERABLE;
}
/**
* Construct invalid flexpage
*/
Mapping() : _dst_addr(0), _fpage(Fiasco::l4_fpage(0, 0, 0, 0)) { }
Fiasco::l4_umword_t dst_addr() const { return _dst_addr; }
Fiasco::l4_fpage_t fpage() const { return _fpage; }
/**
* Prepare map operation
*
* On Fiasco, we need to map a page locally to be able to map it to
* another address space.
*/
void prepare_map_operation()
{
addr_t core_local_addr = _fpage.fp.page << 12;
size_t mapping_size = 1 << _fpage.fp.size;
for (addr_t i = 0; i < mapping_size; i += L4_PAGESIZE) {
if (_fpage.fp.write)
touch_read_write((unsigned char volatile *)(core_local_addr + i));
else
touch_read((unsigned char const volatile *)(core_local_addr + i));
}
}
};
/**
* Special paging server class
*/
class Ipc_pager
{
private:
Fiasco::l4_threadid_t _last { }; /* origin of last fault message */
addr_t _pf_addr { 0 }; /* page-fault address */
addr_t _pf_ip { 0 }; /* instruction pointer of faulter */
Mapping _reply_mapping { }; /* page-fault answer */
public:
/**
* Wait for a new page fault received as short message IPC
*/
void wait_for_fault();
/**
* Reply current page-fault and wait for a new one
*
* Send short flex page and wait for next short-message (register)
* IPC -- pagefault
*/
void reply_and_wait_for_fault();
/**
* Request instruction pointer of current page fault
*/
addr_t fault_ip() { return _pf_ip; }
/**
* Request fault address of current page fault
*/
addr_t fault_addr() { return _pf_addr & ~3; }
/**
* Set parameters for next reply
*/
void set_reply_mapping(Mapping m) { _reply_mapping = m; }
/**
* Set destination for next reply
*/
void set_reply_dst(Native_capability pager_object) {
_last.raw = pager_object.local_name(); }
/**
* Answer call without sending a flex-page mapping
*
* This function is used to acknowledge local calls from one of
* core's region-manager sessions.
*/
void acknowledge_wakeup();
/**
* Returns true if the last request was send from a core thread
*/
bool request_from_core()
{
enum { CORE_TASK_ID = 4 };
return _last.id.task == CORE_TASK_ID;
}
/**
* Return badge for faulting thread
*
* As Fiasco has no server-defined badges for page-fault messages, we
* interpret the sender ID as badge.
*/
unsigned long badge() const {
return convert_native_thread_id_to_badge(_last); }
bool write_fault() const { return (_pf_addr & 2); }
bool exec_fault() const { return false; }
/**
* Return true if last fault was an exception
*/
bool exception() const
{
/*
* Reflection of exceptions is not supported on this platform.
*/
return false;
}
};
class Mapping;
class Ipc_pager;
}
class Genode::Mapping
{
private:
addr_t _dst_addr;
Fiasco::l4_fpage_t _fpage;
public:
/**
* Constructor
*/
Mapping(addr_t dst_addr, addr_t src_addr,
Cache_attribute cacheability, bool,
unsigned l2size, bool rw, bool)
:
_dst_addr(dst_addr),
_fpage(Fiasco::l4_fpage(src_addr, l2size, rw, false))
{
if (cacheability == WRITE_COMBINED)
_fpage.fp.cache = Fiasco::L4_FPAGE_BUFFERABLE;
}
/**
* Construct invalid flexpage
*/
Mapping() : _dst_addr(0), _fpage(Fiasco::l4_fpage(0, 0, 0, 0)) { }
Fiasco::l4_umword_t dst_addr() const { return _dst_addr; }
Fiasco::l4_fpage_t fpage() const { return _fpage; }
/**
* Prepare map operation
*
* On Fiasco, we need to map a page locally to be able to map it to
* another address space.
*/
void prepare_map_operation()
{
addr_t core_local_addr = _fpage.fp.page << 12;
size_t mapping_size = 1 << _fpage.fp.size;
for (addr_t i = 0; i < mapping_size; i += L4_PAGESIZE) {
if (_fpage.fp.write)
touch_read_write((unsigned char volatile *)(core_local_addr + i));
else
touch_read((unsigned char const volatile *)(core_local_addr + i));
}
}
};
class Genode::Ipc_pager
{
private:
Fiasco::l4_threadid_t _last { }; /* origin of last fault message */
addr_t _pf_addr { 0 }; /* page-fault address */
addr_t _pf_ip { 0 }; /* instruction pointer of faulter */
Mapping _reply_mapping { }; /* page-fault answer */
public:
/**
* Wait for a new page fault received as short message IPC
*/
void wait_for_fault();
/**
* Reply current page-fault and wait for a new one
*
* Send short flex page and wait for next short-message (register)
* IPC -- pagefault
*/
void reply_and_wait_for_fault();
/**
* Request instruction pointer of current page fault
*/
addr_t fault_ip() { return _pf_ip; }
/**
* Request fault address of current page fault
*/
addr_t fault_addr() { return _pf_addr & ~3; }
/**
* Set parameters for next reply
*/
void set_reply_mapping(Mapping m) { _reply_mapping = m; }
/**
* Set destination for next reply
*/
void set_reply_dst(Native_capability pager_object) {
_last.raw = pager_object.local_name(); }
/**
* Answer call without sending a flex-page mapping
*
* This function is used to acknowledge local calls from one of
* core's region-manager sessions.
*/
void acknowledge_wakeup();
/**
* Returns true if the last request was send from a core thread
*/
bool request_from_core()
{
enum { CORE_TASK_ID = 4 };
return _last.id.task == CORE_TASK_ID;
}
/**
* Return badge for faulting thread
*
* As Fiasco has no server-defined badges for page-fault messages, we
* interpret the sender ID as badge.
*/
unsigned long badge() const {
return convert_native_thread_id_to_badge(_last); }
bool write_fault() const { return (_pf_addr & 2); }
bool exec_fault() const { return false; }
/**
* Return true if last fault was an exception
*/
bool exception() const
{
/*
* Reflection of exceptions is not supported on this platform.
*/
return false;
}
};
#endif /* _CORE__INCLUDE__IPC_PAGER_H_ */

View File

@@ -18,12 +18,8 @@
#include <platform.h>
#include <util.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
#include <l4/sys/syscalls.h>
#include <l4/sys/kdebug.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {

View File

@@ -15,9 +15,13 @@
#ifndef _CORE__INCLUDE__PLATFORM_H_
#define _CORE__INCLUDE__PLATFORM_H_
/* Genode includes */
#include <base/allocator_avl.h>
/* base-internal includes */
#include <base/internal/capability_space.h>
/* core includes */
#include <synced_range_allocator.h>
#include <platform_generic.h>
#include <platform_thread.h>
@@ -25,150 +29,149 @@
#include <boot_modules.h>
#include <assertion.h>
namespace Genode { class Platform; }
namespace Genode {
class Platform : public Platform_generic
{
private:
class Genode::Platform : public Platform_generic
{
private:
/*
* Noncopyable
*/
Platform(Platform const &);
Platform &operator = (Platform const &);
/*
* Noncopyable
*/
Platform(Platform const &);
Platform &operator = (Platform const &);
/*
* Shortcut for the type of allocator instances for physical resources
*/
typedef Synced_range_allocator<Allocator_avl> Phys_allocator;
/*
* Shortcut for the type of allocator instances for physical resources
*/
typedef Synced_range_allocator<Allocator_avl> Phys_allocator;
char _core_label[1]; /* to satisfy _core_pd */
Platform_pd *_core_pd = nullptr; /* core protection domain object */
Phys_allocator _ram_alloc; /* RAM allocator */
Phys_allocator _io_mem_alloc; /* MMIO allocator */
Phys_allocator _io_port_alloc; /* I/O port allocator */
Phys_allocator _irq_alloc; /* IRQ allocator */
Phys_allocator _region_alloc; /* virtual memory allocator for core */
Rom_fs _rom_fs { }; /* ROM file system */
Rom_module _kip_rom; /* ROM module for Fiasco KIP */
char _core_label[1]; /* to satisfy _core_pd */
Platform_pd *_core_pd = nullptr; /* core protection domain object */
Phys_allocator _ram_alloc; /* RAM allocator */
Phys_allocator _io_mem_alloc; /* MMIO allocator */
Phys_allocator _io_port_alloc; /* I/O port allocator */
Phys_allocator _irq_alloc; /* IRQ allocator */
Phys_allocator _region_alloc; /* virtual memory allocator for core */
Rom_fs _rom_fs { }; /* ROM file system */
Rom_module _kip_rom; /* ROM module for Fiasco KIP */
addr_t _vm_start = 0; /* begin of virtual memory */
size_t _vm_size = 0; /* size of virtual memory */
addr_t _vm_start = 0; /* begin of virtual memory */
size_t _vm_size = 0; /* size of virtual memory */
/*
* We do not export any boot module loaded before FIRST_ROM.
*/
enum { FIRST_ROM = 3 };
/*
* We do not export any boot module loaded before FIRST_ROM.
*/
enum { FIRST_ROM = 3 };
/**
* Setup base resources
*
* - Map and provide KIP as ROM module
* - Initializes region allocator
*/
void _setup_basics();
/**
* Setup base resources
*
* - Map and provide KIP as ROM module
* - Initializes region allocator
*/
void _setup_basics();
/**
* Setup RAM, IO_MEM, and region allocators
*/
void _setup_mem_alloc();
/**
* Setup RAM, IO_MEM, and region allocators
*/
void _setup_mem_alloc();
/**
* Setup I/O port space allocator
*/
void _setup_io_port_alloc();
/**
* Setup I/O port space allocator
*/
void _setup_io_port_alloc();
/**
* Setup IRQ allocator
*/
void _setup_irq_alloc();
/**
* Setup IRQ allocator
*/
void _setup_irq_alloc();
/**
* Parse multi-boot information and update ROM database
*/
void _init_rom_modules();
/**
* Parse multi-boot information and update ROM database
*/
void _init_rom_modules();
/**
* Setup pager for core-internal threads
*/
void _setup_core_pager();
/**
* Setup pager for core-internal threads
*/
void _setup_core_pager();
addr_t _rom_module_phys(addr_t virt) { return virt; }
addr_t _rom_module_phys(addr_t virt) { return virt; }
public:
/**
* Pager object representing the pager of core namely sigma0
*/
struct Sigma0 : public Pager_object
{
/**
* Constructor
*/
Sigma0();
int pager(Ipc_pager &) override { /* never called */ return -1; }
};
/**
* Return singleton instance of Sigma0 pager object
*/
static Sigma0 &sigma0();
/**
* Core pager thread that handles core-internal page-faults
*/
struct Core_pager : public Platform_thread, public Pager_object
{
/**
* Constructor
*/
Core_pager(Platform_pd &core_pd);
int pager(Ipc_pager &) override { /* never called */ return -1; }
};
/**
* Return singleton instance of core pager object
*/
Core_pager &core_pager();
public:
/**
* Pager object representing the pager of core namely sigma0
*/
struct Sigma0 : public Pager_object
{
/**
* Constructor
*/
Platform();
Sigma0();
int pager(Ipc_pager &) override { /* never called */ return -1; }
};
/**
* Return singleton instance of Sigma0 pager object
*/
static Sigma0 &sigma0();
/**
* Core pager thread that handles core-internal page-faults
*/
struct Core_pager : public Platform_thread, public Pager_object
{
/**
* Accessor for core pd object
* Constructor
*/
Platform_pd &core_pd()
{
if (_core_pd)
return *_core_pd;
Core_pager(Platform_pd &core_pd);
ASSERT_NEVER_CALLED;
}
int pager(Ipc_pager &) override { /* never called */ return -1; }
};
/**
* Return singleton instance of core pager object
*/
Core_pager &core_pager();
/**
* Constructor
*/
Platform();
/**
* Accessor for core pd object
*/
Platform_pd &core_pd()
{
if (_core_pd)
return *_core_pd;
ASSERT_NEVER_CALLED;
}
/********************************
** Generic platform interface **
********************************/
/********************************
** Generic platform interface **
********************************/
Range_allocator &core_mem_alloc() override { return _ram_alloc; }
Range_allocator &ram_alloc() override { return _ram_alloc; }
Range_allocator &io_mem_alloc() override { return _io_mem_alloc; }
Range_allocator &io_port_alloc() override { return _io_port_alloc; }
Range_allocator &irq_alloc() override { return _irq_alloc; }
Range_allocator &region_alloc() override { return _region_alloc; }
addr_t vm_start() const override { return _vm_start; }
size_t vm_size() const override { return _vm_size; }
Rom_fs &rom_fs() override { return _rom_fs; }
Range_allocator &core_mem_alloc() override { return _ram_alloc; }
Range_allocator &ram_alloc() override { return _ram_alloc; }
Range_allocator &io_mem_alloc() override { return _io_mem_alloc; }
Range_allocator &io_port_alloc() override { return _io_port_alloc; }
Range_allocator &irq_alloc() override { return _irq_alloc; }
Range_allocator &region_alloc() override { return _region_alloc; }
addr_t vm_start() const override { return _vm_start; }
size_t vm_size() const override { return _vm_size; }
Rom_fs &rom_fs() override { return _rom_fs; }
size_t max_caps() const override { return Capability_space::max_caps(); }
size_t max_caps() const override { return Capability_space::max_caps(); }
void wait_for_exit() override;
};
}
void wait_for_exit() override;
};
#endif /* _CORE__INCLUDE__PLATFORM_H_ */

View File

@@ -17,188 +17,193 @@
#ifndef _CORE__INCLUDE__PLATFORM_PD_H_
#define _CORE__INCLUDE__PLATFORM_PD_H_
/* Genode includes */
#include <base/allocator.h>
/* core includes */
#include <platform_thread.h>
#include <address_space.h>
namespace Fiasco {
#include <l4/sys/types.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {
class Platform_thread;
class Platform_pd : public Address_space
{
private:
/*
* Noncopyable
*/
Platform_pd(Platform_pd const &);
Platform_pd &operator = (Platform_pd const &);
enum {
VERSION_BITS = 10,
PD_FIRST = 0x10,
PD_MAX = (1 << 11) - 1, /* leave 0x7ff free for L4_INVALID_ID */
PD_VERSION_MAX = (1 << 10) - 1,
PD_INVALID = -1,
THREAD_MAX = (1 << 7),
};
unsigned _pd_id = 0;
unsigned _version = 0;
Fiasco::l4_taskid_t _l4_task_id { }; /* L4 task ID */
/**********************************************
** Threads of this protection domain object **
**********************************************/
Platform_thread *_threads[THREAD_MAX];
/**
* Initialize thread allocator
*/
void _init_threads();
/**
* Thread iteration for one task
*/
Platform_thread *_next_thread();
/**
* Thread allocation
*
* Again a special case for Core thread0.
*/
int _alloc_thread(int thread_id, Platform_thread &thread);
/**
* Thread deallocation
*
* No special case for Core thread0 here - we just never call it.
*/
void _free_thread(int thread_id);
/******************
** PD allocator **
******************/
struct Pd_alloc
{
unsigned reserved : 1;
unsigned free : 1;
unsigned version : VERSION_BITS;
Pd_alloc(bool r, bool f, unsigned v)
: reserved(r), free(f), version(v) { }
Pd_alloc() : reserved(0), free(0), version(0) { }
};
static Pd_alloc *_pds()
{
static Pd_alloc static_pds[PD_MAX];
return static_pds;
}
/**
* Protection-domain creation
*
* The syscall parameter propagates if any L4 kernel function
* should be used. We need the special case for the Core startup.
*/
void _create_pd(bool syscall);
/**
* Protection domain destruction
*
* No special case for Core here - we just never call it.
*/
void _destroy_pd();
/**
* Protection domain allocation
*
* Find free L4 task and use it. We need the special case for Core
* startup.
*/
int _alloc_pd(signed pd_id);
/**
* Protection domain deallocation
*
* No special case for Core here - we just never call it.
*/
void _free_pd();
/***************
** Debugging **
***************/
void _debug_log_pds(void);
void _debug_log_threads(void);
public:
/**
* Constructor
*/
Platform_pd(Allocator &md_alloc, char const *name);
/**
* Constructor used for core's PD
*/
Platform_pd(char const *name, signed pd_id);
/**
* Destructor
*/
~Platform_pd();
/**
* Register quota donation at allocator guard
*/
void upgrade_ram_quota(size_t) { }
/**
* Initialize L4 task facility
*/
static void init();
/**
* Bind thread to protection domain
*
* \return true on success
*/
bool bind_thread(Platform_thread &thread);
/**
* Unbind thread from protection domain
*
* Free the thread's slot and update thread object.
*/
void unbind_thread(Platform_thread &thread);
/**
* Assign parent interface to protection domain
*/
void assign_parent(Native_capability) { }
int pd_id() const { return _pd_id; }
/*****************************
** Address-space interface **
*****************************/
void flush(addr_t, size_t, Core_local_addr) override;
};
class Platform_pd;
}
class Genode::Platform_pd : public Address_space
{
private:
/*
* Noncopyable
*/
Platform_pd(Platform_pd const &);
Platform_pd &operator = (Platform_pd const &);
enum {
VERSION_BITS = 10,
PD_FIRST = 0x10,
PD_MAX = (1 << 11) - 1, /* leave 0x7ff free for L4_INVALID_ID */
PD_VERSION_MAX = (1 << 10) - 1,
PD_INVALID = -1,
THREAD_MAX = (1 << 7),
};
unsigned _pd_id = 0;
unsigned _version = 0;
Fiasco::l4_taskid_t _l4_task_id { }; /* L4 task ID */
/**********************************************
** Threads of this protection domain object **
**********************************************/
Platform_thread *_threads[THREAD_MAX];
/**
* Initialize thread allocator
*/
void _init_threads();
/**
* Thread iteration for one task
*/
Platform_thread *_next_thread();
/**
* Thread allocation
*
* Again a special case for Core thread0.
*/
int _alloc_thread(int thread_id, Platform_thread &thread);
/**
* Thread deallocation
*
* No special case for Core thread0 here - we just never call it.
*/
void _free_thread(int thread_id);
/******************
** PD allocator **
******************/
struct Pd_alloc
{
unsigned reserved : 1;
unsigned free : 1;
unsigned version : VERSION_BITS;
Pd_alloc(bool r, bool f, unsigned v)
: reserved(r), free(f), version(v) { }
Pd_alloc() : reserved(0), free(0), version(0) { }
};
static Pd_alloc *_pds()
{
static Pd_alloc static_pds[PD_MAX];
return static_pds;
}
/**
* Protection-domain creation
*
* The syscall parameter propagates if any L4 kernel function
* should be used. We need the special case for the Core startup.
*/
void _create_pd(bool syscall);
/**
* Protection domain destruction
*
* No special case for Core here - we just never call it.
*/
void _destroy_pd();
/**
* Protection domain allocation
*
* Find free L4 task and use it. We need the special case for Core
* startup.
*/
int _alloc_pd(signed pd_id);
/**
* Protection domain deallocation
*
* No special case for Core here - we just never call it.
*/
void _free_pd();
/***************
** Debugging **
***************/
void _debug_log_pds(void);
void _debug_log_threads(void);
public:
/**
* Constructor
*/
Platform_pd(Allocator &md_alloc, char const *name);
/**
* Constructor used for core's PD
*/
Platform_pd(char const *name, signed pd_id);
/**
* Destructor
*/
~Platform_pd();
/**
* Register quota donation at allocator guard
*/
void upgrade_ram_quota(size_t) { }
/**
* Initialize L4 task facility
*/
static void init();
/**
* Bind thread to protection domain
*
* \return true on success
*/
bool bind_thread(Platform_thread &thread);
/**
* Unbind thread from protection domain
*
* Free the thread's slot and update thread object.
*/
void unbind_thread(Platform_thread &thread);
/**
* Assign parent interface to protection domain
*/
void assign_parent(Native_capability) { }
int pd_id() const { return _pd_id; }
/*****************************
** Address-space interface **
*****************************/
void flush(addr_t, size_t, Core_local_addr) override;
};
#endif /* _CORE__INCLUDE__PLATFORM_PD_H_ */

View File

@@ -24,172 +24,169 @@
#include <platform_pd.h>
#include <assertion.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {
class Platform_pd;
class Platform_thread : Interface
{
private:
/*
* Noncopyable
*/
Platform_thread(Platform_thread const &);
Platform_thread &operator = (Platform_thread const &);
int _thread_id = THREAD_INVALID; /* plain thread number */
Fiasco::l4_threadid_t _l4_thread_id;
typedef String<32> Name;
Name const _name; /* thread name that will be
registered at the kernel
debugger */
Platform_pd *_platform_pd = nullptr; /* protection domain thread
is bound to */
Pager_object *_pager = nullptr;
public:
enum {
THREAD_INVALID = -1, /* invalid thread number */
};
/**
* Constructor
*/
Platform_thread(size_t, const char *name, unsigned priority,
Affinity::Location, addr_t utcb);
/**
* Constructor used for core-internal threads
*/
Platform_thread(const char *name);
/**
* Destructor
*/
~Platform_thread();
/**
* Start thread
*
* \param ip instruction pointer to start at
* \param sp stack pointer to use
*
* \retval 0 successful
* \retval -1 thread could not be started
*/
int start(void *ip, void *sp);
/**
* Pause this thread
*/
void pause();
/**
* Enable/disable single stepping
*/
void single_step(bool) { }
/**
* Resume this thread
*/
void resume();
/**
* Cancel currently blocking operation
*/
void cancel_blocking();
/**
* This thread is about to be bound
*
* \param thread_id local thread ID
* \param l4_thread_id final L4 thread ID
* \param pd platform pd, thread is bound to
*/
void bind(int thread_id, Fiasco::l4_threadid_t l4_thread_id,
Platform_pd &pd);
/**
* Unbind this thread
*/
void unbind();
/**
* Override thread state with 's'
*
* \throw Cpu_session::State_access_failed
*/
void state(Thread_state s);
/**
* Read thread state
*
* \throw Cpu_session::State_access_failed
*/
Thread_state state();
/**
* Set the executing CPU for this thread
*
* SMP is not supported on L4/Fiasco.
*/
void affinity(Affinity::Location) { }
/**
* Request the affinity of this thread
*/
Affinity::Location affinity() const { return Affinity::Location(); }
/************************
** Accessor functions **
************************/
/**
* Return/set pager
*/
Pager_object &pager() const
{
if (_pager)
return *_pager;
ASSERT_NEVER_CALLED;
}
void pager(Pager_object &pager) { _pager = &pager; }
/**
* Return identification of thread when faulting
*/
unsigned long pager_object_badge() const {
return convert_native_thread_id_to_badge(_l4_thread_id); }
/**
* Set CPU quota of the thread to 'quota'
*/
void quota(size_t) { /* not supported*/ }
/**
* Return execution time consumed by the thread
*/
Trace::Execution_time execution_time() const { return { 0, 0 }; }
/*******************************
** Fiasco-specific Accessors **
*******************************/
int thread_id() const { return _thread_id; }
Fiasco::l4_threadid_t native_thread_id() const { return _l4_thread_id; }
Name name() const { return _name; }
};
class Platform_thread;
}
class Genode::Platform_thread : Interface
{
private:
/*
* Noncopyable
*/
Platform_thread(Platform_thread const &);
Platform_thread &operator = (Platform_thread const &);
int _thread_id = THREAD_INVALID; /* plain thread number */
Fiasco::l4_threadid_t _l4_thread_id;
typedef String<32> Name;
Name const _name; /* thread name that will be
registered at the kernel
debugger */
Platform_pd *_platform_pd = nullptr; /* protection domain thread
is bound to */
Pager_object *_pager = nullptr;
public:
enum {
THREAD_INVALID = -1, /* invalid thread number */
};
/**
* Constructor
*/
Platform_thread(size_t, const char *name, unsigned priority,
Affinity::Location, addr_t utcb);
/**
* Constructor used for core-internal threads
*/
Platform_thread(const char *name);
/**
* Destructor
*/
~Platform_thread();
/**
* Start thread
*
* \param ip instruction pointer to start at
* \param sp stack pointer to use
*
* \retval 0 successful
* \retval -1 thread could not be started
*/
int start(void *ip, void *sp);
/**
* Pause this thread
*/
void pause();
/**
* Enable/disable single stepping
*/
void single_step(bool) { }
/**
* Resume this thread
*/
void resume();
/**
* This thread is about to be bound
*
* \param thread_id local thread ID
* \param l4_thread_id final L4 thread ID
* \param pd platform pd, thread is bound to
*/
void bind(int thread_id, Fiasco::l4_threadid_t l4_thread_id,
Platform_pd &pd);
/**
* Unbind this thread
*/
void unbind();
/**
* Override thread state with 's'
*
* \throw Cpu_session::State_access_failed
*/
void state(Thread_state s);
/**
* Read thread state
*
* \throw Cpu_session::State_access_failed
*/
Thread_state state();
/**
* Set the executing CPU for this thread
*
* SMP is not supported on L4/Fiasco.
*/
void affinity(Affinity::Location) { }
/**
* Request the affinity of this thread
*/
Affinity::Location affinity() const { return Affinity::Location(); }
/************************
** Accessor functions **
************************/
/**
* Return/set pager
*/
Pager_object &pager() const
{
if (_pager)
return *_pager;
ASSERT_NEVER_CALLED;
}
void pager(Pager_object &pager) { _pager = &pager; }
/**
* Return identification of thread when faulting
*/
unsigned long pager_object_badge() const {
return convert_native_thread_id_to_badge(_l4_thread_id); }
/**
* Set CPU quota of the thread to 'quota'
*/
void quota(size_t) { /* not supported*/ }
/**
* Return execution time consumed by the thread
*/
Trace::Execution_time execution_time() const { return { 0, 0 }; }
/*******************************
** Fiasco-specific Accessors **
*******************************/
int thread_id() const { return _thread_id; }
Fiasco::l4_threadid_t native_thread_id() const { return _l4_thread_id; }
Name name() const { return _name; }
};
#endif /* _CORE__INCLUDE__PLATFORM_THREAD_H_ */

View File

@@ -14,12 +14,13 @@
#ifndef _CORE__INCLUDE__RPC_CAP_FACTORY_H_
#define _CORE__INCLUDE__RPC_CAP_FACTORY_H_
/* Genode includes */
#include <base/allocator.h>
#include <base/lock.h>
#include <base/capability.h>
namespace Genode { class Rpc_cap_factory; }
class Genode::Rpc_cap_factory
{
private:

View File

@@ -25,13 +25,8 @@
#include <base/internal/fiasco_thread_helper.h>
#include <base/internal/page_size.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
#include <l4/sys/ipc.h>
#include <l4/sys/kdebug.h>
#include <l4/sys/ktrace.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {

View File

@@ -16,11 +16,8 @@
#include <util.h>
#include <io_mem_session_component.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
#include <l4/sigma0/sigma0.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;

View File

@@ -19,15 +19,12 @@
#include <irq_root.h>
#include <util.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
#include <l4/sys/syscalls.h>
#include <l4/sys/types.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
bool Irq_object::_associate()
{
using namespace Fiasco;
@@ -74,7 +71,9 @@ void Irq_object::_wait_for_irq()
L4_IPC_SHORT_MSG, &dw0, &dw1,
L4_IPC_NEVER, &result);
if (L4_IPC_IS_ERROR(result)) error("Ipc error ", L4_IPC_ERROR(result));
if (L4_IPC_IS_ERROR(result))
error("Ipc error ", L4_IPC_ERROR(result));
} while (L4_IPC_IS_ERROR(result));
}
@@ -106,7 +105,7 @@ void Irq_object::entry()
if (!_sig_cap.valid())
continue;
Genode::Signal_transmitter(_sig_cap).submit(1);
Signal_transmitter(_sig_cap).submit(1);
_sync_ack.block();
}
@@ -115,7 +114,7 @@ void Irq_object::entry()
Irq_object::Irq_object(unsigned irq)
:
Thread_deprecated<4096>("irq"),
Thread(Weight::DEFAULT_WEIGHT, "irq", 4096 /* stack */, Type::NORMAL),
_irq(irq)
{ }
@@ -142,7 +141,7 @@ Irq_session_component::Irq_session_component(Range_allocator &irq_alloc,
Irq_session_component::~Irq_session_component()
{
error("Not yet implemented.");
error(__func__, " - not implemented");
}
@@ -152,13 +151,13 @@ void Irq_session_component::ack_irq()
}
void Irq_session_component::sigh(Genode::Signal_context_capability cap)
void Irq_session_component::sigh(Signal_context_capability cap)
{
_irq_object.sigh(cap);
}
Genode::Irq_session::Info Irq_session_component::info()
Irq_session::Info Irq_session_component::info()
{
/* no MSI support */
return { .type = Info::Type::INVALID, .address = 0, .value = 0 };

View File

@@ -22,10 +22,8 @@
#include <base/internal/native_thread.h>
#include <base/internal/capability_space_tpl.h>
namespace Fiasco {
#include <l4/sys/ipc.h>
#include <l4/sys/syscalls.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
using namespace Fiasco;
@@ -37,7 +35,7 @@ using namespace Fiasco;
void Ipc_pager::wait_for_fault()
{
l4_msgdope_t result;
l4_msgdope_t result;
do {
l4_ipc_wait(&_last,
@@ -53,7 +51,7 @@ void Ipc_pager::wait_for_fault()
void Ipc_pager::reply_and_wait_for_fault()
{
l4_msgdope_t result;
l4_msgdope_t result;
l4_ipc_reply_and_wait(_last,
L4_IPC_SHORT_FPAGE, _reply_mapping.dst_addr(),

View File

@@ -17,12 +17,8 @@
/* base-internal includes */
#include <base/internal/capability_space_tpl.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
#include <l4/sys/syscalls.h>
#include <l4/sys/kdebug.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;

View File

@@ -31,17 +31,11 @@
#include <platform_pd.h>
#include <util.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
#include <l4/sys/syscalls.h>
#include <l4/sys/ipc.h>
#include <l4/sys/kernel.h>
#include <l4/sys/kip.h>
#include <l4/sigma0/sigma0.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
using namespace Fiasco;
/***********************************
@@ -54,6 +48,7 @@ static Synced_range_allocator<Allocator_avl> &_core_address_ranges()
return _core_address_ranges;
}
enum { PAGER_STACK_ELEMENTS = 1024 };
static unsigned long _core_pager_stack[PAGER_STACK_ELEMENTS];
static unsigned _core_pager_arg;
@@ -66,8 +61,6 @@ static void _core_pager_loop()
{
unsigned pd_id = _core_pager_arg;
using namespace Fiasco;
l4_threadid_t t;
l4_umword_t dw0, dw1;
l4_msgdope_t r;
@@ -136,7 +129,7 @@ Platform::Sigma0::Sigma0()
0, Affinity::Location(), Session_label(),
Cpu_session::Name("sigma0"))
{
cap(Capability_space::import(Fiasco::sigma0_threadid, Rpc_obj_key()));
cap(Capability_space::import(sigma0_threadid, Rpc_obj_key()));
}
@@ -166,8 +159,6 @@ Platform::Core_pager::Core_pager(Platform_pd &core_pd)
void *sp = (void *)&_core_pager_stack[PAGER_STACK_ELEMENTS - 1];
start((void *)_core_pager_loop, sp);
using namespace Fiasco;
/* pager0 receives pagefaults from me - for NULL pointer detection */
l4_umword_t d;
l4_threadid_t preempter = L4_INVALID_ID;
@@ -236,8 +227,6 @@ static inline void remove_region(Region r, Range_allocator &alloc)
*/
static inline int sigma0_req_region(addr_t *addr, unsigned log2size)
{
using namespace Fiasco;
/* XXX sigma0 always maps pages RW */
l4_umword_t req_fpage = l4_fpage(0, log2size, 0, 0).fpage;
void* rcv_window = L4_IPC_MAPMSG(0, L4_WHOLE_ADDRESS_SPACE);
@@ -246,7 +235,7 @@ static inline int sigma0_req_region(addr_t *addr, unsigned log2size)
l4_msgdope_t result;
l4_msgtag_t tag;
int err = l4_ipc_call_tag(Fiasco::sigma0_threadid,
int err = l4_ipc_call_tag(sigma0_threadid,
L4_IPC_SHORT_MSG, SIGMA0_REQ_FPAGE_ANY, req_fpage,
l4_msgtag(L4_MSGTAG_SIGMA0, 0, 0, 0),
rcv_window, &base, (l4_umword_t *)&rcv_fpage,
@@ -288,8 +277,8 @@ void Platform::_setup_mem_alloc()
if (!err) {
/* XXX do not allocate page0 */
if (addr == 0) {
Fiasco::l4_fpage_unmap(Fiasco::l4_fpage(0, log2_size, 0, 0),
L4_FP_FLUSH_PAGE | L4_FP_ALL_SPACES);
l4_fpage_unmap(l4_fpage(0, log2_size, 0, 0),
L4_FP_FLUSH_PAGE | L4_FP_ALL_SPACES);
continue;
}
@@ -307,14 +296,14 @@ void Platform::_setup_mem_alloc()
}
void Platform::_setup_irq_alloc() {
_irq_alloc.add_range(0, 0x10); }
static Fiasco::l4_kernel_info_t *get_kip()
void Platform::_setup_irq_alloc()
{
using namespace Fiasco;
_irq_alloc.add_range(0, 0x10);
}
static l4_kernel_info_t *get_kip()
{
static l4_kernel_info_t *kip = nullptr;
if (kip) return kip;
@@ -329,7 +318,7 @@ static Fiasco::l4_kernel_info_t *get_kip()
l4_msgdope_t r;
l4_msgtag_t tag;
err = l4_ipc_call_tag(Fiasco::sigma0_threadid,
err = l4_ipc_call_tag(sigma0_threadid,
L4_IPC_SHORT_MSG, SIGMA0_REQ_KIP, 0,
l4_msgtag(L4_MSGTAG_SIGMA0, 0, 0, 0),
fpage, &dw0, &dw1,
@@ -357,10 +346,9 @@ static Fiasco::l4_kernel_info_t *get_kip()
return kip;
}
void Platform::_setup_basics()
{
using namespace Fiasco;
l4_kernel_info_t * kip = get_kip();
/* add KIP as ROM module */
@@ -380,6 +368,7 @@ void Platform::_setup_basics()
break;
}
if (_vm_size == 0)
panic("Virtual memory configuration not found");
@@ -411,7 +400,8 @@ void Platform::_setup_basics()
}
Platform::Platform() :
Platform::Platform()
:
_ram_alloc(nullptr), _io_mem_alloc(&core_mem_alloc()),
_io_port_alloc(&core_mem_alloc()), _irq_alloc(&core_mem_alloc()),
_region_alloc(&core_mem_alloc()),
@@ -432,7 +422,7 @@ Platform::Platform() :
log(_rom_fs);
Fiasco::l4_threadid_t myself = Fiasco::l4_myself();
l4_threadid_t myself = l4_myself();
Platform_pd::init();
@@ -451,8 +441,8 @@ Platform::Platform() :
_core_pd->bind_thread(core_thread);
/* we never call _core_thread.start(), so set name directly */
Fiasco::fiasco_register_thread_name(core_thread.native_thread_id(),
core_thread.name().string());
fiasco_register_thread_name(core_thread.native_thread_id(),
core_thread.name().string());
/* core log as ROM module */
{

View File

@@ -25,19 +25,13 @@
#include <util.h>
#include <platform_pd.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/syscalls.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Fiasco;
using namespace Genode;
/**************************
** Static class members **
**************************/
static bool _init = false;
@@ -64,10 +58,10 @@ void Platform_pd::init()
void Platform_pd::_create_pd(bool syscall)
{
l4_threadid_t l4t = l4_myself();
l4t.id.task = _pd_id;
l4t.id.lthread = 0;
l4t.id.version_low = _version;
l4_threadid_t l4t = l4_myself();
l4t.id.task = _pd_id;
l4t.id.lthread = 0;
l4t.id.version_low = _version;
l4_taskid_t nt;
if (syscall)

View File

@@ -25,13 +25,8 @@
/* base-internal includes */
#include <base/internal/capability_space_tpl.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
#include <l4/sys/syscalls.h>
#include <l4/sys/utcb.h>
#include <l4/sys/kdebug.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
using namespace Fiasco;
@@ -142,17 +137,6 @@ Thread_state Platform_thread::state()
}
void Platform_thread::cancel_blocking()
{
l4_umword_t dummy;
l4_threadid_t invalid = L4_INVALID_ID;
l4_inter_task_ex_regs(_l4_thread_id, ~0UL, ~0UL,
&invalid, &invalid, &invalid,
&dummy, &dummy, &dummy, 0, l4_utcb_get());
}
Platform_thread::Platform_thread(size_t, const char *name, unsigned,
Affinity::Location, addr_t)
: _l4_thread_id(L4_INVALID_ID), _name(name) { }

View File

@@ -14,13 +14,18 @@
* under the terms of the GNU Affero General Public License version 3.
*/
/* core includes */
#include <ram_dataspace_factory.h>
using namespace Genode;
void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { }
void Ram_dataspace_factory::_revoke_ram_ds(Dataspace_component &) { }
void Ram_dataspace_factory::_clear_ds(Dataspace_component &ds)
{
memset((void *)ds.phys_addr(), 0, ds.size());

View File

@@ -11,18 +11,20 @@
* under the terms of the GNU Affero General Public License version 3.
*/
/* base-internal includes */
#include <base/internal/fiasco_thread_helper.h>
#include "platform.h"
#include "util.h"
/* core includes */
#include <platform.h>
#include <util.h>
namespace Fiasco {
#include <l4/sys/ipc.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
using namespace Fiasco;
void Platform::_setup_io_port_alloc()
{
l4_fpage_t fp;

View File

@@ -49,14 +49,6 @@ void Thread::start()
}
void Thread::cancel_blocking()
{
/*
* Within core, we never need to unblock threads
*/
}
void Thread::_deinit_platform_thread()
{
/* destruct platform thread */

View File

@@ -14,8 +14,10 @@
#ifndef _INCLUDE__FIASCO__THREAD_HELPER_H_
#define _INCLUDE__FIASCO__THREAD_HELPER_H_
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Fiasco {
#include <l4/sys/types.h>
/**
* Sigma0 thread ID

View File

@@ -22,9 +22,7 @@
#define _INCLUDE__BASE__INTERNAL__LOCK_HELPER_H_
/* L4/Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
}
#include <fiasco/syscall.h>
/**

View File

@@ -17,10 +17,8 @@
/* Genode includes */
#include <base/stdint.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {
@@ -28,6 +26,7 @@ namespace Genode {
struct Native_thread;
}
struct Genode::Native_thread
{
Fiasco::l4_threadid_t l4id;

View File

@@ -14,10 +14,8 @@
#ifndef _INCLUDE__BASE__INTERNAL__RAW_WRITE_STRING_H_
#define _INCLUDE__BASE__INTERNAL__RAW_WRITE_STRING_H_
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/kdebug.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {

View File

@@ -14,10 +14,8 @@
#ifndef _INCLUDE__BASE__INTERNAL__RPC_DESTINATION_H_
#define _INCLUDE__BASE__INTERNAL__RPC_DESTINATION_H_
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
namespace Genode {

View File

@@ -0,0 +1,29 @@
/*
* \brief Collection of L4/Fiasco kernel bindings
* \author Norman Feske
* \date 2020-12-06
*/
/*
* Copyright (C) 2020 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__FIASCO__SYSCALL_H_
#define _INCLUDE__FIASCO__SYSCALL_H_
namespace Fiasco {
#include <l4/sys/types.h>
#include <l4/sys/kdebug.h>
#include <l4/sys/ipc.h>
#include <l4/sys/kernel.h>
#include <l4/sys/kip.h>
#include <l4/sys/utcb.h>
#include <l4/sys/ktrace.h>
#include <l4/sys/syscalls.h>
#include <l4/sigma0/sigma0.h>
}
#endif /* _INCLUDE__FIASCO__SYSCALL_H_ */

View File

@@ -11,6 +11,7 @@
* under the terms of the GNU Affero General Public License version 3.
*/
/* Genode includes */
#include <base/log.h>
/* base-internal includes */

View File

@@ -20,13 +20,11 @@
#include <base/internal/ipc_server.h>
#include <base/internal/capability_space_tpl.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
#include <l4/sys/syscalls.h>
}
/* L4/Fiasco includes */
#include <fiasco/syscall.h>
using namespace Genode;
using namespace Fiasco;
class Msg_header
@@ -34,9 +32,9 @@ class Msg_header
private:
/* kernel-defined message header */
Fiasco::l4_fpage_t rcv_fpage; /* unused */
Fiasco::l4_msgdope_t size_dope;
Fiasco::l4_msgdope_t send_dope;
l4_fpage_t rcv_fpage; /* unused */
l4_msgdope_t size_dope;
l4_msgdope_t send_dope;
public:
@@ -47,15 +45,15 @@ class Msg_header
* arguments. The kernel does not fetch these data words from memory
* but transfers them via the short-IPC registers.
*/
Fiasco::l4_umword_t protocol_word;
Fiasco::l4_umword_t num_caps;
l4_umword_t protocol_word;
l4_umword_t num_caps;
private:
enum { MAX_CAPS_PER_MSG = Msgbuf_base::MAX_CAPS_PER_MSG };
Fiasco::l4_threadid_t _cap_tid [MAX_CAPS_PER_MSG];
unsigned long _cap_local_name [MAX_CAPS_PER_MSG];
l4_threadid_t _cap_tid [MAX_CAPS_PER_MSG];
unsigned long _cap_local_name [MAX_CAPS_PER_MSG];
size_t _num_msg_words(size_t num_data_words) const
{
@@ -65,7 +63,7 @@ class Msg_header
* Account for the transfer of the protocol word, capability count,
* and capability arguments in front of the payload.
*/
return 2 + caps_size/sizeof(Fiasco::l4_umword_t) + num_data_words;
return 2 + caps_size/sizeof(l4_umword_t) + num_data_words;
}
public:
@@ -77,8 +75,6 @@ class Msg_header
*/
void prepare_snd_msg(unsigned long protocol, Msgbuf_base const &snd_msg)
{
using namespace Fiasco;
protocol_word = protocol;
num_caps = min((unsigned)MAX_CAPS_PER_MSG, snd_msg.used_caps());
@@ -109,8 +105,6 @@ class Msg_header
*/
void prepare_rcv_msg(Msgbuf_base const &rcv_msg)
{
using namespace Fiasco;
size_t const rcv_max_words = rcv_msg.capacity()/sizeof(l4_umword_t);
size_dope = L4_IPC_DOPE(_num_msg_words(rcv_max_words), 0);
@@ -124,7 +118,7 @@ class Msg_header
for (unsigned i = 0; i < min((unsigned)MAX_CAPS_PER_MSG, num_caps); i++) {
Rpc_obj_key const rpc_obj_key(_cap_local_name[i]);
bool const cap_valid = !Fiasco::l4_is_invalid_id(_cap_tid[i]);
bool const cap_valid = !l4_is_invalid_id(_cap_tid[i]);
Native_capability cap;
if (cap_valid) {
@@ -147,8 +141,6 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst,
Msgbuf_base &snd_msg, Msgbuf_base &rcv_msg,
size_t)
{
using namespace Fiasco;
Capability_space::Ipc_cap_data const dst_data =
Capability_space::ipc_cap_data(dst);
@@ -190,8 +182,6 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst,
void Genode::ipc_reply(Native_capability caller, Rpc_exception_code exc,
Msgbuf_base &snd_msg)
{
using namespace Fiasco;
Msg_header &snd_header = snd_msg.header<Msg_header>();
snd_header.prepare_snd_msg(exc.value, snd_msg);
@@ -209,8 +199,6 @@ Genode::Rpc_request Genode::ipc_reply_wait(Reply_capability const &last_caller,
Msgbuf_base &reply_msg,
Msgbuf_base &request_msg)
{
using namespace Fiasco;
l4_msgdope_t ipc_result;
bool need_to_wait = true;
@@ -276,7 +264,7 @@ Genode::Rpc_request Genode::ipc_reply_wait(Reply_capability const &last_caller,
Ipc_server::Ipc_server()
:
Native_capability(Capability_space::import(Fiasco::l4_myself(), Rpc_obj_key()))
Native_capability(Capability_space::import(l4_myself(), Rpc_obj_key()))
{ }

View File

@@ -12,51 +12,48 @@
*/
/* Genode includes */
#include <base/cancelable_lock.h>
#include <base/thread.h>
#include <cpu/atomic.h>
#include <cpu/memory_barrier.h>
/* L4/Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
}
#include <fiasco/syscall.h>
using namespace Genode;
Cancelable_lock::Cancelable_lock(Cancelable_lock::State initial)
: _state(UNLOCKED), _owner(nullptr)
Lock::Lock(Lock::State initial)
:
_state(UNLOCKED), _owner(nullptr)
{
if (initial == LOCKED)
lock();
}
void Cancelable_lock::lock()
void Lock::lock()
{
Applicant myself(Thread::myself());
lock(myself);
}
void Cancelable_lock::lock(Applicant &myself)
void Lock::lock(Applicant &myself)
{
/*
* XXX: How to notice cancel-blocking signals issued when being outside the
* 'l4_ipc_sleep' system call?
*/
while (!Genode::cmpxchg(&_state, UNLOCKED, LOCKED))
if (Fiasco::l4_ipc_sleep(Fiasco::l4_ipc_timeout(0, 0, 500, 0)) != L4_IPC_RETIMEOUT)
throw Genode::Blocking_canceled();
while (!cmpxchg(&_state, UNLOCKED, LOCKED))
Fiasco::l4_ipc_sleep(Fiasco::l4_ipc_timeout(0, 0, 500, 0));
_owner = myself;
}
void Cancelable_lock::unlock()
void Lock::unlock()
{
_owner = Applicant(nullptr);
Genode::memory_barrier();
memory_barrier();
_state = UNLOCKED;
}

View File

@@ -14,12 +14,9 @@
/* Genode includes */
#include <base/sleep.h>
#include <base/lock.h>
/* L4/Fiasco includes */
namespace Fiasco {
#include <l4/sys/ipc.h>
}
#include <fiasco/syscall.h>
void Genode::sleep_forever()

View File

@@ -1,9 +1,4 @@
This repository contains the port of Genode to the Fiasco.OC microkernel.
For further information, please refer to the following documents:
:[http://genode.org/community/wiki/GenodeOnFiascoOC - Genode on Fiasco.OC Wiki page]:
This Wiki page contains the information on how to build and use
Genode with Fiasco.OC.
:[http://os.inf.tu-dresden.de/fiasco]:
Official website for the Fiasco.OC microkernel.
:[https://os.inf.tu-dresden.de/fiasco]:
Official website for the Fiasco.OC microkernel

View File

@@ -0,0 +1 @@
BOARD ?= unknown

View File

@@ -1,5 +1 @@
SPECS += foc
ifneq ($(filter x86_%,$(SPECS)),)
SPECS += pci acpi ps2 vesa framebuffer
endif

View File

@@ -25,17 +25,17 @@ namespace Genode { namespace Capability_space {
* Allocate kernel capability selector without associating it with a
* Genode capability
*/
Fiasco::l4_cap_idx_t alloc_kcap();
Foc::l4_cap_idx_t alloc_kcap();
/**
* Release kernel capability selector
*/
void free_kcap(Fiasco::l4_cap_idx_t);
void free_kcap(Foc::l4_cap_idx_t);
/**
* Request kernel capability selector associated with Genode capability
*/
Fiasco::l4_cap_idx_t kcap(Native_capability);
Foc::l4_cap_idx_t kcap(Native_capability);
} }

View File

@@ -14,18 +14,16 @@
#ifndef _INCLUDE__FOC__NATIVE_CAPABILITY_H_
#define _INCLUDE__FOC__NATIVE_CAPABILITY_H_
namespace Fiasco {
#include <l4/sys/consts.h>
#include <l4/sys/types.h>
#include <l4/sys/utcb.h>
#include <l4/sys/task.h>
#include <foc/syscall.h>
namespace Foc {
/*********************************************
** Capability selectors controlled by core **
*********************************************/
/* use the same task cap selector like L4Re for compatibility in L4Linux */
static constexpr l4_cap_idx_t TASK_CAP = L4_BASE_TASK_CAP;
static constexpr l4_cap_idx_t TASK_CAP = L4_BASE_TASK_CAP;
static constexpr l4_cap_idx_t DEBUG_CAP = L4_BASE_DEBUGGER_CAP;

View File

@@ -21,23 +21,20 @@
/* Genode includes */
#include <base/stdint.h>
#include <foc/receive_window.h>
/* Fiasco.OC includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
#include <foc/syscall.h>
namespace Genode { struct Native_thread; }
struct Genode::Native_thread
{
Fiasco::l4_cap_idx_t kcap = 0;
Foc::l4_cap_idx_t kcap = 0;
/* receive window for capability selectors received at the server side */
Receive_window rcv_window { };
Native_thread() { }
explicit Native_thread(Fiasco::l4_cap_idx_t kcap) : kcap(kcap) { }
explicit Native_thread(Foc::l4_cap_idx_t kcap) : kcap(kcap) { }
};
#endif /* _INCLUDE__FOC__NATIVE_THREAD_H_ */

View File

@@ -0,0 +1,36 @@
/*
* \brief Collection of Fiasco.OC kernel bindings
* \author Norman Feske
* \date 2020-11-27
*/
/*
* Copyright (C) 2020 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__FOC__SYSCALL_H_
#define _INCLUDE__FOC__SYSCALL_H_
namespace Foc {
#include <l4/sys/types.h>
#include <l4/sys/kip>
#include <l4/sys/kdebug.h>
#include <l4/sys/cache.h>
#include <l4/sys/consts.h>
#include <l4/sys/utcb.h>
#include <l4/sys/task.h>
#include <l4/sys/ipc.h>
#include <l4/sys/thread.h>
#include <l4/sys/factory.h>
#include <l4/sys/irq.h>
#include <l4/sys/debugger.h>
#include <l4/sys/icu.h>
#include <l4/sys/ktrace.h>
#include <l4/sys/scheduler.h>
#include <l4/sigma0/sigma0.h>
}
#endif /* _INCLUDE__FOC__SYSCALL_H_ */

View File

@@ -17,33 +17,22 @@
#define _INCLUDE__FOC__THREAD_STATE_H_
#include <base/capability.h>
#include <base/lock.h>
#include <base/thread_state.h>
/* Fiasco includes */
namespace Fiasco {
#include <l4/sys/types.h>
}
#include <foc/syscall.h>
namespace Genode { struct Foc_thread_state; }
struct Genode::Foc_thread_state : Thread_state
{
Fiasco::l4_cap_idx_t kcap; /* thread's gate cap in its pd */
int id; /* id of gate capability */
addr_t utcb; /* thread's utcb in its pd */
unsigned exceptions; /* counts exceptions raised by the thread */
bool paused; /* indicates whether thread is stopped */
bool in_exception; /* true if thread is in exception */
Lock lock { };
Foc::l4_cap_idx_t kcap; /* thread's gate cap in its PD */
int id; /* ID of gate capability */
addr_t utcb; /* thread's UTCB in its PD */
/**
* Constructor
*/
Foc_thread_state()
: kcap(Fiasco::L4_INVALID_CAP), id(0), utcb(0), exceptions(0),
paused(false), in_exception(false) { }
Foc_thread_state() : kcap(Foc::L4_INVALID_CAP), id(0), utcb(0) { }
};
#endif /* _INCLUDE__FOC__THREAD_STATE_H_ */

Some files were not shown because too many files have changed in this diff Show More