Commit Graph

10953 Commits

Author SHA1 Message Date
Christian Helmuth
c56ac3e909 nova: support extended addresses in FADT
Issue alex-ab/nova#5
2022-04-13 08:07:58 +02:00
Martin Stein
50fc2aa251 black_hole: provide Gpu service
Ref #4419
2022-04-13 08:07:58 +02:00
Martin Stein
046ebc3d34 black_hole: provide ROM service
Ref #4419
2022-04-13 08:07:58 +02:00
Norman Feske
bb26a986e6 sculpt: add trace_logger as optional launcher
This patch adds the trace-logger utility to the default set of packages
along with an optional launcher. With this change, only two steps are
needed to use Genode's tracing mechanism with Sculpt:

- Add 'trace_logger' to the 'launcher:' list of the .sculpt file

- Either manually select the 'trace_logger' from the '+' menu,
  or add the following entry to the deploy configuration:

    <start name="trace_logger"/>

By default, the trace logger is configured to trace all threads
executed in the runtime subsystem and to print a report every 10
seconds. This default policy can be refined in the launcher's <config>
node. Note that the trace logger does not respond to configuration
changes during runtime. Changes come into effect not before restarting
the component.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
3394f97f86 trace_logger: make output format more concise
This patch changes the output format of the trace logger to become
better suitable for human consumption. For example, when instrumenting
the VFS server in Sculpt using the GENODE_TRACE_TSC utility, the
trace logger now generates tabular output as follows.

  Report 4

  PD "init -> runtime -> arch_vbox6 -> vbox -> " ----------------
   Thread "vCPU"           at (0,0)  total:12909024 recent:989229
   Thread "vCPU"           at (1,0)  total:5643234  recent:786437

  PD "init -> runtime -> ahci-0.fs" -----------------------------
   Thread "ahci-0.fs"      at (0,0)  total:910497   recent:6335
   Thread "ep"             at (0,0)  total:0        recent:0
    71919692932: TSC process_packets: 8005M (4998 calls, last 4932K)
    71921558516: TSC process_packets: 8006M (4999 calls, last 1596K)
    71922760220: TSC process_packets: 8007M (5000 calls, last 1006K)
    71929853586: TSC process_packets: 8009M (5001 calls, last 1840K)
    71931315246: TSC process_packets: 8011M (5002 calls, last 1253K)
    72127999920: TSC process_packets: 8016M (5003 calls, last 5606K)
    72129568198: TSC process_packets: 8018M (5004 calls, last 1345K)
    77161908178: TSC process_packets: 8029M (5005 calls, last 11349K)
    77643225736: TSC process_packets: 8029M (5006 calls, last 217K)
    89422100594: TSC process_packets: 8035M (5007 calls, last 5656K)
    89422123632: TSC process_packets: 8035M (5008 calls, last 1342)
   Thread "signal handler" at (0,0)  total:36329    recent:3001
   Thread "signal_proxy"   at (0,0)  total:51838    recent:13099
   Thread "pdaemon"        at (0,0)  total:97184    recent:332
   Thread "vdrain"         at (0,0)  total:1266     recent:286
   Thread "vrele"          at (0,0)  total:1904     recent:516

  PD "init -> runtime -> nic_drv" -------------------------------
   Thread "nic_drv"        at (0,0)  total:34044    recent:897
   Thread "signal handler" at (0,0)  total:369      recent:142

  ...

Subjects that belong to the same PD are grouped together. The formerly
optional affinity and activity options have been removed. Those
information are now unconditionally displayed. The trace entries
belonging to a thread appear as slightly indented.

The patch also updates the coding style, avoiding excessively long
lines.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
f7270c44cb trace_logger: omit inactive subjects by default
This patch reduces repetitive log output by omitting inactive trace
subjects from the log output. The information about all subjects can
still be dumped by setting 'verbose="yes"'.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
ceb91732bf trace_logger: update state after adding subjects
This patch splits the creation and updating of monitor objects into two
stages. The creation of a monitor object changes the state of the
associated trace subject. The patch ensures that the new state is
captured by the update of the monitor object.

Issue #4448
2022-04-13 08:07:58 +02:00
Norman Feske
be0a1742ac base: distinct TRACED from ATTACHED trace subjects
This patch makes the trace-subject state as reflected to the trace
monitor more accurate.

Until now, a subject could be in UNTRACED or TRACED state. In reality,
however, there exists an intermediate state after the trace monitor
called 'trace' for the subject but before the subject locally activated
the tracing (done when passing a trace point). This intermediate state
was reflected as UNTRACED. Consequently, threads that never pass a trace
point (e.g., just waiting for I/O) would remain to appear as UNTRACED
even after enabling its tracing by the trace monitor. This is confusing.

This patch replaces the former UNTRACED and TRACED states by three
distinct states:

  UNATTACHED  prior any call of 'trace'
  ATTACHED    after a trace monitor called 'trace'
              but before the tracing is active
  TRACE       tracing is active

