Commit Graph

12428 Commits

Author SHA1 Message Date
Norman Feske
852bc3fc62 base-linux: remove exceptions from region_map_mmap
This patch replaces the exception-based error propagation by the use of
'Attempt' return values, which eliminates side effects of the exception
handling - cxx_heap allocations - from code paths that are used by the
the cxx_heap itself (when growing the cxx_heap).

It thereby fixes the failure of the sub_rm test at the "attach RAM ds to
any position at sub rm - this should fail" step.

Fixes #4953
2023-07-14 12:06:32 +02:00
Norman Feske
75bfc37b18 sculpt: screensaver infrastructure
This patch enhances Sculpt with the ability to detect user inactivity
for driving a screensaver by combining nitpicker's hover and focus
reports with a timer.

Issue #4950
2023-07-14 12:06:32 +02:00
Norman Feske
8463f4910a nitpicker: improve activity reporting
Nitpicker's hover and focus reports contain an 'active' attribute, which
can be inspected for the detection of user activity, e.g., as trigger
for a screensaver or for dynamic clipboard policies.

When using the 'Event' session, the reporting code updated the reports
only on incoming events. This patch adds the periodic reporting as used
when using the old 'Input' session.

Issue #4950
2023-07-14 12:06:32 +02:00
Norman Feske
ba67b535f8 gems: remove leitzentrale.run
This run script is superseded by modular Sculpt, which is able to run on
base-linux.
2023-07-14 12:06:32 +02:00
Josef Söntgen
1cac134030 lx_kit: support multiple pending IRQs
Decoupling the scheduler execution can lead to missed interrupts
because the current implementation only handles one pending
interrupt and requires immediate processing.

This commit introduces a helper object that is used to capture
any occuring interrupts that are then handled consecutively.

Issue #4927.
2023-07-14 12:06:32 +02:00
Josef Söntgen
caac994da8 lx_kit: decouple schedule execution
Prior to this commit, whenever an external event occurred, for example
timer or interrupt, the corresponding I/O signal handler was triggered.
This handler unblocked the task waiting for the event and initiated the
immediate execution of all unblocked tasks. Since these tasks may hit
serialization points, e.g. synchronously waiting for packet stream
operations, that require handling of other I/O signals this leads to
nested execution. This, however, is not supported and mixes application
and I/O level signal handling.

The flagging of the scheduling intent is now decoupled from its
execution by using an application level signal handler that is run in
the context of the components main entrypoint. The I/O signal handler
now triggers the scheduling execution by sending a local signal to
the EP.

Since it might be necessary to execute a pending schedule from the EP
directly the scheduler is extended with the 'execute' member function
that performs the check that the scheduler is called from within the
EP and triggers the execution afterwards.

Issue #4927.
2023-07-14 12:06:32 +02:00
Alexander Boettcher
1f1fafb0cf intel_fb: disable encoders of disconnected ports
On disconnect of displays, e.g. seen with Type-C connectors, the encoder was
not properly disabled due to a missing drm_client_modeset_commit. In order that
the commit succeed, however a fb must be assigned to the modeset. Missing to
do so leads to an -EINVAL by the drm_client_modeset_commit.

Fixes #4948
2023-07-14 12:06:32 +02:00
Josef Söntgen
70c57a3be3 pci_decode: calculate 64bit BAR size
Issue #4949.
2023-07-14 12:06:32 +02:00
Christian Prochaska
02209e5455 monitor: add memory write support
Fixes #4947
2023-07-14 12:06:32 +02:00
Martin Stein
7b7851abfb vfs/tresor_trust_anchor: fix alignment faults
Fixes alignment faults that occured in the AES256 implementations while
wrapping or unwrapping keys on imx53_qsb, imx6q_sabrelite, and imx7d_sabre.
The problem was that the unwrap_key/wrap_key functions did reinterpret casts
from unsigned char pointers to uint64_t pointers and then directly used the 64
bit values of referenced by the latter. Most probably this caused the compiler
to optimize operations in the assumption that the pointer is 8-byte aligned
which then created alignment faults.

As a solution, this commit changes the interface of the wrap_key/unwrap_key
functions to take uint64 pointers as arguments instead of unsigned char
pointers and then adapts the function users to ensure that they refer to
appropriately aligned memory regions.

