Commit Graph

157 Commits

Author SHA1 Message Date
Alexander Boettcher
e3e41e5ca0 ahci: avoid deprecated warnings
Issue #1987
2017-05-02 15:29:03 +02:00
Norman Feske
60cda87b5c init.run: add missing build of report_rom 2017-05-02 15:29:02 +02:00
Christian Helmuth
707f66e9a5 ahci: remove disk image after test 2017-03-24 16:20:02 +01:00
Christian Helmuth
d3884c67ad sd_card: remove disk image after test 2017-03-24 16:20:01 +01:00
Christian Helmuth
9fb175e236 fb_bench: adjust RAM quota for large frame buffers 2017-03-24 16:20:00 +01:00
Norman Feske
8d68d3d8ac Adapt resource-request test to changes of init
The test used to rely on init's formerly built-in policy of answering
resource requests with slack memory, if available. Since init no longer
responds to resource requests in an autonomous way, we use a dynamically
configured sub-init instance as runtime for the test. This instance, in
turn, is monitored and controlled such that resource requests are
result in quota upgrades. The monitoring component is implemented in
the same test-resource_request program as the test. Both roles are
distinguished by the "role" config attribute.

This is a follow-up to "init: explicit response to resource requests".
2017-03-24 16:20:00 +01:00
Norman Feske
8ab8e65fb5 input_filter.run: avoid runtime resource request
This is a follow-up to "init: explicit response to resource requests".
2017-03-24 16:20:00 +01:00
Norman Feske
7813c3be8f init.run: tweak timings for Qemu 2017-03-24 16:19:58 +01:00
Norman Feske
1fde4d638c init: service forwarding
This patch equips init with the ability to act as a server that forwards
session requests to its children. Session requests can be routed
depending of the requested service type and the session label
originating from init's parent.

The feature is configured by one or multiple <service> nodes hosted in
init's <config> node. The routing policy is selected by via the regular
server-side policy-selection mechanism, for example:

<config>
  ...
  <service name="LOG">
    <policy label="noux">
      <child name="terminal_log" label="important"/>
    </policy>
    <default-policy> <child name="nitlog"/> </default-policy>
  </service>
  ...
</config>

Each policy node must have a <child> sub node, which denotes name of the
server with the 'name' attribute. The optional 'label' attribute defines
the session label presented to the server, analogous to how the
rewriting of session labels works in session routes. If not specified,
the client-provided label is presented to the server as is.

Fixes #2247
2017-03-24 16:19:57 +01:00
Norman Feske
1489791d5e init: explicit response to resource requests
This patch removes the formerly built-in policy of responding to
resource requests with handing out slack quota. Instead, resource
requests have to be answered by an update of the init configuration with
adjusted quota values.

Note that this patch may break run scripts that depend on init's
original policy. Those run scripts may be adjusted by increasing the
quota for the components that use to inflate their RAM usage during
runtime such that the specified quota suffices for the entire lifetime
of the component.
2017-03-24 16:19:57 +01:00
Norman Feske
06943f413d init: respond to RAM-quota changes in config
This patch improves init's dynamic reconfigurability with respect to
adjustments of the RAM quota assigned to the children.

If the RAM quota is decreased, init withdraws as much quota from the
child's RAM session as possible. If the child's RAM session does not
have enough available quota, a resource-yield request is issued to
the child. Cooparative children may respond to such a request by
releasing memory.

If the RAM quota is increased, the child's RAM session is upgraded.
If the configuration exceeds init's available RAM, init re-attempts
the upgrade whenever new slack memory becomes available (e.g., by
disappearing other children).
2017-03-24 16:19:57 +01:00
Norman Feske
9dca1503a8 init: apply changes of <provides> nodes
This patch enables init to apply changes of any server's <provides>
declarations in a differential way. Servers can in principle be extended
by new services without re-starting them. Of course, changes of the
<provides> declarations may affect clients or would-be clients as this
information is taken into account for the session routing.
2017-03-24 16:19:56 +01:00
Norman Feske
8d4fb288d9 init: add version attribute to start nodes
The optional 'version' attribute allows for the forced restart of a
child with an otherwise unmodified start node. The specified value is
also reflected in the state report.
2017-03-24 16:19:56 +01:00
Norman Feske
fcf25c22d1 init: respond to binary-name changes
This patch covers the resolution of the ROM route for child binaries
via the generic label-rewriting mechanics. Now, the <binary> node has
become merely sytactic sugar for a route like the following:

<start name="test"/>
  <route>
    <service name="ROM" unscoped_label="test">
      <parent label="test-binary-name"/> </service>
      ...
  </route>
  ...
</start>

A change of the binary name has an effect on the child's ROM route to
the binary and thereby implicitly triggers a child restart due to the
existing re-validation of the routing.
2017-03-24 16:19:55 +01:00
Christian Helmuth
8ca6009c09 fb_bench: disable autopilot run on linux 2017-03-15 12:32:27 +01:00
Christian Helmuth
b9834bc388 Rename Linux audio driver to linux_audio_drv
Related to #2190
Fixes #2278
2017-03-15 12:32:27 +01:00
Stefan Kalkowski
4a30c13c2d os: synchronize thread destruction of trace test
* Increase test-thread count to trigger quota exceeding on all platforms
* Synchronize test-thread destruction, otherwise an half-destructed thread
  object can lead to an error message of the thread to be destructed,
  which causes a deadlock, when the destructed thread still holds the log lock
* Limit SMP settings for QEMU to x86 (Ref #2307)
2017-03-15 12:32:25 +01:00
Martin Stein
9834f0cf1e cpu_quota.run: raise test timeout
Previously it worked on Panda only because the timer driver was too
fast.

Ref #2308
2017-03-15 12:32:25 +01:00
Alexander Boettcher
451c08ac01 os: app showing top style CPU utilization via LOG
Fixes #2307
2017-03-15 12:32:25 +01:00
Norman Feske
245cfd8571 input_filter.run: omit char-repeat test on Qemu
Apparently, the character-repeat test is too timing-sensitive to run
reliably on Qemu.
2017-03-15 12:32:24 +01:00
Martin Stein
b05b5616c8 x86 cpu_quota: lower error tolerance
Previously, on X86, the timer driver used the PIT with a maximum timeout
of 54 ms.  Thus, the driver frequently interrupted the counters with
highest priority to update the timer. This is why we needed a higher
error tolerance as for ARM where the driver, once configured, can sleep
for the whole test timeout. Now, we use the kernel timer and the problem
seems to be exits no longer.

Ref #2304
2017-03-15 12:24:44 +01:00
Martin Stein
574a1bd198 test/cpu_quota: tolerate errors in session quota
Previously we pre-calculated the translation errors for the session
quota to make a discret check in the test. But since the order, in which
init childs get their CPU quota isn't always the same anymore (we should
have never made assumptions about that) the translation errors differ
from trial to trial. However, the errors are below 0.01% of the super
period. We now tolerate them in the run script.

Ref #2304
2017-03-15 12:24:44 +01:00
Norman Feske
23ad546a88 init: make RAM preservation configurable
This patch improves the accuracy of init's quota-saturation feature
(handing out all slack quota to a child by specifying an overly high RAM
quota for the child) and makes the RAM preserved by init configurable.
The preservation is specified as follows:

! <config>
!   ...
!   <resource name="RAM" preserve="1M"/>
!   ...
! </config>

If not specified, init has a reasonable default of 160K (on 32 bit) and
320K (on 64 bit).
2017-02-28 12:59:30 +01:00
Norman Feske
70548959b7 os: fix session routes in rom_to_file.run 2017-02-28 12:59:28 +01:00
Norman Feske
150c286f0e init: dynamic configuration
This patch lets init apply configuration changes to a running scenario
in a differential way. Children are restarted if any of their session
routes change, new children can be added to a running scenario, or
children can deliberately be removed.

