Commit Graph

7853 Commits

Author SHA1 Message Date
Stefan Kalkowski
a30c4281d2 genode_c_api: report usb config on demand
Do not only report devices, but the current configuration of the driver too,
as long as the `report` node in the configuration states it.

Ref genodelabs/genode#4416
2022-02-21 15:47:50 +01:00
Stefan Kalkowski
938ac716a8 genode_c_api: make usb devices report configurable
To stay consistent with the configuration of the legacy usb_host_drv
and other components as well, do not report USB devices by default,
but when the following XML node is set within the component's
configuration:

  <report devices="yes"/>

Ref genodelabs/genode#4416
2022-02-21 15:44:23 +01:00
Stefan Kalkowski
a04d0b9a0f usb_session: increase default ram quota
The new usb_host driver for PC by default needs more RAM quota in contrast
to the old one. To minor warnings and repeated attempts to open a USB
session from a client, this commit increases the default RAM quota by one
page.

Ref genodelabs/genode#4416
2022-02-21 15:44:22 +01:00
Stefan Kalkowski
3c07bf4e86 genode_c_api: support to handle empty usb session
Adds a function to the USB part of the Genode's C API, to enable
usb_host drivers to acknowledge USB request in client's packet buffer
although they are not assigned to an USB device. The requests are
marked with a "no device" error.

This commit fixes a regression originally solved in genodelabs/genode#4149

Ref genodelabs/genode#4416
2022-02-21 15:44:22 +01:00
Norman Feske
c2efa5406e xml_node: support backslash as attribute value
XML allows attribute values like <node attr="\"/>. The XML parser
wrongly reflects this case as 'Invalid_syntax'. This behavior stems from
the implicit use of the 'end_of_quote' function, which considers the
sequence of '\"' as a quoted '"' rather than the end of a quoted string.

The patch solves this problem by making the 'end_of_quote' part of
the tokenizer's scanner policy.

The patch removes the 'end_of_quote' function from 'util/string.h'
because it is not universal, and to avoid the ambiguity with
'SCANNER_POLICY::end_of_quote'.

Fixes #4431
2022-02-21 15:44:22 +01:00
Stefan Kalkowski
494f881f27 core: don't use frame 0 for managing_system pd
When a PD owns the right to ask for a RAM dataspace's `dma_addr` it is
concurrently constrained to use allocations of a specific physical RAM area.
This commit further limits this area by removing RAM page frame zero.
Otherwise the return value of `dma_addr` for such a dataspace would be
erroneously interpreted as a fault, because zero is currently the error
return value of `dma_addr`.

Fix genodelabs/genode#4428
2022-02-21 15:44:22 +01:00
Norman Feske
429d078de7 log_core.run: RAM-quota adjustment for sel4
Issue #4400
2022-02-21 15:44:22 +01:00
Norman Feske
4769e05626 mk: abi does not depend shared-lib dependencies
This patch cuts the superfluous dependency of abi.so files from the
library dependencies of the corresponding lib.so file. ABIs depend
only on symbol files.

Prior this patch, the second step of the following sequence would
wrongly re-build the abi.so file.

  arm_v6$ make init
  arm_v6$ make init KERNEL=hw

As the KERNEL argument does not affect the ABI, the abi.so should
better not be created twice.

Issue #4408
2022-02-21 15:44:22 +01:00
Johannes Schlatow
019cacf07e vfs_tap: VFS plugin for Uplink/Nic session access
This plugin emulates a `/dev/tapX` device as found on FreeBSD. See
README for more information.

genodelabs/genode#4394
2022-02-21 15:44:22 +01:00
Johannes Schlatow
19958eafcf vfs: add notify_read_ready() to Single_vfs_handle
The Single_file_system now forwards the
`File_io_service::notify_read_ready` method to the
handle as it already did for most of the other methods.

