Commit Graph

8367 Commits

Author SHA1 Message Date
Stefan Kalkowski 7a45867841 vmm_arm: support for i.MX7 Dual SABRE board
Fix #3285
2019-05-06 16:15:25 +02:00
Stefan Kalkowski 0e94d7410d noux_tool_chain_auto: enable imx6 and imx7 boards
Fix #3288
2019-05-06 16:15:25 +02:00
Stefan Kalkowski f074954d3d hw: use `eret` in `hyp` mode to switch mode
Instead of using `cps` instruction, use an exception return
instruction to switch from `hyp` mode to `svc` mode.
Otherwise it causes unpredicted behaviour on ARM.

Fix #3284
2019-05-06 16:15:25 +02:00
Norman Feske c433f87000 os: batching of packet-stream source operations
This patch adds support for manually triggering the wakeup of the packet
sink by the source. This way, a packet source becomes able to marshal
batches of submissions or unmarshal batches of acknowledgements before
yielding the control over to the sink.

Issue #3283
2019-05-06 16:15:25 +02:00
Norman Feske ea6b1c255e base: add const version of 'Fifo::Element::object' 2019-05-06 16:15:25 +02:00
Alexander Boettcher 35cf804471 base: free up all blocks on avl destruction
Issue #3111

remove_range may deny to the job on memory pressure or insane ranges,
which ends up in an endless loop when the Avl allocator is in destruction.

Since the Avl gets destructed, solely the memory free up is of importance,
not the correct range adjustments during remove_range.
2019-05-06 16:15:25 +02:00
Alexander Boettcher 526554741f vm_session: evaluate priority (nova)
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher d2229ab381 vm_session: evaluate priority
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher d459432c45 init: scale priority of vm_session
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher 450c8dc149 vm_session: track dataspaces used by attach
Track the dataspaces used by attach and add handling of flushing VM space
when dataspace gets destroyed (not triggered via the vm_session interface).

Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher 169c51d50d base: remove error message in slab block
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher d1f37e66eb base: fix _sum_in_range in avl structure
Handles corner case when addr + size becomes exactly 0. Before the commit
the function returned that sum is not part of the range, which is wrong.

Issue #3111
2019-05-06 16:15:24 +02:00
Alexander Boettcher 812149ed29 core: add Region_map_detach interface
Issue #3111
2019-05-06 16:15:24 +02:00
Norman Feske 593e971121 block_session: SYNC and TRIM as async operations
This patch removes the blocking Block::Session::sync RPC function and
adds the asynchronous operations SYNC and TRIM to the block session's
packet-stream interface.

Even though the patch adjusts all block components to the interface
change, the components keep the former blocking handling of sync
internally for now because of the design of the 'Block::Driver'
interface. This old interface is not worth changing. We should instead
migrate the block servers step by step to the new
'Block::Request_stream' API.

Fixes #3274
2019-05-06 16:15:24 +02:00
Norman Feske e058adc4fe block_session: add client-defined request tag
The new request tag allows a block-session client to uniquely correlate
acknowledgements with outstanding requests. Until now, this was possible
for read and write operations by taking the value of the request's
packet-stream offset. However, SYNC and TRIM requests do not carry any
packet-stream payload and thereby lack meaningful offset values. By
introducing the notion of a 'tag', we can support multiple outstanding
requests of any type and don't need to overload the meaning of the
'offset' value.

Issue #3274
2019-05-06 16:15:24 +02:00
Norman Feske a39474a245 block-request stream: split Operation from Request
This patch splits the 'Request' definition into smaller types that are
suitable for the client-side API too.

The new 'Operation' type comprises the block operation's type (opcode)
and the operation's arguments (block number, block count).
The former 'Request::operation_defined' is now 'Operation::valid'.
The 'Request' aggregates an 'Operation', which changes its object
layout.

Note that this commit relaxes the bit-precise definition of 'Request' to
facilitate the use of 'unsigned long' where appropriate, in particular
for the request tag (which should correspond to an 'Id_space::Id'). The
originally bit-precise definition was pursued to allow the sharing of
the 'Request' type between SPARK and C++ code. However, it turns out
that defining a native type in each language and a (set of) converting
constructors is a more natural approach.

Issue #3283
2019-05-06 16:15:24 +02:00
Christian Prochaska ed246d152b tool_chain: build in <genode-dir>/build/tool_chain-<version>
Fixes #2608
2019-05-06 16:15:24 +02:00
Stefan Kalkowski 7f965dad29 vmm_arm: do not use uart driver in automated test
Fix #3278
2019-05-06 16:15:24 +02:00
Stefan Kalkowski 0a470e66f2 vmm_arm: uart device model needs to take all chars
When receiving a terminal signal, the uart device model has to
take all characters out of the stream. Otherwise, characters
might never arrive at the VM. This was not recognized before,
because it was used with a quite slow UART only, which obviously
never achieved to send more characters at once.

