Commit Graph

12863 Commits

Author SHA1 Message Date
Sebastian Sumpf
97f8179f90 dde_linux: remove legacy lx_kit and lx_emul
All good things must come to an end.

issue #5104
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
8aa3967201 dde_linux: remove legacy_lxip
Because legacy_lxlip is the last entry in dde_linux.port, remove the
port as well.

issue #5104
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
8755993123 dde_linux: remove vfs_legacy_lxip
issue #5104
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
b6baf3fe1e dde_linux: remove 'import-usb_arch_include.mk'
This seems to be an artifact left over from the legacy USB drivers.

issue #5104
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
f86cd6899c ahci: add port count vs. ports implemented check
Check if controllers port count matches number of ports found in the
port implemented register. In case counts don't match print a diagnostic
message for debugging purposes.

issue #4081
2024-02-26 08:59:09 +01:00
Christian Helmuth
4a1a162c09 usb_hid: enable magic trackpad support
Issue #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
1dcc6fda6b lx_emul: improve motion-device handling in evdev
The key element of the improvement is differentiated processing of
events of the following device types.

  Mouse:       relative motion
  Pointer:     absolute motion (Qemu usb-tablet and IP-KVM devices)
  Touchpad:    relative motion via absolute touchpad coordinates
  Touchtool:   absolute motion (e.g., stylus)
  Touchscreen: absolute motion and finger (multi-) touch

Processing is done in two stages for one "input packet". First, all
events of the packet are recorded into the current evdev state with
device-type specific operations. Then, appropriate Genode input events
are generated from the accumulated evdev state in the submission stage
(again by device-type specific functions).

A simple version of tap-to-click was added to the touchpad support.

Fixes #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
a0e0000108 genode_c_api/event: absolute-motion events
Absolute motion events are generated by "tablet" devices, e.g., Qemu
usb-tablet and IP-KVM appliances like PiKVM.

Issue #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
5f2691a65b event_filter: transformation of motion coordinates
The <transform> filter configurably transforms touch and absolute-motion event
coordinates by a sequence of translation (move), scaling, rotation, and flipping
primitives in sub-nodes.

Issue #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
7304a019e7 event_filter: <log motion="true"> attribute
Per default, only key presses and releases are logged. The optional
'motion' attribute (boolean) enables logging of motion and touch events.

Issue #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
17724c5f1c virt_linux: enable magic mouse/trackpad HID
Issue #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
ca9b5e3f56 virt_lx_emul: update initcalls
- SMSC95xx usb net
- HID multitouch / magicmouse
- no SMP / timer broadcast on arm_v7
- no IPv6

Issue #5105
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
fccf025d2f usb_hid: enable driver level multi-touch support
This commit enables generic Linux multi-touch support as well as support
for the Wacom Intuos/Graphire tablets as found in the previous version
of the USB HID driver. Events are not properly propagated through
Genode's Event C-API, yet, which will be a follow up.

Issue #5105
2024-02-26 08:59:09 +01:00
Christian Helmuth
c57b841556 Fix link of jitterentropy port
The current port of jitterentropy is version 1.2.0 from pre-2017, whose
sources were recently moved to

  http://www.chronox.de/jent/releases/historic/jitterentropy-1.2.0.tar.xz

Note the *historic* label.