Fixed #4932
2023-07-14 12:06:32 +02:00
Christian Helmuth
6e7b66cb8a Finally move __dso_handle into genode.ld
Issue #4784
2023-07-14 12:06:32 +02:00
Christian Helmuth
18c00e58cc tool: remove sel4 x86_32/pc and imx7-sabre artifacts
Issue #4918
2023-07-14 12:06:32 +02:00
Christian Helmuth
c84bbea1ca base-foc: avoid global ctor in Irq_session_component
Issue #4784
Issue #3509
2023-07-14 12:06:32 +02:00
Christian Helmuth
f6dcc3ca74 genode.ld: preserve ctors/dtors sections for analysis
Issue #3509
2023-07-14 12:06:32 +02:00
Josef Söntgen
317c5429d2 dde_bsd: decrease overall memory consumption
The initial memory backend implementation was brought over from DDE
Linux and was geared towards use-cases where a high-performing
allocator is useful. In case of the audio driver this is overkill
and since no other driver that could benefit from such an
implementation was ported in the meantime rather use a simpler
implementation that keeps the overhead down.

Fixes #4946.
2023-07-14 12:06:31 +02:00
Josef Söntgen
ff0ba89e91 dde_bsd: update mixer state report on HP sense
Issue #4946.
2023-07-14 12:06:31 +02:00
Norman Feske
fa3f5edcc2 base: remove deinit_heartbeat_monitoring function
Issue #4940
2023-07-14 12:06:31 +02:00
Norman Feske
f9bb7246ef base: remove destroy_signal_thread function
With the removal of the 'Entrypoint::schedule_suspend' mechanism, this
function is no longer called.

Issue #4940
2023-07-14 12:06:31 +02:00
Norman Feske
4193279560 base: remove entrypoint.cc from core
Since component.cc is no longer linked to core, we can also remove
entrypoint.cc, which was merely a dependency of component.cc.

Related to issue #4784
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
13e0710d20 os: remove i.MX GPIO drivers
Ref genodelabs/genode#4945
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
3d5ec9ea3f dde_linux: remove legacy imx6 usb host driver
Ref genodelabs/genode#4942
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
5e7e6514be Remove i.MX6 platforms from base repositories
Fix genodelabs/genode#4941
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
edcd44d9a7 lx_emul: shadow ARM-specific asm/uaccess.h file
Fix genodelabs/genode#4939
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
b15fd68b60 lx_emul: shadow the ARM-specific asm/domain.h file
Fix genodelabs/genode#4938
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
720d2847b6 lx_emul: correct the return value of clk_get
Fix genodelabs/genode#4937
2023-07-14 12:06:31 +02:00
Christian Helmuth
7563cf5c55 Remove blank lines between template<> and struct
The blank line disconnects the struct from its template definition,
which makes the whole definition harder to comprehend.
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
15b30f3547 sculpt_image: add MNT Reform2 as target board
Fix genodelabs/genode#4936
2023-07-14 12:06:31 +02:00
Christian Prochaska
2dd1365af3 monitor: separate 'monitor_gdb' run scripts
Fixes #4944
2023-07-14 12:06:31 +02:00
Christian Prochaska
5a2d4c3437 monitor: apply 'wx' policy
Fixes #4943
2023-07-14 12:06:31 +02:00
Norman Feske
6e03d731a2 base-linux: avoid global ctor in wait_for_exit
This patch replaces the global '_wait_for_exit_sem' object by a local
static variable, which does not rely on the global ctors. It thereby
fixes the fault_detection test after the removal of the global ctors
execution from core ("base: remove component.cc from core").

Issue #4784
2023-07-14 12:06:31 +02:00
Christian Helmuth
1a7ff195d9 pc_linux: enable EFI and EFI_STUB
With these options enabled comparative testing between pc_linux drivers
and bzImages becomes much easier on EFI-only machines. The impact on the
actual Genode drivers is minimal.
2023-07-14 12:06:31 +02:00
Christian Helmuth
e2ddcee440 lx_emul: prevent warning about unsused static func 2023-07-14 12:06:31 +02:00
Norman Feske
1139492c4f base: remove Entrypoint::schedule_suspend
Fixes #4940
2023-07-14 12:06:31 +02:00
Norman Feske
1fd1786122 test/lx_hybrid: don't call glibc exit
This patch removes the use of the Entrypoint::schedule_suspend mechanism
and the call of glibc's exit from the lx_hybrid tests, for two reasons.

First, the interplay of atexit handlers executed by the glibc and
Genode's lx_hybrid library is complicated while bringing no benefits in
practice as lx_hybrid applications are usually servers that don't exit
anyway.

Second, the Entrypoint::schedule_suspend mechanism in not used by any
other component. By removing its use from the lx_hybrid tests, we can
remove this mechanism from the base library.