Ref #3278
2019-05-06 16:15:24 +02:00
Stefan Kalkowski 94881e757a test-terminal_expect_send: expect-like helper tool
A small terminal-client tool, which expects a specific line(-start),
and then sends a specified line to the other side. Optionally,
it prints all received lines to its LOG service.

Ref #3278
2019-05-06 16:15:24 +02:00
Alexander Boettcher 26796c8f7a nova: update kernel branch
- sorting of initializer by Christian Prochaska - issue #3253
- leak of FPU register state reported by Julian Stecklina - thanks !
- fix page table synchronization bug - by Julian Stecklina
- add a second dynamic buddy if the memory requirements could not be fulfilled
  by the first dynamic buddy
- disable vtlb peek if EPT/NPT is enabled
2019-05-06 16:15:16 +02:00
Norman Feske 51f51c18af block/request_stream: rename wakeup_client
This patch renames 'wakeup_client' to 'wakeup_client_if_needed' to
clarify that the method triggers signals only when needed, not on every
call.

The name 'wakeup_client' is prone to misguide users to call the function
conditionally as an optimization, thereby complicating the code, but to
no effect.

Fixes #3279
2019-05-03 13:53:12 +02:00
Norman Feske 34fd5f626a test/block_request_stream: private Request_stream
Avoid public inheritance to make the code simpler to understand.

Issue #3279
2019-05-03 13:53:12 +02:00
Norman Feske bbe3ee8dc5 block_session: server-defined payload alignment
This patch replaces the formerly fixed 2 KiB data alignment within the
packet-stream buffer by a server-defined alignment. This has two
benefits.

First, when using block servers that provide small block sizes like 512
bytes, we avoid fragmenting the packet-stream buffer, which occurs when
aligning 512-byte requests at 2 KiB boundaries. This reduces meta data
costs for the packet-stream allocator and also allows fitting more
requests into the buffer.

Second, block drivers with alignment constraints dictated by the
hardware can now pass those constraints to the client, thereby easing
the use of zero-copy DMA directly into the packet stream.

The alignment is determined by the Block::Session_client at construction
time and applied by the Block::Session_client::alloc_packet method.
Block-session clients should always use this method, not the 'alloc_packet'
method of the packet stream (tx source) directly. The latter merely
applies a default alignment of 2 KiB.

At the server side, the alignment is automatically checked by
block/component.h (old API) and block/request_stream.h (new API).

Issue #3274
2019-05-03 13:53:12 +02:00
Norman Feske 2208220c12 block session: remove Block::Session::Operations
This patch modernizes the 'Block::Session::info' interface. Instead of
using out parameters, the 'init' RPC function returns a compound 'Info'
object now. The rather complicated 'Operations' struct is replaced by
a 'writeable' attribute in the 'Info' object.

Fixes #3275
2019-05-03 13:53:12 +02:00
Norman Feske 10c567daee base: add 'aligned' function to util/misc_math.h
This function simplifies the sanity checking of values that are expected
to be aligned, e.g., data offsets within packet streams.
2019-05-03 13:31:39 +02:00
Christian Helmuth 6ea1179145 depot: update recipe hashes 2019-04-09 12:30:35 +02:00
Christian Helmuth 71a8dcca08 tool/depot: use nullglob on stale archive removal
nullglob is needed to get an empty shell glob in case no matching binary
archive (path) exists. Otherwise, the original glob string including the
* is returned and used in the for loop.
2019-04-09 12:30:35 +02:00
Stefan Kalkowski a147bdf406 hw: silent warning about unknown signal context
Triggering of an invalidated signal seems to be no real exception,
but something that occurs regularily. Therefore, the kernel warning
is of no use to developers anymore.

Ref #3277
2019-04-09 12:30:35 +02:00
Stefan Kalkowski 0ca199f89a hw: replace lock-safe log variants in kernel
As far as possible remove usage of warning/error/log in the kernel,
otherwise the kernel context might try to take a lock hold by a core
thread, which results in a syscall to block.

Fix #3277
2019-04-09 12:30:35 +02:00
Norman Feske 9e238d624e extract: discharge dependency from timer session
This patch removes the reliance of the extract tool from the libc's
behavior regarding the access of time and timing.

The extract tool is not expected to need time. However, unfortunately,
libarchive calls the 'time' function unconditionally. By adding a
dummy for 'time', we avoid bothering the libc, which would otherwise
need to obtain a time source.

Issue #3204
2019-04-09 12:30:35 +02:00
Norman Feske 6d11591d83 test-spark: rename number_of_bits -> object_size
In the original version, I used 'number_of_bits' because Ada's 'Size
returns the size in bits, not bytes. But the values (for objects) are
always a multiple of 8. On the C++ side, performing size checks at the
granularity of bits is just awkward. The term 'object size' is more
natural.
2019-04-09 12:30:35 +02:00
Sebastian Sumpf 5937492e93 base-foc: map debug cap through the correct index
* necessary for enabling the kernel debugging facilities on base-foc
  (outstring, fiasco_tbuf_log_3val and friends)
