Commit Graph

13003 Commits

Author SHA1 Message Date
Stefan Kalkowski
0d1e4bf8d5 Remove orphaned usb_terminal (fix #5130) 2024-02-28 16:32:23 +01:00
Stefan Kalkowski
88c347ee00 usb_hid_reconnect.run: use distinct device-ids
Newer Qemu variants quit with an error about already existing devices
if the same device-id is add and removed in a loop fast. To circumvent
this strange behaviour, simply use consecutive device id numbers.

Ref genodelabs/genode#5021
2024-02-28 16:32:23 +01:00
Christian Prochaska
32e7ec7b9b core: implement 'Vm_session_component::reserve_and_flush()'
Issue #5069
2024-02-28 16:32:23 +01:00
Sebastian Sumpf
9a65e4f607 mesa: generalize binder memory management
This patch was back ported from upstream Mesa and generalizes the memory
management of buffer objects used by the binder. Before this patch the
binder was treated as a special case where buffer objects were allocated
with a simple "next block or wrap" allocator. With this commit the
binder now uses the vm_heap allocators as done by all other buffer
allocations which leads to issues with reference counting and object
destruction being resolved.

Original commit message:

We're moving towards a path where all contexts share the same virtual
memory - because this will make implementing vm_bind much easier - ,
and to achieve that we need to rework the binder memzone. As it is,
different contexts will choose overlapping addresses. So in this patch
we adjust the Binder to be 1GB - per Ken's suggestion - and use a real
vma_heap for it. As a bonus the code gets simpler since it just reuses
the same pattern we already have for the other memzones.
2024-02-28 16:32:23 +01:00
Norman Feske
b370591e64 Mobile version of Sculpt OS
This patch contains the mobile variant of Sculpt OS, which evolved
at the genode-allwinner repository until now. In consists of the
following parts:

- gems/src/app/phone_manager  plays the role of the sculpt manager
- sculpt/phone-linux          allows for test driving the mobile
                              variant on base-linux
- gems/src/app/dummy_modem    mockup of a modem's behavior, used for
                              GUI development and testing

The parts targeting a specific device (PinePhone) remain local to
the genode-allwinner repository.

To give it a try:

  make run/sculpt_test KERNEL=linux BOARD=linux \
                       SCULPT=phone LOG=core DEPOT=tar

Fixes #5125
2024-02-28 16:31:46 +01:00
Christian Prochaska
ea51f1ffda monitor: limit the 'm' command response size
Fixes #5119
2024-02-28 16:31:46 +01:00
Christian Prochaska
aa6f99b0a4 monitor: report all stopped threads on '?' command
Fixes #5120
2024-02-28 16:31:46 +01:00
Alexander Boettcher
12df9bf450 gpu/intel: make aperture configurable
Fixes #5124
2024-02-28 16:31:46 +01:00
Alexander Boettcher
77f5ef3bcd nvme: release device before suspend
- monitor system ROM changes
- stop processing of new Jobs before suspend
- destruct platform device before suspend, but keep platform DMA buffers
- re-construct platform device and reinit resources (mmio, irq) on resume
- re-start block job scheduling on resume

Fixes #5101
2024-02-28 16:31:46 +01:00
Alexander Boettcher
9d15735bc6 ahci: release device before suspend
- monitor system ROM changes
- stop processing of new Jobs before suspend
- destruct platform device before suspend, but keep platform DMA buffers
- re-construct platform device and reinit resources (mmio, irq) on resume
- re-start block job scheduling on resume

Issue #5101
2024-02-28 16:31:46 +01:00
Alexander Boettcher
cde4d4aee0 ahci: refactor code for suspend/resume
This commit is a preparation commit for suspend/resume. The commit
refactors the code in order to consolidate all Platform resources into one
instance. All users within the driver should access the resources with
with_* functions, which checks whether the device resource is usable. The
callers are not allowed to store any references to the provided resources.

Issue #5101
2024-02-28 16:31:46 +01:00
Alexander Boettcher
8b3a339817 acpi_suspend: add nvme & ahci tests
- update documentation
- add nvme und ahci + test case
- fix minor configuration issues of GPU test case

Issue #5101 #5081
2024-02-28 16:31:45 +01:00
Alexander Boettcher
bf6c484c13 gpu/intel: use with(fn, fn_error) pattern
Issue #5081
2024-02-28 16:31:45 +01:00
Alexander Boettcher
0684101ff0 gpu/intel: release device before suspend
- monitor system ROM changes
- stop processing of new Jobs before suspend
- destruct platform device before suspend, but keep platform DMA buffers
- re-construct platform device and reinit resources (mmio, irq) on resume
- re-start GPU job scheduling on resume

Fixes #5081
2024-02-28 16:31:45 +01:00
Christian Prochaska
4ce4d4120a qt5: define BUILD_ARTIFACTS
Fixes #5122
2024-02-28 16:31:45 +01:00
Josef Söntgen
35638568c5 qemu-usb: access I/O buffers directly
This commit replaces the mapping of DMA buffers and gets rid of the
bounce-buffer handling, which was introduced to prevent data
corruption noticed when utilizing USB storage with Windows 10 guests,
with accessing the buffers directly.

Due to the way Windows 10 at times manages its DMA memory (many small
pieces instead of few larger ones) the unbounded registry becomes a
problem when containing stale entries.

Changing the 'qemu-usb' implementation allows for using 'read_dma'
and 'write_dma' directly.

Fixes #5121.
2024-02-28 16:31:45 +01:00
Christian Prochaska
cda48b4a49 sculpt: add base binary archive path to build_info ROM
Fixes #5118
2024-02-28 16:31:45 +01:00
Norman Feske
5073cba536 dde_bsd: support record and play session interface
This patch enhances the audio driver with the option to operate as a
client of the record and play services instead of providing the audio-in
and audio-out services. The record/play mode can be enabled by setting
the 'record_play="yes"' config attribute.

The audio_in.run and audio_out.run scripts support the selection of the
mode via the 'use_record_play_sessions' hook function.

Issue #5097
2024-02-28 16:31:45 +01:00
Norman Feske
18c4393106 dde_bsd: coding style
Remove superflouous Genode:: prefixes, name Main members as private,
change signal "dispatcher" to "handler".
2024-02-28 16:31:45 +01:00
Sebastian Sumpf
ff1e4b1bfb vfs_lxip: return error in case peek read returns EAGAIN
A read with MSG_PEEK returns -1 and EGAIN/EWOULDBLOCK in case the socket
is connected. Zero is only returned if the socket is disconnected.

isuee #5104
2024-02-28 16:31:45 +01:00
Sebastian Sumpf
7cbce1f47c libc: socket_fs_plugin handle MSG_PEEK reads
In case the socket is non-blocking, a read with the MSG_PEEK flag set
has to return -1 and EWOULDBLOCK/EAGAIN in case no data is availble and
the socket is connected. Returning zero implies the socket is in
non-connected state. Therefore, check the connection state in this
situation and return accordingly.

issue #5104
2024-02-28 16:31:45 +01:00
Christian Helmuth
0b63bb91b6 run/nova: cleanup hypervisor binary handling
With the following changes, the hypervisor binary from bin/ as well as
from depot archives is taken as is and not unnecessarily turned inside
out.

- Remove objcopy -O elf32-i386 as our grub boots 64-bit binaries
  very well
- Remove strip as bin/hypervisor is already stripped
2024-02-28 16:31:45 +01:00
Norman Feske
07669ac991 os: record-and-play session interfaces and mixer
- New session interfaces:
  - os/include/play_session   (for audio playing   / mic-input driver)
  - os/include/record_session (for audio recording / audio-output driver)
- Mixer at os/src/record_play_mixer providing both play and record services
- Simple waveform player at os/src/app/waveform_player
- Simple audio-signal capturing component at os/src/app/record_rom
- Simple oscilloscpe at gems/src/app/rom_osci (using record_rom)
- Simple test-audio_play for playing raw stereo f32 data

The _gems/run/waveform_player.run_ script illustrates the use of the new
components and interfaces.

Issue #5097
2024-02-28 16:31:45 +01:00
Josef Söntgen
914508bf7a lighttpd: streamline Genode specific patches
Issue #5093.
2024-02-26 08:59:10 +01:00
Christian Prochaska
080d3b6b63 vfs: support watch handlers on application signal level
Fixes #4092
2024-02-26 08:59:10 +01:00
Christian Helmuth
a529fffb7b Update jitterentropy to version 3.4.1
Fixes #5112
2024-02-26 08:59:10 +01:00
Christian Prochaska
fb2e0b50c8 os: 'Path_base::strip_double_dot_dirs()' improvements
Issue #5106
2024-02-26 08:59:10 +01:00
Christian Prochaska
7651c94bf5 os: add test for 'Genode::Path'
Issue #5106
2024-02-26 08:59:10 +01:00
Christian Prochaska
edba179497 qt5: fix debug link creation
Fixes #5116
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
394801c998 hw: re-name scheduler files according to class
Fix genodelabs/genode#5115
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
79167d8f5c hw: re-organize scheduler internals & API
* Move Kernel::Cpu_scheduler to Kernel::Scheduler
  (we only have that one scheduler)
* Move Kernel::Cpu_share to Kernel::Scheduler::Context
* Move Kernel::Cpu_priority to Kernel::Scheduler::Priority
* Rename all functions and variables refereing to `claims` to
  `prioritzed`, because claims is not that common
* Rename occurrences of `fill(s)` to `slack` to name the time portions
  outside of the prioritized quantum
* Get rid of some two-liner sub-functions with only one occurrence
  (like `_quota_introduction`, `_quota_revokation`,...)

Ref genodelabs/genode#5115
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
c8380c1447 hw: remove Cpu_scheduler::_trim_consumption
This private, internal function is used only in one scope,
and therefore not neccessary. But it has nasty side-effects as
it takes the parameter `duration` as reference and changes its
value. Just remove it completely.

Ref genodelabs/genode#5115
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
1c4078f23a hw: merge booleans in scheduler into one state
Instead of having `_yield` and `_need_to_schedule` booleans, use one
consistent state variable.

Ref genodelabs/genode#5115
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
9d72c21894 hw: rename head in scheduler to current
The name head is already extensively used in the context of the lists
managed by the scheduler. This terminology duplications does not simplify
reading the code. Instead we keep head for the first item in the list,
but use `current` in the variable name and API of the `Cpu_scheduler`
class to refer to the current scheduled share.

Moreover, the `_head_quota` is now `_current_time_left`, because it does
not denote quota but time left for the current schedule. The boolean
variable `_head_claims` gets removed at all. It duplicated the state of
whether a current share ist set, and whether it has so-called claim time
left.

Ref genodelabs/genode#5115
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
2f727fb5c6 hw: rename Cpu_scheduler variables
Give certain scheduler class wide variables and functions clear names:

* quota => super_period_length
* residual => super_period_left

Ref genodelabs/genode#5115
2024-02-26 08:59:10 +01:00
Stefan Kalkowski
8e2c95e5e4 hw: replace double_list implementation
Replace double linked list by normal Genode::List with an additional
pointer to last list member to efficiently handle the scheduler share lists.
Moreover, move it into the private part of the Cpu_scheduler class,
the only scope where it is used anymore.

Ref genodelabs/genode#5115
2024-02-26 08:59:09 +01:00
Stefan Kalkowski
0055438257 hw: improve readability of scheduler
Minor changes that should not change any semantics:

* Remove `_next_fill()` its short and only used in one context,
  in which it is good to know what that code actually does
* Turn boolean values into actual boolean values
* Remove some brackets around one-liner pathes

Ref genodelabs/genode#5115
2024-02-26 08:59:09 +01:00
Stefan Kalkowski
776c2a6046 hw: avoid state & code duplication in scheduler
The `_head_was_removed` variable got introduced in solving #4710, but it
reflects only whether `_head` is a valid pointer or not, thereby it
duplicates state.

Ref genodelabs/genode#5115
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
ecd7b0568b lx_emul: adjust import to lx_kit remove
'src/include/spec/x86' does no longer exist

issue #5104
2024-02-26 08:59:09 +01:00
Sebastian Sumpf
c12224ffd3 api/pc_linux: adjust to legacy lx_kit removal
With the removal of legacy lx_kit 'src/include/spec/x86' does not longer
exist in dde_linux.

issue #5104
2024-02-26 08:59:09 +01:00
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