Issue #5112
2024-02-26 08:59:09 +01:00
Christian Prochaska
a1b5ebeb09 depot_query: add support for bin and dbg archives
Fixes #5110
2024-02-26 08:59:09 +01:00
Christian Prochaska
0bc2e240bf monitor: always respond to qXfer:memory-map:read
Fixes #5109
2024-02-26 08:59:08 +01:00
Johannes Schlatow
d23e1a87dd vfs_import: truncate files before writing
genodelabs/genode#5107
2024-02-26 08:59:08 +01:00
Christian Helmuth
6a94b8d153 Remove obsolete lx_kit_setjmp library
Issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
37736016fb usb_hid: adjust to arm_v7 UP and RCU tiny
Adjust source.list and dummies

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
5f1b0a5945 usb_net: adjust to arm_v7 UP and RCU tiny
Adjust source.list and dummies

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
a5f72ec095 lxip: adjust to arm_v7 UP and RCU tiny
Adjust source.list and dummies

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
7e8661f8bf virt_linux: disable SMP for arm_v7 and change to tiny rcu
When SMP is enabled multicore specific instructions (e.g., pldw) are
generated. These are not supported and lead to invalid instruction
faults on uni-processor systems (like Cortex-A8). Therefore, we disable
SMP for arm_v7 in Linux code. This requires also a switch from the RCU
tree implementation to RCU tiny, which we shadow and dummy implemented.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
651eb9d4f2 lx_emul/random: do not use jitterentropy in case initialization failed
Until now, in case 'jent_entropy_init' failed an error has been produced
and the following jitterentropy functions (i.e.,
'jent_entropy_collector_alloc') where called nevertheless. In case we
received a bad time source error, for example because the performance
counters are not working on the platform, the entropy collector did not return (endless
loop).

Therefore, this commit treats the failed jitterentropy initialization
not as an error but prints a warning about poor randomness quality and
stops using the jitterentropy library from this point on. The
'Jitterentropy::gen_random_u64' will in this case return the address of
a stack variable * some counter.

This is only a interim solution to make platforms work where performance
counters or TSC values do not exist/work.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
8c9b23ef56 test-libc_connect: use black hole as Uplink for lxip
For connection timeout test, create uplink domain via the 'black_hole'
that is only reachable through the nic_router.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
05283ac247 test/libc_connect: use IP outside of domain for timeout
The IP for the connect timeout test should be in another nic_router
domain, so ARP request are only processed be the nic_router and no other
IP stacks.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
240819b708 black_hole: add support for Uplink client
The uplink client simply drops and acknowledges packets it receives.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
61115c3776 depot_autopilot: adjust RAM quotas for lxip
Adjust the autopilot tests that use lxip to the lower RAM requiremnts of
lxip (old and new).

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
fb4ac714b2 recipes: adjust runtime quotas to lxip
lxip (old and new) requires less RAM now.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
561a9e7a72 vfs_lxip: adapt to 'genode_socket' C-API
Adjust the plugin to use the socket C-API found under
dde_linux/src/lib/lxip/include/genode_c_api/socket.h'.

This is the first minor step in generalizing the plugin.

isse #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
93b3e7d12f libc: socket_fs_plugin add monitor call
Add monitor call for '_fd_read_ready' because this maps to 'poll' in
'vfs_lxip' which should be executed by the EP.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
701856b06a dde_linux: copy vfs_lxip -> vfs_legacy_lxip
Make a copy of vfs_lxip so it can be revived easily. The plugin can now
be used like

! <legacy_lxip dhcp="yes"/>

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
27b1017fe9 test/lxip_raw: test using Genode socket C-API directly
The lxip_raw.run script will spawn a client/server scenario that tests
Genode C-API calls. The scenario can be used standalone, meaning no
actual network card is required.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
42d9640443 lxip: update to Linux 6.1.20
This commit updates lxip from version 4.4.3 to 6.1.20. It uses the
current lx_kit approach and is a shared library again. The stack has
been tested for x86_32/x86_64/arm_v6/arm_v7/arm_8.

The C-interface of the IP stack can be found under
lxip/include/genode_c_api/socket.h.

