Commit Graph

11773 Commits

Author SHA1 Message Date
Christian Helmuth
9de81369a7 libusb: retry configuration-descriptor retrieval
Some USB devices (e.g., webcams) fail to deliver their configuration
descriptor early after power-up. Testing revealed that retrying the
requests usually succeeds on second or third attempt.

Fixes #4739
2023-01-24 12:18:18 +01:00
Christian Helmuth
da673cfad7 tool/depot: replace wget by curl to support file:// URLs
File-scheme URLs permit users to host downloadable archives (which may
be sync'd by other means beforehand) on the local file system.

Fixes #4737
2023-01-24 12:18:16 +01:00
Christian Helmuth
07d02f8d46 tool/port: access to metadata of ports
Fixes #4685
2023-01-24 12:17:24 +01:00
Alexander Boettcher
4ab52aaf12 acpica: access ACPI IRQ via Platform "acpi" device
Issue #4679
2023-01-24 12:14:29 +01:00
Christian Helmuth
2353082bda pci_decode: report ACPI SCI IRQ in acpi device
Issue #4679
2023-01-24 12:14:23 +01:00
Christian Helmuth
53c2cff331 acpi: report ACPI tables and SCI IRQ
Issue #4679
2023-01-24 12:10:17 +01:00
Alexander Boettcher
661330a97a acpica: add dependency on acpi device
Issue #4679
2023-01-24 12:09:19 +01:00
Alexander Boettcher
dca71dbad9 pci_decode: add acpi device
Use it as point to defer clients (e.g. ACPI-CA) until platform driver could
claim all resources.

Issue #4679
2023-01-24 12:09:16 +01:00
Christian Helmuth
25eac6b9e6 depot: update recipe hashes 2023-01-24 12:07:33 +01:00
Norman Feske
3561ff90e9 sculpt_manager: remove unused Storage::dialog
This member variable remained unused since we moved the storage dialog
into the component graph.
2023-01-24 12:07:33 +01:00
Norman Feske
ffb8321e57 sculpt_test.run: add '-boot d' to Qemu args
When using '--include image/iso', we want to ensure that the virtual
machine boots from CD-ROM.
2023-01-24 12:07:32 +01:00
Christian Prochaska
ff8f7875f3 qt5: make physical screen size info configurable
Fixes #4733
2023-01-24 12:07:32 +01:00
Christian Prochaska
14483f64fd qt5: apply fix for QTBUG-83895
Fixes #4732
2023-01-24 12:07:32 +01:00
Sebastian Sumpf
437fd21ba0 mk: use _file_content instead of echo | cat
Use _file_content function to retrieve port hash instead of 'echo | cat'
construct that lead to 'Broken pipe' erros in GNU Make 4.4.

issue #4725
2023-01-24 12:07:32 +01:00
Tomasz Gajewski
d33139c40a enable ccache for reference Linux kernel
Genode build system allows to easily enable 'ccache' for builds. This
change allows to enable using 'ccache' also for build of reference
Linux kernel used during porting device drivers.

To enable 'ccache' it is enough to pass value of 'CC' variable when
executing Linux build but this build by default depends on time when it
is built which causes 'ccache' misses. To solve this issue additional
flags are passed to make build independent from time, current user and
host on which build is performed.

Issue #4718
2023-01-24 12:07:32 +01:00
Norman Feske
114238c248 sculpt_manager: query presets
This patch queries the files at config/presets/ in addition to
config/launcher using the existing launcher_query component.

Issue #4731
2023-01-24 12:07:32 +01:00
Norman Feske
88becbe29d sculpt: integration of optional presets
With the new 'presets:' tag, .sculpt files can now refer to deploy
configurations to be integrated in the presets/ subdirectory of the
config file system. Those files can thereby be used as preconfigured
system scenarios. Such a preconfigured scenario can be loaded at
runtime by copying the preset file to config/deploy.

Issue #4731
2023-01-24 12:07:32 +01:00
Norman Feske
a7a5c5ce54 run/image/uboot: move uImage to boot/
This patch changes the 'run_image' function to replace a boot/image.elf
file by the corresponding boot/uImage file.

Issue #4730
2023-01-24 12:07:32 +01:00
Alexander Boettcher
c06f5e2661 nova: flush on iommu context change (intel)
Fixes #4717
2023-01-24 12:07:32 +01:00
Alexander Boettcher
41865e6c30 nova: avoid oom fault on cross CPU
Fixes #4719
2023-01-24 12:07:32 +01:00
Alexander Boettcher
5f0ba7d722 intel_fb: handle rapid config change gracefully
In case of very rapid config ROM change (<300ms), the linux driver may still
be in progress of applying the previous change (e.g. switching connector on/off).

During this progress all tasks may become not runnable (waiting for IRQ/timeouts
until hardware state settles), the newest config ROM change/signal gets
dispatched, which lead to continuing the previous change request, but not
to re-starting/re-applying the new config change. To avoid this situation,
explicitly track whether a previous config change was finished and track if an
interim config change request came in. If so, re-start the lx_user
task with the newest config change.

Fixes #4721
2023-01-24 12:07:32 +01:00
Norman Feske
41ebf3bd94 run: remove argument from 'run_image' function
The argument is superfluous because only run/image/uboot evaluated it
anyway, and the argument is always boot/image.elf. With this change, the
official semantics of run_image become: "replace the boot/image.elf file
by platform-specific file(s) at boot/ that can actually be booted".

Issue #4730
2023-01-24 12:07:32 +01:00
Martin Stein
eba22b7551 nic_router: rework updating of TCP/UDP links
* Update links from forward rules only with forward rules and links from
  transport-routing rules only with transport-routing rules. Besides raising
  the performance of the code, this also fixes a former bug that allowed
  forward-rule links to falsely stay active because of a transport-routing
  rule that matched the client destination ip and port.

* Don't use good-case exceptions for updating TCP/UDP links on re-configuration
  of the router.

* Make conditions when to dismiss a forward rule easier to read.
  * Introduces != operator to the public Port class in the net library.

* Fix unnecessary log message that a link was dismissed when only a potentially
  matching forward rule turned out to be not matching.

* Apply Genode coding style to if statements with a single body statement.

Fix #4728
2023-01-24 12:07:31 +01:00
Martin Stein
845694bc44 nic_router: fix updating UDP/TCP links
This fixes a bug that was introduced by this earlier commit:

"nic_router: find forward rules w/o exceptions"

The NIC router used to falsely dissolve TCP/UDP connection states when
reconfiguring although the connection states were still legal according to the
new config. The reason was that the above mention commit nested lambdas but
missed to return from the last nesting level when having found a configuration
that legitimates the connection state.

Ref #4728
2023-01-24 12:07:31 +01:00
Roman Iten
17e4e2497f tool/depot: don't overwrite PATH variable
Issue #4725
2023-01-24 12:07:31 +01:00
Sebastian Sumpf
515854a19f tool/depot: adapt to .NOPARALLEL changes in GNU make 4.4
The semantic of .NOPARALLEL has changed in GNU Make 4.4

Quote:

New feature: .NOTPARALLEL accepts prerequisites If the .NOTPARALLEL
special target has prerequisites then all prerequisites of those targets
will be run serially (as if .WAIT was specified between each
prerequisite).

This means that only prerequisites are made sequential. Before
everything within a Makefile would be done in sequential order.

Therefore, we had to add the *.hash target (appears multiple times) to
the .NOPARALLEL prerequisites.

issue #4725
2023-01-24 12:07:31 +01:00
Norman Feske
d86309957e Road map for 2023 2023-01-24 12:07:31 +01:00
Benjamin Lamowski
641fadb3e9 base-hw: remove memory hole in bootstrap page table
Tests on qemu would fail when started with RAM sizes from 1025MiB to
2048MiB, because the the mapping hole in the page table from 1GiB to
2GiB would interfere with qemu's mapping addresses for ACPI.

Identity-map the complete first 4GiB of memory to catch all early
memory accesses during bootstrap.

Fixes #4724.
2023-01-24 12:07:31 +01:00
Norman Feske
79d8d1d557 sculpt_manager: Deploy::use_as_deploy_template
This patch simplifies the 'Deploy::update_managed_deploy_config'
interface by keeping an internal copy of the currently used deploy
template inside the 'Deploy' class. The template is updated whenever
the config/deploy file is modified.

This change weakens the coupling between the '_manual_deploy_rom' and
the '_deploy' subsystem, easing the upcoming implementation of the
switching between presets.
2023-01-24 12:07:31 +01:00
Norman Feske
bf231f7fca sculpt_manager: use update_list_model_from_xml
This patch replaces the use of 'List_model::Update_policy' types by
simpler 'update_list_model_from_xml' function calls.

Issue #4317
2023-01-24 12:07:31 +01:00
Norman Feske
39ca06114b sculpt_manager: keep launchers in 'Dictionary'
This patch replaces the direct use of an 'Avl_tree' by the modern
'Dictionary' utility.
2023-01-24 12:07:31 +01:00
Norman Feske
be7022dadc util/dictionary.h: alphabetically sorted for_each
This patch reverses the AVL-tree criterion to let 'for_each' traverse
the elements in alphabetical sorting order.

Issue #4610
2023-01-24 12:07:31 +01:00
Norman Feske
0e311845bf base-hw: don't show ROM modules at boot time
On complex scenarios like Sculpt on the phone, this change noticeably
reduces the boot time.

Issue #4705
2023-01-24 12:07:31 +01:00
Martin Stein
c665f4e51d base-hw scheduler test: add to autopilot
Fix #4151
Fix #4710
2023-01-24 12:07:31 +01:00
Martin Stein
68afbbc0f0 base-hw scheduler test: print method
Adds befriended test-local wrappers for the classes Cpu_share and Cpu_scheduler
and adds a print method to the scheduler wrapper that prints the internal state
of the scheduler to the given output. Cpu_shares are referenced in the output
via a the IDs that the test uses to organize them. I.e., this corresponds to
how the CPU shares are named when calling the atomic steps the test is made of.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
f60a004cff base-hw scheduler test: rename test.cc main.cc
Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
20fea7fdd2 base-hw scheduler test: adapt to new behavior
This adapts the test to the changes that were applied to the scheduling scheme
by the following commits:

* base-hw scheduler: optimize quota depletion events
* base-hw scheduler: fix bug on removing head
* base-hw scheduler: fix ready method
* base-hw: optimize & cleanup scheduler

Part of that is that the test used to check whether the act of setting a share
ready outdates the head or not. However, with the current version of the
scheduler, this check is not possible anymore. We can merely check whether the
head is outdated after setting the share ready. So, among other adaptions, this
commit adapts the expectations of the test to the new semantics of the check.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
615dd377dd base-hw scheduler test: clean up
* Get rid of preprocessor macros.
* Introduce Main as class.
* Exit with -1 instead of endless loops on errors.
* Don't try to deal with error conditions, just print a message and exit
  with -1.
* Only one operation per line.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
0467b4aaf3 base-hw scheduler: optimize quota depletion events
This is an optimization for the case that a prioritized scheduling context
needs slightly more time during a round than granted via quota. If this is the
case, we move the scheduling context to the front of the unprioritized schedule
once its quota gets depleted and thereby at least ensure that it does not have
to wait for all unprioritized scheduling contexts as well before being
scheduled again.

Note that this introduces the possibility of undeserved starvation of
unprioritized scheduling contexts to the scheduling scheme. If there are
enough prioritized contexts that deplete their quota during a round,
they may cover up also the rest of the round with their unprioritized time
slices. If this happens every round, contexts without a priority/quota may
never get a turn. In the previous scheduling scheme, this could not occur as
the unprioritized schedule was completely independent from prioritized
schedules and rounds.

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
f74962bdad base-hw scheduler: fix bug on removing head
The scheduler did not consider the consumed quota during a call to "update"
if the head that consumed the quota was removed from the scheduler. When this
occured, the internal round time did not advance as expected but remained at
its previous value untile the next call to "update" (without a removed head)
This commit introduces a new flag that is set only when the head gets removed
in order to detect and handle the situation correctly on the next call to
"update".

Ref #4151
Ref #4710
2023-01-24 12:07:31 +01:00
Martin Stein
ab298b6337 base-hw scheduler: fix ready method
Setting the _need_to_schedule member in the 'ready' method of the scheduler
was not done correctly. At least, the _need_to_schedule was set true in
situations were the head was not outdated by the 'ready' operation.

Ref #4151
2023-01-24 12:07:31 +01:00
Stefan Kalkowski
1151706243 hw: rename functions of Ipc_node class signature
* Remove *request* in context of: wait, reply, send to shorten it.
* Use ready_to_* instead of can_*, which is regularily used in Genode's APIs
* Replace helping_sink with helping_destination, as destination is more common

Ref genodelabs/genode#4704
2023-01-24 12:07:30 +01:00
Stefan Kalkowski
fd3c70ec5b hw: mark threads as dead in case of ipc violations
The IPC protcol violations are:

* Sending to an unknown thread (cap)
* Waiting for messages if a reply hasn't happened yet

This silents threads that otherwise repeatedly cause kernel messages
about the violation.

Ref genodelabs/genode#4704
2023-01-24 12:07:30 +01:00
Stefan Kalkowski
fc690f1c47 hw: re-work the ipc node's internal state machine
* Split the internal state into incoming and outgoing message relations
* Avoid fragmenting of one state like formerly '_state' and '_help'
* Remove pointer to caller, use incoming FIFO instead

This commit fixes at least two bugs that were triggered by tests that
destroy threads in many different states, like run/bomb:

* The '_help' data member was not reset reliable in each situation where a
  helping relationship came to an end. However, when we fixed this bug alone
  in the old state model, the issues remained. The new state model fixes
  this bug as well.

* A thread sometimes referenced an already dead thread as receiver. This caused
  the kernel IPC code to access the vtable of an object that didn't exist any
  longer. Note that the two threads were not in direct IPC relationship while
  the receiver was destroyed, so, there must have been an intermediate node
  between them. Due to the complexity of this problem, we eventually gave up
  pin-pointing the exact reason in the kernel IPC code. The issue disappeared
  with the new state model.

Fix genodelabs/genode#4704
2023-01-24 12:07:30 +01:00
Josef Söntgen
5a558a64e1 gpt_write: use GPE LBA from header
When writing the GPT header, the tool always wrote the GPT entries
belonging to the primary header to LBA following the header. Normally
this is LBA 2 as the header is located in LBA 1. The GPT allows for
up to 128 entries that all in all cover 16 KiB of storage space.
However, on some systems, e.g. ARM-based machines, the bootloader can
be stored in this region. For this reason the GPT entries may be moved
to a different LBA.

This commit changes the tool to adhere to then given GPE LBA in header
when writing out the modified GPT data.

Fixes #4720.
2023-01-24 12:07:30 +01:00
Norman Feske
ddeaccf728 vfs: documentation of Vfs::Env::User
Issue #4706
2023-01-24 12:07:30 +01:00
Christian Prochaska
09c1a9cfc0 qt5: don't pass non-printable unicode values on key repeat
Fixes #4716
2023-01-24 12:07:30 +01:00
Norman Feske
25e4bcefbf vfs: remove 'Io_response_handler' interface
The old 'Io_response_handler::io_progress_response' interface has been
replaced by the 'Vfs::Env::User::wakeup_vfs_user' (issue #4697). The
remaining 'read_ready_response' method is now hosted in the
appropriately named 'Read_ready_response_handler'.

Issue #4706
2023-01-24 12:07:30 +01:00
Norman Feske
74e6370187 cbe/vfs/trust_anchor_vfs.h: avoid 'Constructible' 2023-01-24 12:07:30 +01:00
Norman Feske
53b67810ba vfs/cbe_trust_anchor: Remove Io_response_handler
This patch keeps driving the internal state machines until no progress
can be made. This required fixing the return values of several execute
functions, which used to report progress while being in complete state.

Along the way, the patch removes default switch cases to ensure that all
states are covered.

Issue #4706
2023-01-24 12:07:30 +01:00