* disabled by default

related to issue #3260
2019-04-09 12:30:35 +02:00
Norman Feske ec70081258 test-ldso: refine log pattern
By adding a wildcard at the beginning of (expected) error messages, the
test.run tool becomes able to match the lines (ignoring the characters
of the color escape sequence).
2019-04-09 12:30:35 +02:00
Christian Helmuth 9948a77558 spark: provide rcheck symbols in ABI 2019-04-09 12:30:35 +02:00
Norman Feske 724761565d libsparkcrypto: don't override CUSTOM_ADA_OPT
CUSTOM_ADA_OPT must not be defined outside <build-dir>/etc/tools.conf
2019-04-09 12:30:35 +02:00
Martin Stein 9d236e8e03 block/request: fixed enum values 2019-04-09 12:30:35 +02:00
Martin Stein a9851aca55 block/request: add member 'tag'
Issue #3274
2019-04-09 12:30:35 +02:00
Norman Feske a2743dcaeb Library for the AES-CBC en/decryption of 4K blocks
The 'aes_cbc_4k' library is simple wrapper around libsparkcrypto to
serve as a backend for storage encryption. It operates on data chunks of
4 KiB and uses AES-CBC while incorporating the block number and the
private key as salt values.
2019-04-09 12:30:35 +02:00
Pirmin Duss 8b4e2a21e4 e2fsprogs: disarm the mount-point check
Discovered while creating an ext2 file system on an sd_card (no
partitions, imx6), which failed with an error message that stated the
device is in use. Genode's libc/posix layer has no notion of mount
points.

Fixes #3271
2019-04-09 12:30:35 +02:00
Pirmin Duss 642c2ab4bc sd_card_drv: increase multiblock transfer timeout
Disconnecting a client and connecting an other to the sd_card_drv
on imx6 results in a "Completion host signal timed out" error in
the newly connected client.

Fixes #3272
2019-04-09 12:30:35 +02:00
Alexander Boettcher 93ba870b2d top: show execution times per SC and per EC
Issue #3192
2019-04-09 12:30:35 +02:00
Alexander Boettcher 36fac8e22b run/test: support TRACE service
Issue #3192
2019-04-09 12:30:35 +02:00
Alexander Boettcher ae16edf1d6 trace: support more facets of execution time
- execution time per thread context
- execution time per scheduling context
- quantum and priority

Issue #3192
2019-04-09 12:30:34 +02:00
Ehmry - 66f49e6c42 VFS lwIP: support opening a handle on the root directory
The "nameserver" file cannot be opened through a VFS File_system client
if the plugin does not support opening the parent directory of
"/nameserver", which would be "/".

Ref #3269
2019-04-09 12:30:34 +02:00
Ehmry - a635873568 VFS: Replace global response handlers with local handlers
Replace the I/O response handler that is passed to the VFS at
construction with an object that is dynamically attached to handles.
This object shall also accept read-ready notifications, and plugins are
encouraged to keep handles awaiting ready-ready notifications separate
from handles that await I/O progress.

Replace the use of handle lists in plugins with handle queues, this
makes the code easier to understand and the ordering of notifications to
the application more explicit.

These changes replace the use of the Post_signal_hook from all VFS
plugins, applications must assume that read-ready and I/O notifications
occur during I/O signal dispatch and use an Io_progress_handler at its
entrypoints to defer response until after signal dispatching.

Fix #3257
2019-04-09 12:30:34 +02:00
Ehmry - e2ff776b35 Print error locations in test-libc_connect
Ref #3257
2019-04-09 12:30:34 +02:00
Alexander Boettcher 356526d610 foc: increase USER_BASE_CAP
due to THREAD_AREA_SLOT increase by

foc/x86: implement vm_session interface

Add additional static assertion check to detect misconfiguration earlier.
2019-04-09 12:30:34 +02:00
Josef Söntgen 38a10c92d3 pthread: initialize static rwlocks/conds
Make sure that the rwlock is allocated before a lock operation is
performed. This case occurs if a static rwlock was create by using
PTHREAD_RWLOCK_INITIALIZER. Same goes for PTHREAD_CONDS_INITIALIZER.

Fixes #3262.
2019-04-09 12:30:34 +02:00
Josef Söntgen 3c8714ed5a dde_bsd: make HDMI/DP HDA check stricter
Since QEMU might put the audio device at 00:03.0, also check if the
vendor is Intel. Hopefully we do not render HDA on real machines
useless with this changes (so far I have not encountered one).

Fixes #3263.
2019-04-09 12:30:34 +02:00