Issue #4940
2023-07-14 12:06:31 +02:00
Norman Feske
e2836bf68a ldso: remove deprecated support for legacy 'main'
Besides the removal of the legacy 'main' support, this patch simplifies
the lib/startup/_main.cc.

Issue #2199
2023-07-14 12:06:31 +02:00
Josef Söntgen
1d82a049bf nvme: address conversion warnings
This commit removes the CC_CXX_WARN_STRICT_CONVERSION suppressor
and address the resulting warnings.

Fixes #4935.
2023-07-14 12:06:31 +02:00
Norman Feske
7e1a2ac684 base: remove internal use of 'env_deprecated'
Fixes #4784
2023-07-14 12:06:31 +02:00
Norman Feske
de99945af0 base: pass 'Platform &' to 'bootstrap_component'
This eliminates the need of component.cc to pull the platform resources
out of thin air (calling 'env_deprecated()').

Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
415d4ab23d startup: merge init_main_thread.cc into _main.cc
This makes the interplay of 'init_main_thread', 'init_platform',
'_main', and 'bootstrap_component' easier to follow.

Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
7093258649 base: move 'prepare_init_main_thread' to Genode::
Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
3f9698a292 base: remove component.cc from core
Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
3a8c3dcc2d base: unify platform.cc between base, base-linux
This is a preparatory step for merging 'init_platform()' with
'bootstrap_component()'.

Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
54cc70f9b1 base: remove Env arg from init_exception_handling
By supplying only the parts of the Env that are actually relevant for
initializing the cxx heap, we avoid the need for the 'Env' interface.
The patch also moves the call of 'init_ldso_phdr' to the outside
of the cxx library because it does not belong there.

Issue #4784
2023-07-14 12:06:31 +02:00
Christian Prochaska
59ce64b638 monitor: handle Monitored_thread case in kill_thread()
Fixes #4934
2023-07-14 12:06:31 +02:00
Christian Prochaska
8264b63e0b core: replenish UTCB quota in exception case
Fixes #4933
2023-07-14 12:06:31 +02:00
Christian Helmuth
ea294fff0c lx_emul: fix unplug of unclaimed USB devices
USB devices that are never associated to client sessions lack
usb_per_dev_data (and a kernel thread). Therefore, the devices should be
discontinued directly on unplug as no URBs can be pending.

Issue genodelabs/genode#4795
2023-07-14 12:06:31 +02:00
Josef Söntgen
afaabb3121 pc_nic_drv: add R8169 driver
This commits enables the R8169 driver and was tested with two
RTL8168h/8111h (10ec:8168 rev 0x15 sub 1462:7a38 / 1d05:109f) and
two equal RTL8125B (10ec:8125 rev 0x5 sub 1458:e000) devices
running Sculpt.

Firmware loading is for now not implemented but specific Linux
commits suggest it could be necessary. However, doing so will be
post-poned until we have gathered more experience with the driver.

Restarting the driver might lead to the following IOMMU error
messages but the device seems to work anyway:

[ 0] IOMMU:0xffffffff817ec040 FR:0x8a00000000002500 FI:0xfffffffdf8d30000 type:0x8 BDF:25:00.0
[ 0] IOMMU:0xffffffff817ec040 FR:0x2000004200002500 FI:0x000c21b0 type:0x2 BDF:25:00.0
[ 0] IOMMU:0xffffffff817ec040 FR:0x2020004200002500 FI:0x000c21a0 type:0x2 BDF:25:00.0
[ 0] IOMMU:0xffffffff817ec040 FR:0x2020004200002500 FI:0x00138000 type:0x2 BDF:25:00.0
[…]
[ 0] IOMMU:0xffffffff817ec040 FR:0x8a00000000002500 FI:0xfffffffdf8d30000 type:0x8 BDF:25:00.0
[ 0] IOMMU:0xffffffff817ec040 FR:0x2020004300002500 FI:0x00124000 type:0x2 BDF:25:00.0

Issue #4921.
2023-07-14 12:06:31 +02:00
Josef Söntgen
1996041dcc pc_linux: update initcall order for pc_nic_drv
Issue #4921.
2023-07-14 12:06:31 +02:00
Josef Söntgen
18c23ddb0c pc_linux: enable R8169
Issue #4921.
2023-07-14 12:06:31 +02:00
Christian Helmuth
2232b33b8e pci_decode: limit bus parsing to subordinate buses
While this approach still scans "holes" in the bus range, it stops
scanning at the maximum subordinate bus number reachable from the base
PCI bus at the host bridge. Startup under Qemu no longer takes about 12
seconds for scanning 256 buses.
2023-07-14 12:06:31 +02:00