genodelabs/genode#4394
2022-02-15 17:14:34 +01:00
Johannes Schlatow
f33916e2dc vfs: remove check_unblock from File_io_service
genodelabs/genode#4394
2022-02-15 17:14:34 +01:00
Christian Helmuth
1d5af600cc test-init: increase LOG server cap quota for sel4 2022-02-15 17:14:34 +01:00
Sebastian Sumpf
8edb7b28a0 sculpt_manager: initial mode for 'Managed_config'
Do not set '_mode' per default to MANANGED. Check if a manual config ROM
is present during construction and set '_mode' to MANUAL in case it is.

issue #4369
2022-02-15 16:33:38 +01:00
Sebastian Sumpf
300cdc435d expanding_report: make expandable for XML node generation
'generate(Xml_node node)', as used by the Sculpt manager, calls this
function instead of the lambda version. The 'report' function of the
'Genode::Reporter' does not throw an exception in case there is not
enough backing storage for the 'generate' request. Therefore, we have to
check this condition in a loop and call '_increase_report_buffer' in
case size limits are reached.

Patch by Norman Feske.

issue #4369
2022-02-15 16:13:53 +01:00
Piotr Tworek
dd1596aa53 base: Don't produce .gnu.hash tables for Genode.
Genode linker does not support .gnu.hash tables so they will never be
used. Tell the linker not to bother producing them. This should reduce
the size of Genode ELF files a tiny bit without loosing anything
important in the process.

Fixes #4423
2022-02-15 15:32:20 +01:00
Martin Stein
3e460211c8 black_hole: provide Uplink service
Ref #4419
2022-02-15 15:28:58 +01:00
Piotr Tworek
bade0a85e7 base-hw: Implement CPU core identification for Cortex-A55.
According to ARM Cortex-A55 Core Technical Reference Manual r1p0 the
lowest 8 bits (Aff0) of MPIDR register represent thread IDs within a
multi-threaded core. The actual core identification bits are in Aff1.
This layout can be identified by checking the MT bit of MPIDR register.
Basically, if MT=1 core id is in Aff1, if MT=0 core id is in Aff0.

Without this change Genode will identify all CPU cores on A55 as primary
(0) core.

Its worth to mention that Cortex-A55 by itself is not a multi-threaded
CPU. Aff0 values are always expected to be 0 for pure A55 cores. A55
cores can however be paired with cores that are multi-threaded. To
support such big.LITTLE CPUs in Genode we'd probably need to add a
different mechanism for mapping MPIDR values to logical, contignous
core IDs which Genode expects.

Ref:
https://developer.arm.com/documentation/100442/0100/register-descriptions/aarch64-system-registers/mpidr-el1--multiprocessor-affinity-register--el1?lang=en
2022-02-15 15:27:29 +01:00
Johannes Schlatow
c265218ba8 netperf: output more metrics
* use netperf omnitest output selectors to acquire more metrics
* remove packet_size argument that was not interpreted by netperf

genodelabs/genode#4427
2022-02-15 15:25:56 +01:00
Norman Feske
8b7067d289 sd_card_bench.run: assign 'managing_system' role
Issue #2243
2022-02-15 15:18:04 +01:00
Norman Feske
649647538b depot: update recipe hashes 2022-02-15 10:23:59 +01:00
Johannes Schlatow
70bf0cbe84 vfs/lwip: add missing signal handlers
Note, without batching from the Nic server this may slow down the
throughput a bit.

genodelabs/genode#4427
2022-02-15 10:23:59 +01:00
Piotr Tworek
58e0b24006 base: Ignore empty constructors array.
This does not affect default Genode builds as far as I can tell. There
is always at least one global static CTOR which seems to be coming from
one of the GCC runtime libs bundled in the toolchain. The problem became
visible for me only after I've replated GCC runtime with LLVM based
one. In such setup I often see binaries that do not have any static ctors.
Such binaries end up crashing Genode ld.lib.so.

Make sure the code does handle empty constructors array.

