Commit Graph

1751 Commits

Author SHA1 Message Date
Stefan Kalkowski
c767f6ccf1 os: explicit cache policy in Nic::Session_component
To enable the use of uncached DMA buffers as RX and TX communication
buffers in between driver (service) and client, introduce a cache
attribute in the constructor of Nic::Session_component

Ref #3291
2019-05-06 16:15:26 +02:00
Martin Stein
181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
2019-05-06 16:15:26 +02:00
Norman Feske
17fda73ca1 block_tester: update to new block-client API
- Added 'io_buffer' attribute, default is 4M
- Added 'batch' attribute, specifying the number of jobs used
  in parallel, default is 1 (sequential)
- Removed 'synchronous' attribute (use batch of 1 instead)
- Added 'copy' attribute (default "yes")
- Print number of signals ("triggered")

Issue #3283
2019-05-06 16:15:25 +02:00
Norman Feske
784206c85c block_session: new client-side API
This patch equips the 'Block::Connection' with a framework API for the
implementation of robust block-session clients that perform block I/O in
an asynchronous fashion.

An application-defined 'JOB' type, inherited from 'Connection::Job',
encapsulates the application's context information associated with a
block operation.

The lifecycle of the jobs is implemented by the 'Connection' and driven
by the application's invokation of 'Connection::update_jobs'. The
'update_jobs' mechanism takes three hook functions as arguments, which
implement the applications-defined policy for producing and consuming
data, and for the completion of jobs.

Issue #3283
2019-05-06 16:15:25 +02:00
Norman Feske
976f67eee6 os: make 'Block::Operation' printable
Issue #3283
2019-05-06 16:15:25 +02:00
Norman Feske
e5f27b44b5 block_session: turn 'Connection' into template
As a preparatory step for introducing the new block-client API, we have
to turn the 'Block::Connection' into a class template. The template
argument will be used to tie an application-defined job type to the
block connection.

Issue #3283
2019-05-06 16:15:25 +02:00
Norman Feske
6c0dd9fe3b block_session: use types from block/request.h
Issue #3283
2019-05-06 16:15:25 +02:00
Stefan Kalkowski
7a45867841 vmm_arm: support for i.MX7 Dual SABRE board
Fix #3285
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
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
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
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
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
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
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
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
Josef Söntgen
3362216b66 os: clear remaining samples in Audio packet
... instead of potentially producing out-of-bounds write in the source
buffer.

Fixes #3264.
2019-04-09 12:30:34 +02:00
Josef Söntgen
5ceba11982 os: make Audio_out content filler data arg const
Issue #3264.
2019-04-09 12:30:34 +02:00
Norman Feske
d027f12764 depot: update recipe hashes 2019-04-02 09:36:39 +02:00
Alexander Boettcher
ca32c11f4f nitpicker: send mode change on domain update
Fixes #3259
2019-04-01 19:33:52 +02:00
Norman Feske
a224d828f6 test.run: integrate content from raw archives
This patch enables the test.run tool to execute the test-init package.

Issue #3256
2019-04-01 19:33:52 +02:00
Alexander Boettcher
ef130a3bf9 sel4/x86: implement vm_session interface
Issue #3111

- enable vt-x in kernel configuration

Kernel patches:

- add unrestricted guest support
- avoid kernel boot failure when vt-x is not available
- avoid nullpointer in kernel when vcpu is not fully setup
- avoid vcpu scheduling bug which causes starvation on same/below prio level
- save efer register correctly from guest
2019-04-01 19:33:52 +02:00
Alexander Boettcher
b75307b070 foc/x86: implement vm_session interface
Issue #3111
2019-04-01 19:33:51 +02:00
Alexander Boettcher
ae31b761f4 hw: move vmm.run to vmm_arm.run
Issue #3111
2019-04-01 19:33:51 +02:00
Alexander Boettcher
f927684eb8 os: add vmm_x86 interface test
Issue #3111
2019-04-01 19:33:51 +02:00
Stefan Kalkowski
8f28f884ee hw: name vm_state header explicitely
Ref #3251
2019-04-01 19:33:49 +02:00
Norman Feske
a67b23eb2d test.run: handle '*' wildcards 2019-04-01 19:33:48 +02:00
Alexander Boettcher
c3fd572a52 init: add report/buffer attribute to xsd
Issue #3216
2019-04-01 19:33:48 +02:00
Martin Stein
bcc049ceeb nic_router: manipulate port-forwarding port
The new configuration attributes <tcp-forward to_port="123" /> and
<udp-forward to_port="123" /> enable manipulating the destination port of
port-forwarded packets.

Fixes #3237
2019-04-01 19:33:48 +02:00
Martin Stein
3a59f11708 nic_router/nic_bridge: free MAC addresses
Free a MAC address of a session as soon as the session gets destructed.
Adds also according tests to the autopilot list.

Fixes #2470
2019-04-01 19:33:48 +02:00
800b4e44b1 Reduce Vfs::Vfs_handle::Context to empty struct type
The "Vfs::Vfs_handle" type should not contain any public members that
can be initialized by the VFS internally and by the application, so
remove inheritance from the "Genode::list::Element" class. The VFS
plugins must instead use lists of "Vfs::Vfs_handle" sub-classes, the
lifetime of which are always managed by the plugin.

Ref #3036
2019-04-01 19:33:47 +02:00
Pirmin Duss
8456ffa231 bomb: prevent Timer-session creation errors
Fix #3212
2019-04-01 19:33:46 +02:00
Christian Helmuth
ebe71a12ed depot: update recipe hashes 2019-03-19 11:12:36 +01:00
Norman Feske
4353c9e0f1 os: make Block::Request_stream::Ack noncopyable
This is a safeguard against accidentally taking the 'Ack' interface as a
value instead of a reference.

The 'Payload' interface should also not be copied (and potentially
stored) because it contains a pointer.
2019-03-19 11:00:01 +01:00
Norman Feske
4f99224255 ram_fs: increase max file size on 64 bit to 8 GiB
Fixes #2315
2019-03-18 15:57:00 +01:00