Fixes #4447
2022-04-13 08:07:58 +02:00
Norman Feske
f3984ba5a9 base: declare build artifact for core
This is a generalization of the recent commit "base-hw: declare build
artifact for core".
2022-04-13 08:07:58 +02:00
Norman Feske
34a3209e9b base/log.h: add GENODE_TRACE_TSC
The new macros GENODE_TRACE_TSC and GENODE_TRACE_TSC_NAMED complement
the existing GENODE_LOG_TSC and GENODE_LOG_TSC_NAMED macros to simplify
TSC measurements at a low overhead of the trace mechanism.
2022-04-13 08:07:57 +02:00
Norman Feske
232a45bc14 os: add util/formatted_output.h utilities
The utilities of the new util/formatted_output.h header complement the
existing base/output.h with the text-formatting support needed to
produce tabular output.

Fixes #4449
2022-04-13 08:07:57 +02:00
Norman Feske
a5c9830706 Minor doc fixes in the release notes 2022-04-13 08:07:57 +02:00
Christian Helmuth
bde3be787e qemu-usb: fix device endpoint update
First, the endpoint update has to comply with the current alternate
settings of all interface, which are stored in USBDevice::altsetting[]
(one value per interface). Second, a SET_INTERFACE control request via
Packet_type::ALT_SETTING must update USBDevice::altsetting for the
interface.

Now, USB devices with multi-setting interface like the Joulescope JS110
with mixed bulk/isochronous endpoints are supported.
2022-04-13 08:07:57 +02:00
Christian Helmuth
49efff1fef Remove tool/create_sdk
Fixes #4446
2022-04-13 08:07:57 +02:00
Christian Helmuth
c5f9e61d3a driver_manager: adapt config attributes for usb_host 2022-04-13 08:07:57 +02:00
Norman Feske
26acd6c65a sculpt: suppress non-critical warning 2022-04-13 08:07:57 +02:00
Norman Feske
33c71d1d2c usb_host: change error to warning message
An insufficient session quota as offered by a USB client is not an
erroneous situation of the USB driver.
2022-04-13 08:07:57 +02:00
Norman Feske
b4aa0a20dd os: refine default USB session quota
This commit adjusts the value such that USB sessions requested by
VirtualBox6 on Sculpt OS can get established on the first try without
invoking the session-retry mechanism. This reduces the number of
diagnostic log messages like:

 Error: Insufficient 'ram_quota',got 6296372 need 6297928
2022-04-13 08:07:57 +02:00
Norman Feske
fa5f8dbd55 sculpt: reduce NIC driver CPU quota
The value of 50% as assigned by commit "sculpt: add basic support for
i.MX8 Quad EVK" leaves too little room for other components of the
runtime subsystem. With the adjustements of commit "sculpt: assign CPU
quotas" the sum exeedcs 100%. Hence this commit tunes down the value to
sensible 10%.
2022-04-13 08:07:57 +02:00
Norman Feske
a9022d8451 sandbox: improve CPU-quota accounting
The existing assignment of CPU quotas did not anticipate the dynamic
reconfiguration of init. It merely tracked the available CPU quota by
deducing the consumed amount from a global variable but never
replenished the value. This worked for static scenarios but failed in
situations where components are dynamically re-started.

So far this deficiency remained detected because CPU quotas were not
used in highly dynamic systems like Sculpt OS. However, this has
recently changed by commit "sculpt: assign CPU quotas".

The patch improves the accounting by mirroring the existing handling of
RAM and cap quotas. Note that the CPU-quota accounting is still rather
limited. In particular the dynamic rebalancing is not yet supported.

Issue #4445
2022-04-13 08:07:57 +02:00
Christian Helmuth
d182b20705 build: ensure rules with pipes might fail
.SHELLFLAGS is extended by option pipefail to make pipes fail if any pipe
element fails. As .SHELLFLAGS is exported into sub-make instances it
must be unexported before calling third-party build systems recursively.
2022-03-21 13:43:13 +01:00
Christian Helmuth
7da691b52a pc/usb: defer startup until config is available
The commit also adds lx_kit/initial_config.h as utility.
2022-03-21 13:42:17 +01:00
Norman Feske
e3706837b9 VFS server: foster batching of acknowledgements
With the consolidation of the file-system session's signal handlers
implemented by commit "file_system_session: merge ack and submit sigh",
we can now change the VFS server to produce batches of acknowledgements
before explicitly waking up the client. (in contrast to the traditional
'acknowledge_packet', the new 'try_ack_packet' triggers no signal)

Issue #4388
2022-03-21 13:42:17 +01:00
Johannes Schlatow
f4d0f1624a test/trace: use for_each_new_entry
genodelabs/genode#4434
2022-03-21 13:42:17 +01:00
Johannes Schlatow
c763890f04 trace_buffer: partition trace buffer
Split the trace buffer into two partitions in order to prevent overwriting
of entries when the consumer is too slow. See file comment in buffer.h.