Fixes #4422
2022-02-15 10:23:58 +01:00
Piotr Tworek
05e4993d2e gems: Avoid flexible array member in Cached_font.
Switch the code to 0 lengh array instead. The code in
Lru_cache::element_size calls sizeof on this structure. This works in
gcc, but fails when using clang. Even for GCC however the documentation
states:

  "Flexible array members have incomplete type, and so the sizeof operator
   may not be applied. As a quirk of the original implementation of
   zero-length arrays, sizeof evaluates to zero."

Basically its an implementation quirk that clang does not support. Both
GCC and clang do support zero sized arrays however so using them here
allows both compilers to process this code.

Ref: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
c1a566ce63 gems: Remove unused lambda capture in vfs/ttf.
Clang complains "this" captured by the lambda is not used. Remove the
capture to make it happy.

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
ec7d0efddf os: Drop unused Net::Dhcp_client::_alloc member.
This reference member is not used anywhere in the code. This prompts
clang to complain about it. Eliminate the member and all the plumbing
associated with it to silence the warning.

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
15c8cac78b os: Don't use char as array subscript.
Clang really doesn't like char subscripts. I can't say I blame it. Fix
the warning by an explicit cast to unsigned.

include/nitpicker_gfx/tff_font.h:230:53: error:
    array subscript is of type 'char' [-Werror,-Wchar-subscripts]
Tff::Vertical_metrics const m = _vertical_metrics['m'];
                                                 ^~~~
Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
9dd04ad268 os: Drop unused lambda captures in VFS code.
Clang likes to complain when lambdas capture parameters without
actually using them. This patch fixes a couple of such problems in VFS
related os module code.

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
14c36efbab os: Disambiguate Genode::destroy in route_model.h
Clang can't figure it out on its own. I can't blame it for this to be
honest. Lets be clear which destroy method we're talking about here.

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
f1f3b423ec os: Disambiguate friend Avl_node.
It seems clang does not take "using namespace Genode" statement in
Driver namespace into account when parsing those friend Avl_node
lines.

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
5e93a5806b base-hw: Use softfp ABI on virt_qemu ARMv7.
The soft ABI implies purely software floating point implementation.
This is not the case for Genode however. For example core's
exception_vector.S uses vmsr instruction. This builds fine with with
GCC based toolchain, but clang with integrated-as complains:

src/core/spec/arm/exception_vector.S:122:2: error: instruction requires: VFP2
 vmsr fpexc, r1
 ^

Fix this by passing softfp to mfloat-abi command on ARMv7. This allows
usage of FP HW, but implies soft-floating point ABI.

Issue #4421
2022-02-15 10:23:58 +01:00
Piotr Tworek
4ae78639f5 base-hw: Fix invalid structure alignments.
According to C++11 reference:

  "If the strictest (largest) alignas on a declaration is weaker than
   the alignment it would have without any alignas specifiers (that is,
   weaker than its natural alignment or weaker than alignas on another
   declaration of the same object or type), the program is ill-formed:"

https://en.cppreference.com/w/cpp/language/alignas

The code requests 4 byte alignment for Genode::Arm_cpu::Context.
The Context structure inherits Genode::Arm_cpu::Fpu_context which
has minimum alignment requirement of 8 bytes, due to uint64_t d0_d31
member. This makes the 4 byte value in Context's alignas specifier
invalid (smaller than allowed minimum).

Similar situation takes place in Arm_64 case. The claimed minimum
alignment of Context is 8 bytes, but the fpu_state member imposes 16
bytes alignment (explicitly specified in Fpu_state declaration).

In both cases the code builds fine with GCC 8.3.0, but fails with
clang which claims that "requested alignment is less than minimum
alignment of X for type", where X is 8 on ARM and 16 on AArch64.

Ref: https://eel.is/c++draft/dcl.align#5

