Commit Graph

3119 Commits

Author SHA1 Message Date
Christian Helmuth
dc0e78cdf8 depot: update recipe hashes 2024-04-12 15:08:01 +02:00
Johannes Schlatow
8b43554a27 gpu/intel: do not clflush on MMIO but on ppgtt
Executing a clflush operation on MMIO memory freezes embedded
platforms such as the Celeron N3450 used on the ZimaBlade. Looking into
the current linux code confirms that clflush is only used for ppgtt
entries and not on MMIO memory.

Fixes #5176
2024-04-12 15:08:01 +02:00
Johannes Schlatow
7a042925fc platform: catch denied IO_MEM-session
In case core denies an IO_MEM session, the platform driver should
survive and hand out an invalid capability instead.

genodelabs/genode#5174
2024-04-12 15:08:01 +02:00
Christian Helmuth
fd5f8c0ee1 fb_sdl: filter key-repeat events (fixes #5172) 2024-04-12 15:08:00 +02:00
Josef Söntgen
b2a68211a4 black_hole: add Play and Record session
This commit introduces support for the Play and Record session to
the black hole component in the most minimal way possible.

Fixes #5157.
2024-04-12 15:08:00 +02:00
Josef Söntgen
600e5424a5 os: add pkg for record_player_mixer
Issue genodelabs/genode#5167.
2024-04-12 15:05:47 +02:00
Josef Söntgen
2da94bb702 os: add record_rom pkg recipe
Issue genodelabs/genode#5167.
2024-04-12 15:05:46 +02:00
Stefan Kalkowski
2f0fe562ec os: packet_allocator needs size for free
Unlike the previous return value of
`Genode::Packet_allocator::need_size_for_free()` indicated, it does need
the size of the object it has to free to work properly.
2024-04-12 15:05:14 +02:00
Christian Prochaska
2eae70d3cd os/vfs.h: add support for symlink creation
Fixes #5162
2024-04-12 15:00:44 +02:00
Christian Helmuth
960670b16c decorator: fix handling of back-most window
Before, the current back-most window was not restacked if it was part of
the already, which lead to partially inconsistent view of the window
stack between decorator and nitpicker.
2024-04-12 15:00:44 +02:00
Josef Söntgen
ff728eb6ce usb_block: fix 'Request_sense_repsonse' MMIO size
Due to a bug in the original implementation, the size of the MMIO
range covering the 'Request_sense_response' data was set too large
during the MMIO boundary change. This rendered devices that were not
yet ready and required an 'Request_sense' command unusable.

The commit also adapts all other commands where the MMIO size does
not match the expected one.

Fixes #5133.
2024-04-12 15:00:44 +02:00
Alexander Boettcher
d0d9cb6a73 uplink: support batching in client base header
Add support for Uplink drivers to batch requests.

Fixes #5149
2024-04-12 15:00:43 +02:00
Norman Feske
956ec2f84c pkg/test-read_only_rom: adjust quota for sel4 2024-04-12 12:57:30 +02:00
Norman Feske
3052260249 Adjust terminal_crosslink RAM quota for seL4
The dynamic buffer allocation increases the RAM demand slightly beyond
1M on seL4. Use 2M, as is already the default in pkg/terminal_crosslink.

Issue #5135
2024-04-12 12:57:30 +02:00
Stefan Kalkowski
7ec08af6d9 usb: session renewal & new client API
Replace the USB session API by one that provides a devices ROM only,
which contains information about all USB devices available for this client,
as well as methods to acquire and release a single device.

The acquisition of an USB device returns the capability to a device session
that includes a packet stream buffer to communicate control transfers
in between the client and the USB host controller driver. Moreover,
additional methods to acquire and release an USB interface can be used.

The acquisition of an USB interface returns the capability to an interface
session that includes a packet stream buffer to communicate either
bulk, interrupt, or isochronous transfers in between the client and the
USB host controller driver.

This commit implements the API changes in behalf of the Genode C API's
USB server and client side. Addtionally, it provides Usb::Device,
Usb::Interface, and Usb::Endpoint utilities that can be used by native
C++ clients to use the new API and hide the sophisticated packet stream API.

The adaptations necessary target the following areas:

* lx_emul layer for USB host and client side
* Linux USB host controller driver port for PC
* Linux USB client ports: usb_hid_drv and usb_net_drv, additionally
  reduce the Linux tasks used inside these drivers
* Native usb_block_drv
* black_hole component
* Port of libusb, including smartcard and usb_webcam driver depending on it
* Port of Qemu XHCI model library, including vbox5 & vbox6 depending on it
* Adapt all run-scripts and drivers_interactive recipes to work
  with the new policy rules of the USB host controller driver

Fix genodelabs/genode#5021
2024-04-12 12:57:30 +02:00
Christian Prochaska
7ae7b8481a monitor: send a notification when an inferior vanished
Fixes #5139
2024-04-12 12:57:28 +02:00
Norman Feske
913196e2dc record_play_mixer: smoothen time-window allocation
This patch modifies the mixer's time window allocation by modelling the
drift of the period length over time. This yields a much better
stability of the detected sample rates in the presence of jitter.

Issue #5132
2024-04-12 12:57:28 +02:00
Christian Prochaska
3dbe398252 test-monitor: increase buffer size
Issue #5137
2024-04-12 12:57:28 +02:00
Christian Prochaska
d1a750c528 monitor: make maximum GDB response size configurable
Fixes #5137
2024-04-12 12:57:28 +02:00
Christian Prochaska
011a521968 os: make 'terminal_crosslink' buffer size configurable
Fixes #5135
2024-04-12 12:57:27 +02:00
Alexander Boettcher
32cb245cb8 ahci: enable conversion error checking
Fixes #5134
2024-04-12 12:55:39 +02:00
Christian Helmuth
706e341d3a trace_logger: read 'buffer' as Number_of_bytes 2024-03-04 15:50:03 +01:00
Christian Helmuth
9c7a303caf depot: update recipe hashes 2024-02-29 11:08:28 +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
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
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
Christian Prochaska
080d3b6b63 vfs: support watch handlers on application signal level
Fixes #4092
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
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
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 Prochaska
0bc2e240bf monitor: always respond to qXfer:memory-map:read
Fixes #5109
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
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
Pirmin Duss
55007f5bd9 i2c: bus speed configuration node
I2C EEPROMs of the type at24xxx are really slow (ca. 10 kHZ).

This adds the `bus_speed_khz` attribute to the config of the driver and
adapts the i.MX8 driver to support the feature.

Issue gapfruit#1996
Fixes genodelabs#5090
2024-02-26 08:31:05 +01:00
Norman Feske
0d34988929 test.run: remove obsolete boot-module heuristic
The ROMs of built executables and shared objects are now covered by the
[build_artifacts].

Issue #4860
2024-02-26 08:31:04 +01:00
Christian Helmuth
092e4a001f usb_hid: mode led handling to shadow input-leds.c
The former implementation relied on input drvdata always pointing to
struct hid_device, which is not true for Wacom touch devices (at least).
Now, we implement the input handler for devices providing LEDs
(evbit[EV_LED] set) only and use input_inject_event() to set the LED
states.
2024-02-26 08:31:04 +01:00
Alexander Boettcher
c2cd4102d8 gpu/intel: prepare GPU structures for resume
The commit is a preparation commit for suspend/resume. It prepares the GPU
structures relying on gmadr.cap() (MMIO) to be re-constructible by applying
the with* pattern to context, ring_buffer and ggtt mmio map. It removes
the managed dataspace handling of gmadr subsets to make the with_* pattern
possible.

Issue #5081
2024-02-26 08:31:03 +01:00
Alexander Boettcher
d02f4866ea gpu/intel: make platform resources reconstructible
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 GPU 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.

With this change, it will be possible in follow up commits, to release
the platform device and to re-acquire it and its resources, e.g. mmio, irq,
gmadr.

Issue #5081
2024-02-26 08:31:03 +01:00
Norman Feske
87993a864c input/event.h: axis ids LX, LY, LT, RX, RY, and RT
The axis IDs correspond to 2x analog sticks with 2 axes and 2x triggers.
While being at it, the commit changes the Axis_id type to Axis::Id.

Fixes #3669
2024-02-26 08:31:03 +01:00
Christian Prochaska
602f9b5670 monitor: remove 'flush_thread()' error message
Fixes #5082
2024-02-26 08:31:03 +01:00
Christian Helmuth
4a2319a4d6 os: limit backtrace to stack of current thread
The frame-pointer-based backtrace does not work without enabling
-fno-omit-frame-pointer explicitly and in most cases leads to page
faults because non-pointer stack values are dereferenced during the
walk. The best we can do is to limit the backtrace walk to the stack of
the current thread to prevent page faults unrelated to the system state
without the use of the backtrace utility.

This commit introduces a printable Backtrace class usable in
Genode::log(), Genode::trace(), etc. The class is based on the new
function for_each_return_address(auto const &fn) that walks the stack in
its limits and calls fn() for each discovered return address on the
stack in the new os/include/os/backtrace.h. Archtecture-specific
stack-pointer retrieval and walk loops are implemented in dedicated
os/include/spec/<arch>/os/for_each_return_address.h files. Also, the
well-known Genode::backtrace() function (which logs the return-address
values) is provided for backwards compatibility.

Fixes #5078
2024-02-26 08:31:02 +01:00