Commit Graph

266 Commits

Author SHA1 Message Date
Stefan Kalkowski
1d12755401 depot: add i2c api package
Fixes #4180
2021-05-28 14:16:46 +02:00
Stefan Kalkowski
f2ac341003 depot: add architectural content to os api package
Fixes #4179
2021-05-28 14:16:45 +02:00
Christian Helmuth
62f83b7198 linux_nic_drv: optionally report MAC address
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
464f0eaf8b linux_nic_drv: remove nic_server mode
Issue #4133
2021-05-28 14:16:45 +02:00
Alexander Boettcher
f9c7947c45 drivers_interactive-pc: use usb host/hid driver
Issue #4173
2021-05-28 14:16:45 +02:00
Christian Helmuth
777923f9bd depot: update recipe hashes 2021-05-10 11:18:12 +02:00
Norman Feske
516a9a6925 depot: update recipe hashes 2021-05-05 11:35:31 +02:00
Stefan Kalkowski
421d2bed40 platform driver: make device info XML optional
* The device XML information dataspace is only provided,
  when the client's policy states `info="yes"`
* The device XM information gets changed to include the
  physical resource names (I/O memory and IRQ addresses)
  instead of virtual ids and page offset

Fix #4077
2021-05-05 11:31:16 +02:00
Norman Feske
5ac3c335dc Remove pkg/test-dynamic_config_slave
Issue #3754
2021-05-05 11:21:43 +02:00
Norman Feske
e8b97ad684 test/resource_yield: don't use os/slave.h
Issue #3754
2021-05-05 11:21:43 +02:00
Norman Feske
efbed6f7bf depot: update recipe hashes 2021-04-20 12:10:58 +02:00
Norman Feske
dc8c899c1d Streamline platform-device API on ARM
This API rework eases the access to memory-mapped I/O registers and
interrupts when using the platform driver. It introduces the notions of

- Platform::Device       - one device obtained from a platform session
- Platform::Device::Mmio - locally-mapped MMIO registers of a device
- Platform::Device::Irq  - interface for receiving device interrupts

The patch touches several drivers. Some drivers would require a
significant structural change to adopt the new API (e.g., net/virtio,
dde_linux drivers, imx gpio). In these cases, the patch adds
compatibility shims meant to be temporary. In other cases (e.g., imx
i2c), the adaptation was simple enough to carry through.

Fixes #4075
2021-04-20 12:10:58 +02:00
Stefan Kalkowski
d1cf9c86b8 os: introduce device type in platform driver
* Move "compatible" property value to "type" attribute
* Turn device_by_property helper in Platform::Connection into device_by_type

Fix #4074
2021-04-20 12:10:58 +02:00
Norman Feske
b661459aca sandbox/init: parse config using 'List_model'
This commit replaces the hand-crafted config processing by the use of
the 'List_model' utility. This has the following advantages:

- The parsing follows a common formalism that makes the code
  easier to maintain and to understand. Several parts of the code
  had to be changed (for the better) to make it fit the list model
  approach. E.g., the child states have become more expressive
  and logical.

- In the common case, the XML data is traversed only once, which
  increases the parsing speed in dynamic scenarios.

- The code becomes easier to optimize. In particular, the patch skips
  the re-evaluation of the session routing if no service is affected
  by the config change.

The patch also revisits the init test by removing overly long sleep
phases and extending a few sleep phases that were too short when
executing the test on Qemu.

Issue #4068
2021-04-20 12:03:04 +02:00
Norman Feske
ca50a41d28 depot: update recipe hashes 2021-03-23 11:28:53 +01:00
Norman Feske
d2fc834bfa os: depot recipe for pkg/test-capture
This package allows for experimenting with the capture-session
interface.
2021-03-18 17:36:35 +01:00
Norman Feske
5c5b56d1e0 depot: update recipe hashes 2021-03-12 12:08:24 +01:00
Norman Feske
7e7c10e66c Add sandbox test to depot autopilot
Issue #4044
2021-03-12 12:01:39 +01:00
Norman Feske
935bb36fe4 base: fix child destruction while close requested
This patch fixes a corner case where a child is destructed while a
asynchronous close request to a sibling server is still pending.

The child immediately discarded the session ID as the end of the
close-session processing, assuming that this ID is never to be needed
again. The session-state continues to exist to handle asynchrous close
protocol with the server.

However, if the child is destructed at this point (before the server
responded to the session request), the destruction of the child would
not cover the discharging of the session state because the session state
was no longer be part of the client's ID space. So once the asynchronous
close response from the server came in, the session state contained
stale information, in particular a stale closed_callback pointer.

The patch fixes the problem by deferring the discarding of the client ID
to the point where the session state is actually destructed. So the
session of a pending close response is covered by the child destructor.

Thanks to Pirmin Duss for reporting this issue along with a test
scenario for reproducing it!

Fixes #4039
2021-03-12 12:01:38 +01:00
Norman Feske
c0a7565c21 os: shim helper for safe routing of env sessions
This shim component can be used in case where env sessions of child
(i.e., child's PD session) must be routed to another child of init.

Without the shim, init would directly need to interact with these
sessions and would thereby make itself dependent of the server's
behavior. RPC calls to a server hosted as a child lead to all kinds of
problems such as livelock situations, and putting the robustness of init
at the whim of its child.

With the shim, init merely needs to bootstrap the shim component by
routing the shim's env sessions to core as usual. The server is only
used for the sessions for the actual application hosted atop the shim.

Issue #3837
Issue #4029
2021-03-12 12:01:37 +01:00
Alexander Boettcher
7af276ac81 cpu_balancer: add support to provide PD service
Issue #3837
2021-03-12 12:01:37 +01:00
Stefan Kalkowski
10b56afff0 rtc_drv: add dummy driver
* Add dummy driver implementation and depot package
* Extend configuration to allow setting an initial RTC value

Fix #4033
2021-03-12 12:01:36 +01:00
Norman Feske
64165d829e depot: update recipe hashes 2021-02-23 12:07:18 +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
Martin Stein
ef88d05f2b os: api/net archive
Ref #3961
2021-02-23 12:02:43 +01:00
Norman Feske
8cc2662aac Remove support for the Muen separation kernel
Fixes #3995
Fixes #3994
2021-02-23 11:55:44 +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
Norman Feske
a981fb864c depot: update recipe hashes 2021-01-25 14:00:43 +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
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
Christian Helmuth
1bef11accf depot: update recipe hashes 2020-12-18 09:10:52 +01:00
Christian Helmuth
f2e0c164c2 depot: update recipe hashes 2020-11-27 09:21:06 +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
Alexander Boettcher
aa7f5bc95f os: add cpu balancer component
Issue #3843
2020-11-27 09:19:08 +01:00
Christian Helmuth
5be1c793a5 depot: update recipe hashes 2020-10-23 14:16:38 +02:00
Christian Helmuth
91f8281618 depot: update recipe hashes 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
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
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
d387eba0ba os: driver recipe for i.MX8 drivers
Includes touch and gpio driver

issue #3900
2020-10-09 13:35:56 +02:00
Christian Helmuth
c59c266afc depot: update recipe hashes 2020-09-17 14:23:14 +02:00
Christian Helmuth
c649307720 depot: update recipe hashes 2020-08-28 08:29:12 +02:00
Norman Feske
7d0cb9620b depot: update recipe hashes 2020-08-25 11:50:41 +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
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
Norman Feske
1aed881313 Remove drivers/gpio/spec directory
Issue #2190
2020-08-25 11:50:09 +02:00