Issue #4421
2022-02-15 10:23:58 +01:00
Martin Stein
468057638b black_hole: provide Nic service
Ref #4419
2022-02-15 10:23:58 +01:00
Stefan Kalkowski
3edec0c6ca pc: new usb host driver based on Linux 5.14.21
Original commit by Josef Soentgen.

Ref genodelabs/genode#4416
2022-02-15 10:23:58 +01:00
Stefan Kalkowski
e72f39b484 Provide pc specific lx_emul API
This commit contains:

* Minimal Linux kernel target: pc_linux
* Library to generate a Linux build directory, config, generated headers
* API depot package

The actual work was provided by Josef Soentgen.

Ref genodelabs/genode#4416
2022-02-15 10:23:58 +01:00
Norman Feske
33b038e8a7 Consistent spelling of "writeable"
Fixes #4425
2022-02-15 10:23:58 +01:00
Norman Feske
0d48b74bec Remove Dataspace::phys_addr RPC function
The official way to obtain DMA addresses for RAM dataspaces is
the RPC function 'Pd_session::dma_addr' now. User-level device drivers
should not call this function directly but use the 'Platform_session'
interface of the platform driver instead.

Fixes #2243
2022-02-15 10:23:58 +01:00
Norman Feske
84435662aa os/block: Remove use of Dataspace::phys_addr
Issue #2243
2022-02-15 10:23:58 +01:00
Norman Feske
de6c65c453 sd_card/pl180: remove unused code 2022-02-15 10:23:16 +01:00
Martin Stein
7945bcb353 black_hole: add config.xsd
Ref #4419
2022-02-15 10:23:16 +01:00
Martin Stein
ca49e94a87 black_hole: test recipe for the depot_autopilot
* Creates sessions to all supported services of the black hole component
* Test-drives the Event and Capture session with dummy input
* Adds the test to the default list of depot_autopilot.run
* Test-driving the Audio_in and Audio_out sessions is still missing and should
  be added via a dedicated commit

Ref #4419
2022-02-15 10:23:16 +01:00
Stefan Kalkowski
3966d6f16f usb_host_drv: move it to legacy_usb_host_drv
To make room for the re-newed usb_host_drv basing on Linux 5.14 and
the re-newed lx_kit/lx_emul we have to move the depot recipe and
consistently name the old drivers with a legacy_ prefix.

Ref genodelabs/genode#4416
2022-02-15 10:23:16 +01:00
Stefan Kalkowski
17f3e7a38f Introduce pc repository for PC board support
Fix genodelabs/genode#4415
2022-02-15 10:23:16 +01:00
Stefan Kalkowski
da55425114 lx_emul: finalize support for x86_32 and x86_64
Original commit by Josef Soentgen.

Fix genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Josef Söntgen
5a48f8ab0f lx_kit/lx_emul: support for executing PCI fixups
Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Josef Söntgen
2515196b82 lx_kit: add Platform session wrapper for x86
The x86 platform driver uses a different API than the one for ARM for
which the lx_kit glue code was designed. Since the x86 platform driver
will eventually adopt a similar interface we implement a wrapper that
encapsulates the old interface.

Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Josef Söntgen
77ab7bf68b lx_emul: add PCI config space handling
Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Josef Söntgen
c851b189c5 lx_emul: add wake_q_add/wake_up_q in shadow impl.
The function within this commit were taken verbatim from the
original Linux implementation.

Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Josef Söntgen
0f70212139 lx_emul: import shadow sched.c from allwinner repo
Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Josef Söntgen
96ca806e0d lx_emul: fix conversion warnings on 32bit
This change is necessary for also supporting 32bit platforms.

Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Stefan Kalkowski
7809b9e8ad lx_emul: move arm_64 specifics, add x86 specifics
Split in between x86 and arm code. Move arm-specifics away from
generic include pathes.

Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Stefan Kalkowski
d7963be212 lx_emul: update to linux kernel 5.14 as default
Until now, the lx_emul layer addressed a 5.11 Linux Kernel port,
now that we add new architectures it is better to update the default version
first. There are especially changes in the task_struct code,
and the signature of some functions in the paging subsystem changed.