genodelabs/genode#4434
2022-03-21 13:42:16 +01:00
Johannes Schlatow
edc46d15f8 trace_buffer: revise trace buffer implementation
This commit simplifies the current implementation by overloading the
length field with a padding indicator in addition to the zero-length
head entry. This simplifies the iteration semantics as it eliminates
the need for determining whether a zero-length entries is the actual
head of the buffer or a padding at the buffer end.

genodelabs/genode#4434
2022-03-09 12:08:02 +01:00
Johannes Schlatow
d24552f5e2 trace/policy: fix event size in log_output
Returning 0 for max_event_size() can lead to writing out of buffer bounds.

Fixes genodelabs/genode#4435
2022-03-09 12:04:44 +01:00
Stefan Kalkowski
e95f0a409d lx_emul: add implementation for Genode's USB C-API
Fix #4444
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
9713014130 dde_linux: add virt_linux lx_emul flavor
To support device-less protocol-stacks only ports, we can use a
Virt I/O Linux kernel flavor, and export the lx_kit/lx_emul parts
not depending on platform API and devices.

Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
35cf8aada4 lx_emul(x86): fill zero page with zeroes
Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
13c4abf4ad lx_emul: add static_cpu_has macro to shadow header
Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
0fa695dbd7 lx_kit/lx_emul: make memory backend configureable
* Drivers have to use lx_kit/memory_dma.cc
* Protocol-stacks use lx_kit/memory_non_dma.cc
* Moreover the device-dependent lx_emul parts get removed
  from the common lx_emul import rules

Fix #4443
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
d473bed4b7 platform api: export dma buffer capability
Ref #4443
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
5c71a8d74d lx_emul: extract common lx_emul import makefile
Fix #4442
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
b80146a6f7 genode_c_api: unify shared dataspace callbacks
* Unifies the declaration of callbacks which manage driver/client
  shared dataspaces
* Move the Linux driver-specific callback implementation to the
  lx_emul library from the PC's USB host driver

Fix genodelabs/genode#4439
2022-03-09 10:55:16 +01:00
Norman Feske
b1e2e654a9 sculpt: support uplink and event service providers
This patch enhances Sculpt with the ability to route uplink and event
sessions to the optional black-hole component.

Issue #4419
2022-03-08 15:48:53 +01:00
Christian Helmuth
a941dfe7b2 gpt_write: adapt to changed packet stream blocking semantics
Issue #4390
2022-03-08 15:37:04 +01:00
Robin Eklind
1142ef91df base-linux: fix build (BOARD=pc)
Fix a few build errors related to required type conversions
and handling of references.

Fixes #4440
Fixes #4441
2022-03-08 14:23:28 +01:00
Norman Feske
4056fb9127 pc/usb: fix ret value of handle_altsetting_request
The logic got accidentally reversed during the transition from the
legacy USB driver.

Since the function drops error details, this patch adds a diagnostic
message with the error code as returned by the Linux driver.
2022-03-08 12:46:11 +01:00
Norman Feske
0325be0827 virtualbox6: service lib target has no artifacts
This patch declares that the pseudo target virtualbox6/services/ does
not produce any build artifact. This allows the adding of virtualbox6
to Sculpt's 'build:' list.
2022-03-08 10:51:19 +01:00
Christian Helmuth
29e6537939 pc: fix dependency to generated crc32table.h 2022-03-07 16:43:12 +01:00
Stefan Kalkowski
600997d8d6 usb_hid_raw: don't use deprecated qemu option
* Use -device instead of deprecated -usbdevice
* Use the same xhci model as in usb_hid_reconnect
2022-03-07 16:43:12 +01:00
Josef Söntgen
67f797abf2 pc: enable UHCI driver in usb_host
Fix genodelabs/genode#4438
2022-03-07 16:43:12 +01:00
Stefan Kalkowski
2a35c8f9e7 lx_emul: add page macros to x86 shadow headers
* Add page_to_phys and dummy macro for pgprot_device

Original commit provided by Josef Soentgen

Ref genodelabs/genode#4438
2022-03-07 16:43:12 +01:00
Josef Söntgen
2760b67902 lx_kit/lx_emul: add I/O port support
Ref genodelabs/genode#4438
2022-03-07 16:43:12 +01:00
Stefan Kalkowski
57aab46fc3 platform: introduce I/O ports in API
* Introduces Platform::Device::Io_port client utility
* Implements I/O ports as common device resources in platform driver

Fix genodelabs/genode#4436
2022-03-07 16:42:56 +01:00
Stefan Kalkowski
8a4cbe3cc9 io_port_session: make default ram quota explicit
Ref genodelabs/genode#4436
2022-03-02 15:04:18 +01:00
Roland Bär
d45b60ceeb sntp_client.run: redundant aritfacts in image build
The run script uses core, ld.lib.so, and init from depot packages, thus
these cannot be integrated in the image explicitly from the build
directory.

Also, removed special build of report_rom, which is not subject of the
test.

Fixes #4437
2022-03-02 07:56:20 +01:00
Christian Helmuth
4591d501b4 version: 22.02 2022-02-28 15:47:43 +01:00
Norman Feske
36957cb4d3 News item for version 22.02 2022-02-28 15:43:17 +01:00