Furthermore, the new version of init is able to propagate configuration
changes (modifications of <config> nodes) to its children without
restarting them.
2017-02-28 12:59:26 +01:00
Norman Feske
9cba459958 base: remove Child::heap
This patch improves the accounting for the backing store of
session-state meta data. Originally, the session state used to be
allocated by a child-local heap partition fed from the child's RAM
session. However, whereas this approach was somehow practical from a
runtime's (parent's) point of view, the child component could not count
on the quota in its own RAM session. I.e., if the Child::heap grew at
the parent side, the child's RAM session would magically diminish. This
caused two problems. First, it violates assumptions of components like
init that carefully manage their RAM resources (and giving most of them
away their children). Second, if a child transfers most of its RAM
session quota to another RAM session (like init does), the child's RAM
session may actually not allow the parent's heap to grow, which is a
very difficult error condition to deal with.

In the new version, there is no Child::heap anymore. Instead, session
states are allocated from the runtime's RAM session. In order to let
children pay for these costs, the parent withdraws the local session
costs from the session quota donated from the child when the child
initiates a new session. Hence, in principle, all components on the
route of the session request take a small bite from the session quota to
pay for their local book keeping

Consequently, the session quota that ends up at the server may become
depleted more or less, depending on the route. In the case where the
remaining quota is insufficient for the server, the server responds with
'QUOTA_EXCEEDED'. Since this behavior must generally be expected, this
patch equips the client-side 'Env::session' implementation with the
ability to re-issue session requests with successively growing quota
donations.

For several of core's services (ROM, IO_MEM, IRQ), the default session
quota has now increased by 2 KiB, which should suffice for session
requests to up to 3 hops as is the common case for most run scripts. For
longer routes, the retry mechanism as described above comes into effect.
For the time being, we give a warning whenever the server-side quota
check triggers the retry mechanism. The warning may eventually be
removed at a later stage.
2017-02-28 12:59:23 +01:00
Norman Feske
641fb08b5f Automated test for init 2017-02-28 12:59:23 +01:00
Norman Feske
2ce87216bc os: input_filter implementation and test
The input_filter is the successor of the input_merger. In addition to
merging input streams, the component applies several forms of input
transformations such as the application of keyboard layouts.

Issue #2264
2017-02-27 15:37:49 +01:00
Martin Stein
ed370a8f5c Introduce gpio_drv function in run scripts
Do not use automatic alias in the run tool for the name of the
gpio-driver binary.

Ref #2268
2017-02-23 14:54:50 +01:00
Martin Stein
c2e6fd9392 fb_bench: do not test on i.MX53 + Fiasco.OC
The i.MX53 Framebuffer driver doesn't come up on on Fiasco.OC because the Platform
driver isn't allowed to access essential devises like the SRC or the Fuses. This is
most likely due to the kernel not configuring the CSU appropriately.

Ref #2268
2017-02-23 14:54:45 +01:00
Christian Helmuth
15957a2d3d Adapt nitpicker config to xray_trigger changes 2017-02-23 14:54:43 +01:00
Martin Stein
102676b1c1 fb_bench: do not test on zynq
There is currently no FB driver for zynq.

Ref #2268
2017-02-07 11:12:29 +01:00
Josef Söntgen
e5d6c06f58 Rework trace test and add to autopilot
Issue #2260
2017-02-07 11:12:26 +01:00
Martin Stein
223cc06341 fb_bench: start QEMU with -nographic
Enables us to test on our machines without SDL and X.

Ref #2268
2017-02-07 11:12:26 +01:00
Martin Stein
066a5e9670 fb_bench: mark wand_quad as not supported
We do not have a framebuffer driver on Wandboard yet.

Ref #2268
2017-02-07 11:12:26 +01:00
Martin Stein
ae91ca012e fb_bench: correct "platform not supported" message
Ref #2268
2017-02-07 11:12:25 +01:00
Martin Stein
77e266d1ff fb_bench: add gpio driver when supported
Ref #2268
2017-02-07 11:12:25 +01:00
Martin Stein
b4600bfc99 sd_card_bench: exclude foc+imx_53 and odroid_xu
On Odroid XU the SD card driver comes up and finds a card but for card
access it seems that we would need a platform driver like on Arndale.