Ref genodelabs/genode#4411
2022-02-15 10:23:16 +01:00
Stefan Kalkowski
742c40a60a dde_linux: add linux kernel 5.14.21 port
Ref genodelabs/genode#4411
2022-02-15 10:23:15 +01:00
Stefan Kalkowski
1e41c6daa4 lx_kit: move setjmp/longjmp away from legacy
We use the architecture-specific setjmp/longjmp implementation without
modification in the newer lx_kit implementation as well. There is no
need for a duplication.

Ref genodelabs/genode#4411
2022-02-15 10:23:15 +01:00
Stefan Kalkowski
ed1b8fb3f9 sculpt_manager: increase ram quota of nic driver
When running Sculpt OS on i.MX8 MW EVK or MNT Reform 2 the NIC driver
is far more hangry with respect to memory usage.

Fix genodelabs/genode#4407
2022-02-15 10:23:15 +01:00
Martin Stein
fcb3e32fee black_hole: provide Event service
Fixes #4419
2022-02-15 10:23:15 +01:00
Norman Feske
53dea7e623 Move exec_terminal to genode-world
This is a leftover of issue #4258.
2022-02-15 10:23:15 +01:00
Martin Stein
6f571a1e80 port/cbe: update to newest version
The new version fixes a bug that led to the regular attempt of encrypting
invalid block encryption keys at the crypto back-end.

Ref #4355
2022-02-15 10:23:15 +01:00
Norman Feske
4f40a607ea Remove ROM prefetcher
Fixes #4418
2022-02-15 10:23:15 +01:00
Johannes Schlatow
392a2cba66 libc: fix page fault in socket_fs_plugin
In the error case of socket_fs_accept() the Unconfirmed utility was
incompletely applied with the result of executing the cleanup routines
in the wrong order.

Fixes #4417
2022-02-15 10:23:15 +01:00
Stefan Kalkowski
50c7104e22 nic_router tests: remove unused platform driver 2022-02-15 10:23:15 +01:00
Christian Helmuth
a9b8b6e6c2 Move lua/moon to genode-world
Issue genodelabs/genode-world#282
Fixes #4414
2022-02-15 10:23:15 +01:00
Christian Helmuth
76dde9d0ec libports: remove ancient unused readline library 2022-02-15 10:23:15 +01:00
Alexander Boettcher
888b89c1c0 nova: avoid pagefault on invalid SVM exit
Fixes #4391
2022-02-15 10:23:15 +01:00
Alexander Boettcher
35489aa708 seoul: move to genode-world
Fixes #4412
2022-02-15 10:23:15 +01:00
Alexander Boettcher
baea48fbec iso9660: move to genode-world
Fixes #4413
2022-02-15 10:23:15 +01:00
Norman Feske
ec559b85e2 Add missing shared-object link dependencies
Issue #4408
2022-02-15 10:23:14 +01:00
Norman Feske
59936c22c0 depot: cut kernel dependency from api/base
This patch removes the implicit build of ld-$(KERNEL) by the generic
ld.mk file because the kernel-specific dynamic linker is unreachable
when building a regular binary archive.

Issue #4320
2022-02-15 10:20:59 +01:00
Norman Feske
23f92da02f mk/ld.mk: trigger kernel-dependent ld.lib.so build
When 'KERNEL' is specified, let the generic (pseudo) target of
lib/mk/ld.mk trigger the build of the actual dynamic linker named after
the used kernel. This way, we become able to remove the magic
linker-build step from the boot-image stage of the run tool.

Issue #4320
2022-02-15 10:20:59 +01:00
Norman Feske
f2f0711bf4 mk: don't link transitive shared-lib dependencies
This patch applies the existing "privatization" of transitive
shared-library dependencies from static lib dependencies to shared lib
dependencies. It thereby improves the consistency of binaries created in
a regular build directory with binaries created in depot archives.