issue #5104
2024-02-26 08:59:08 +01:00
Sebastian Sumpf
c2080ecc03 linux.port: lxip_ip_config.patch
The patch makes it possible to re-configure the IP settings via DHCP or
static.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
bcb4b231af linux.port: lxip_checksum_32.patch
CONFIG_X86_USE_PPRO_CHECKSUM is a 'def_bool y' and gets re-enabled by
'make olddefconfig'. The PPRO version contains text relocations which we cannot
have in binaries (e.g., 'lea 45f(%ebx ...).').

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
364e58097d lx_emul: prevent division by zero
Check if ceil is <= 1 to prevent division by zero in
'__get_random_u32_below'.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
a0840d7a06 lx_emul/shadow: uaccess_32/64
Expand shadow header with '__copy_from_user_inatomic_nocache' and/or
'__copy_from_user_flushcache'.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
1006e9d987 lx_emul/x86_32: atomic64 set and cmpxchg
64-Bit versions for 32-Bit architecture.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
8c26a142c6 lx_emul: spinlock add bh_enable/disable
add bottom half enable/disable to functions with suffix "_bh" were
missing, because some functions release the bottom half separately
(__neigh_event_send).

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
c2a2ed67bb lx_kit/lx_emul: support explicit init call
Add the possibility to execute a module-init call by name using
'lx_emul_init_call', this is used, for example, by lxip to configure and
re-configure the IP address through 'ip_auto_config'.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
7abe07e2cf lx_emul/virt: remove stop from 'rcu_barrier' dummy
issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
df459c46ef usb_net: adjust to virt_linux config changes
* remove dummies for '__alloc_pages' and friends

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
5dc4ee6524 wireguard: adjust to virt_linux config changes
* remove dummies for '__alloc_pages'
* adjust arm_64 -> arm_v8
* remove IPv6 dummies (disabled in virt_linux)

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
7395f24423 virt_lx_emul: add shadow 'page_alloc.c'
Add suspport for '__alloc_pages' in virt_linux

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
7d62b891f8 virt_linux api: adjust to lx_kit split of arm_v(6|7|8)
Adjust API path.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
e21e32a793 virt_linux: disable IPv6
Will be re-enabled with IPv6 support of lxip.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
c2650cd1e7 virt_linux_generated: sort dep.list
sort 'dep.list' using LC_ALL=C.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
360d38c36d dde_linux: move lxip -> legacy_lxip
move lxip stack to 'legacy_lxip' so it can be revived easily.

issue #5104
2024-02-26 08:59:07 +01:00
Sebastian Sumpf
f19cd8416e lx_kit: split includes and setjmp into arm_v(6|7|8)
Move 'arch_execute.h' headers and 'setjmp/longjmp' implementation from
arm/arm_64 to arm_v(6|7|8).

issue #5104
2024-02-26 08:59:07 +01:00
Martin Stein
1336b0a751 mmio: upper-bounds checks
The classes Genode::Mmio, Genode::Register_set, Genode::Attached_mmio, and
Platform::Device::Mmio now receive a template parameter 'size_t SIZE'. In each
type that derives from one of these classes, it is now statically checked that
the range of each Genode::Register::Register- and
Genode::Register_set::Register_array-deriving sub-type is within [0..SIZE).

That said, SIZE is the minimum size of the memory region provided to the above
mentioned Mmio classes in order to avoid page faults or memory corruption when
accessing the registers and register arrays declared inside.

Note, that the range end of a register array is not the end of the last item
but the end of integer access that is used for accessing the last bit in the
last item.

The constructors of Genode::Mmio, Genode::Attached_mmio, and
Platform::Device::Mmio now receive an argument 'Byte_range_ptr range' that is
expected to be the range of the backing memory region. In each type that derives
from on of these classes, it is now dynamically checked that 'range.num_bytes
>= SIZE', thereby implementing the above mention protection against page faults
and memory corruption.

The rest of the commit adapts the code throughout the Genode Labs repositories
regarding the changes. Note that for that code inside Core, the commits mostly
uses a simplified approach by constructing MMIO objects with range
[base..base+SIZE) and not with a mapping- or specification-related range size.
This should be fixed in the future.

Furthermore, there are types that derive from an MMIO class but don't declare
any registers or register arrays (especially with Platform::Device::Mmio). In
this case SIZE is set to 0. This way, the parameters must be actively corrected
by someone who later wants to add registers or register arrays, plus the places
can be easily found by grep'ing for Mmio<0>.

Fix #4081
2024-02-26 08:59:07 +01:00