On imx_53, the first SDHCI MMIO access faults. This is likely due to the
AIPSTZ memory bridge. On HW, we initialize the AIPSTZ in the kernel, but
when I tried doing that in the platform driver instead, the first AIPSTZ
MMIO access faults ^^ So I gave up for now and removed support.

Fixes #2259
2017-01-31 12:01:17 +01:00
Martin Stein
e36368735b input.run: add missing routing rules
Ref #1987
2017-01-31 12:01:17 +01:00
Martin Stein
ed62199957 test/reconstructible: move to base
The test uses only stuff from the base repo.

Ref #1987
2017-01-31 12:01:15 +01:00
Martin Stein
d1134644cc test/synced_interface: move to base
The test uses only stuff from the base repo.

Ref #1987
2017-01-31 12:01:15 +01:00
Martin Stein
ad2d1fe586 os/test: transition to new base API
For all tests
* use Component::construct instead of main
* use new connection constructors with env argument
* use log instead of printf

For some tests
* replace signal receivers with signal handlers
* replace global static variables with Main class members
* remove unnecessary multithreading
* model test steps as classes that are independent from each other and managed
  by Main as constructibles
* use references instead of pointers and exceptions instead of error codes
* use Attached_* helpers intead of doing attach/detach manually
* use helpers like String, Id_space, Registry instead of arrays and lists
* make the run script suitable for automated execution and conclusion

Ref #1987
2017-01-31 12:01:15 +01:00
Martin Stein
71525443c5 timer_accuracy: generalize, automate, new base API
The old version was running with base-linux only and there was no
run script that provided automated execution and evaluation.

Ref #1987
2017-01-31 12:01:15 +01:00
Martin Stein
a9f4baf674 test/config_args: remove
The main function with string arguments is deprecated and so is this test.

Ref #1987
2017-01-31 12:01:14 +01:00
Norman Feske
47a129c6af run/platform_drv.inc: add 'need_usb_hid' function
This function returns the information whether the used platform relies
on USB HID for interactive scenarios by default as is the case for most
ARM platforms. In contrast, for x86 the USB driver can be omitted because
we can use the PS/2 driver (that is readily available in repos/os/).
2017-01-31 12:01:12 +01:00
Martin Stein
c9f7e9dbb2 tz_vmm: update to new API and clean up
* get rid of printf
* use exceptions instead of error codes
* use Id_space instead of the individual block device registry
* use Cstring instead of char const*
* move method definitions > 1 line to .cc files
* rename Block Block_driver and Serial Serial_driver to avoid name clashes
  with the Genode namespace and thereby simplify the code
* use lambdas for Block device lookup and apply
* switch to the Component framework
* don't use env(), config(), ... and hand over env to each connection
* use Attached_mmio and Attached_rom/ram_dataspace instead of manual
  solutions

Fixes #2223
2017-01-31 12:01:11 +01:00
Norman Feske
02d5efcf3f init: apply routing to environment sessions
The init component used to create the CPU/RAM/PD/ROM sessions (the child
environment) for its children by issuing session requests to its parent,
which is typically core. This policy was hard-wired. This patch enables
the routing of the environment sessions of the children of init
according to the configured routing policy.

Because there is no hard-wired policy regarding the environment sessions
anymore, routes to respective services must be explicitly declared in
the init configuration. For this reason, the patch adjusts several run
scripts in this respect.

This patch removes the outdated '<if-args>' special handling of session
labels. The '<if-args>' feature will eventually be removed completely
(ref #2250)

Issue #2197
Issue #2215
Issue #2233
Issue #2250
2017-01-31 12:01:11 +01:00
Emery Hemingway
18504b4801 merge lib/config_args with lib/posix
Merging the config_args library with the POSIX library supplies
'argc' and 'argv' arguments to components using a 'main' entry.

Fix #2218
Ref #1987
2017-01-20 16:46:55 +01:00
Norman Feske
28d497549c report_rom/clipboard: API transition
Issue #1987
2017-01-13 13:07:14 +01:00
Norman Feske
5f25718e8c test/xml_node: API transition
Issue #1987
2017-01-13 13:07:13 +01:00