Issue #4408
2022-02-15 10:20:59 +01:00
Norman Feske
3b8fe1b410 nitpicker: reflect seq number in clicked report
This patch makes nitpicker's "clicked" report useful for the detection
of clicks outside of any client. This is needed in situations where the
dialog should close when clicking outside its screen area. In the new
version, a click outside any client results in a report without a
'label' attribute. Furthermore, the report is augmented by the sequence
number of the click, which allows for freshness checks by the consumer of
the report (i.e., sculpt_manager).

Issue #4398
2022-02-15 10:20:59 +01:00
Norman Feske
616a92a193 test-vfs_stress_fs: adjust cap quota for seL4 2022-02-15 10:20:59 +01:00
Johannes Schlatow
47cb44c6eb os/trace_buffer.h: fix wraparound
If the buffer contains padding at the end, the iteration must continue
in order to restart iteration from the start of the buffer.

genodelabs/genode#4244
2022-02-15 10:20:59 +01:00
Martin Stein
b31bbfe14c jpeg: update hash of downloaded archive
The archive contents are equivalent except the creation date of the
top-level directory.

  -drwxr-xr-x guivol/users      0 2021-01-07 12:54 jpeg-9d/
  +drwxr-xr-x guivol/users      0 2022-01-04 12:02 jpeg-9d/

Fixes #4406
2022-02-15 10:20:59 +01:00
Norman Feske
36162f5ccf Remove fs_log component
Fixes #4400
2022-02-15 10:20:59 +01:00
Norman Feske
d93d3fbfca log_core.run: use terminal_log instead of fs_log
Issue #4400
2022-02-15 10:20:59 +01:00
Norman Feske
51134a6897 cpu_burner: coding style 2022-02-15 10:17:28 +01:00
Norman Feske
26d9bac78f os: remove outdated test/block components
The functionality of the test-block-client, test-block-server, and
test-block-bench components is now covered by the block_tester
application and the vfs_block server.

Issue #4405
2022-02-15 10:17:28 +01:00
Norman Feske
378e2d9e74 Use block_tester instead of test/block/client
Issue #4405
2022-02-15 10:17:28 +01:00
Norman Feske
76c090b694 Remove block_cache server
Issue #4405
2022-02-15 10:17:28 +01:00
Norman Feske
9478c3cc7c Remove http_block server
Issue #4405
2022-02-15 10:17:28 +01:00
Norman Feske
479f2e0d1f trace_logger: remove false warnings from the log
This patch eliminates warnings that occurred as side effect of using the
'Session_policy' utility ("Warning: no policy defined for label...").
The new version uses the 'with_matching_policy' function instead, which
has the nice side effect of simplifying the error handling.
2022-02-15 10:17:28 +01:00
Norman Feske
6eaeb61d58 os/session_policy.h: add 'with_matching_policy'
This patch makes the server-side policy-matching logic available outside
the 'Session_policy' class. Given that the new 'with_matching_policy'
function does not throw any exception, it gives server implementations
the freedom to avoid the C++ exception mechanism for the policy handling.
2022-02-15 10:17:28 +01:00
Stefan Kalkowski
bb285bf758 Convert virtio to use Platform::Session::dma_addr
Issue #2243
2022-02-15 10:17:28 +01:00
Norman Feske
7e26d3ef3f Give diagnostic aid to callers of 'dma_addr'
If the platform driver lacks the 'managing_system="yes"' attribute,
requests for DMA addresses return 0. This patch is meant to help
diagnosing such configuration issues.

Issue #2243
2022-02-15 10:17:28 +01:00
Norman Feske
cbe3e49c7f os: Input::Event:Axis event type
This event type can be used to propagate analog values such as joypads.

Issue #3669
2022-02-15 10:17:28 +01:00
Norman Feske
50c2b0066f Remove 'Env::reinit' and 'Env::reinit_main_thread'
Fixes #4404
2022-02-15 10:17:28 +01:00
Norman Feske
62b4871c5c Remove gems/magic_ring_buffer.h
Since its introduction four years ago, the utility remained
largely unused.

Fixes #4403
2022-02-15 10:17:28 +01:00
Christian Prochaska
d4d875f2e6 libusb: handle 'ack_avail' signals in a VFS plugin
Issue #4392
2022-02-15 10:17:28 +01:00
Stefan Kalkowski
cf0d007fd4 os: remove imx53 specific platform api and fb_drv
Fix #4402
2022-02-15 10:17:28 +01:00
Stefan Kalkowski
fe009fd66d usb_hid_raw: add configuration for rpi_platform_drv
Ref #4396
2022-02-15 10:16:52 +01:00
Norman Feske
51479e6be0 Convert drivers to use Platform::Session::dma_addr
This patch eliminates several calls of 'Dataspace::phys_addr'.

Issue #2243
2022-02-15 10:16:52 +01:00
Norman Feske
90a6f55f88 os: add platform_session/dma_buffer.h
The new 'Dma_buffer' utility simplifies the allocation of DMA-capable
RAM by device drivers.

Issue #4401
2022-02-15 10:16:52 +01:00
Norman Feske
997a24e91a dde_rump: remove use of Dataspace::phys_addr
This patch removes dead code. The Rump kernel does not need to know any
physical addresses of allocated memory.

Issue #2243
2022-02-15 10:16:52 +01:00
Norman Feske
e4f62380d7 base: Pd_session::dma_addr, Pd_session::attach_dma
This patch enhances the PD-session interface with the support needed for
user-level device drivers performing DMA. Both RPC functions are
intended for the direct use by the platform driver only. If invoked for
PDs that lack the managing-system role, the operations have no effect.

The 'dma_addr()' RPC function allows the platform driver to request the
DMA address of a given RAM dataspace. It is meant to replace the
'Dataspace::phys_addr' RPC function.

The 'attach_dma' RPC function adds the given dataspace to the device
PD's I/O page table. It replaces the former heuristics of marking DMA
buffers as uncached RAM on x86.

With this patch, the UNCACHED attribute of RAM dataspaces is no longer
used to distinguish DMA buffers from regular RAM dataspaces.

Issue #2243
2022-02-15 10:16:52 +01:00
Johannes Schlatow
db3a647c6d allocator_avl: use Attempt for size_at
Fixes ambiguous interpretation of returned 0.

genodelabs/genode#4393
2022-02-15 10:16:51 +01:00
Johannes Schlatow
5aa0fea29b base: pass lambdas by reference in util/attempt.h
genodelabs/genode#4393
2022-02-15 10:16:51 +01:00
Johannes Schlatow
b821776b0d base: add == operator to util/attempt.h
This simplifies testing for early return conditions for which the use of
lambdas would be quite noisy.

genodelabs/genode#4393
2022-02-15 10:16:51 +01:00
Norman Feske
024b987e4c os: change Input::Touch_id from int to unsigned
There no sensible meaning for negative touch IDs.

Issue #3669
2022-02-15 10:16:51 +01:00
Norman Feske
8e9cabf819 sculpt_manager: touch-screen compatibility
This patch makes Sculpt's leitzentrale GUI able to respond to touch events. It
formerly assumed that click/clack events are always preceded by hover reports
that identify the clicked-on widgets. For touch events, however, the most
up-to-date hover information referred to the previous click because there is no
motion without touching. So the GUI tended to identify the wrong widgets as
click targets.

The patch solved this problem by testing the freshness of the hover information
at the time of the click. If the hover information is older than the click, the
action is deferred until up-to-date hover information becomes available.

Fixes #4398
2022-02-15 10:16:51 +01:00
Norman Feske
cdbb929125 nitpicker: forward Input::Seq_number events
Issue #4398
2022-02-15 10:16:51 +01:00