Commit Graph

709 Commits

Author SHA1 Message Date
Norman Feske
a8667a55bd test/framebuffer/intel: use VFS, not of fs session
This patch updates the intel_fb_controller test component to use the VFS
API instead of interacting with an file-system session directly.

Issue #4390
2022-02-15 10:11:11 +01:00
Christian Helmuth
65284b29f8 depot: update recipe hashes 2022-01-19 12:38:13 +01:00
Sebastian Sumpf
f16c1b5ea8 usb_host: handle full packet stream correctly
Thanks to Peter for the fix!

Fixes #4383
2022-01-19 12:38:13 +01:00
Christian Helmuth
a80b2ee6e2 Increase cap quota of drivers_nic-imx6/7 for sel4 2022-01-19 12:38:13 +01:00
Stefan Kalkowski
7db602faec os: deprecate platform API for x86, rpi, imx53
* Move platform APIs to "legacy/" subdirectory
* Rename old pc, imx53, and rpi platform_drv
  to "legacy_*_platform_drv"

Fix #4359
2022-01-19 12:38:12 +01:00
Norman Feske
5611fd2355 depot: update recipe hashes 2021-12-17 15:06:38 +01:00
Stefan Kalkowski
b11731d6b2 dde_linux: silent warning in fork
When initializing a task_struct within the lx_emul library
we have to temporarily use a big object on the stack.

Ref #4344
2021-12-17 15:04:48 +01:00
Norman Feske
5bd8fa9678 dde_linux: avoid implicit conversions
Issue #23
2021-12-17 15:04:45 +01:00
Christian Helmuth
92b7be4d11 depot: update recipe hashes 2021-11-30 12:08:54 +01:00
Norman Feske
dc39a8db62 base: introduce Allocator::try_alloc
This patch changes the 'Allocator' interface to the use of 'Attempt'
return values instead of using exceptions for propagating errors.

To largely uphold compatibility with components using the original
exception-based interface - in particluar use cases where an 'Allocator'
is passed to the 'new' operator - the traditional 'alloc' is still
supported. But it existes merely as a wrapper around the new
'try_alloc'.

Issue #4324
2021-11-29 15:11:52 +01:00
Josef Söntgen
059c7ed74a dde_linux: prevent debug message in memory backend
The Allocator_avl back end will display diagnostic messages if the
address to be freed is not at the beginning of a block. This happens
regulary when 'struct page' objects are not freed in allocation order.

Issue #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
49bf58a2ae lx_kit: free dataspace interface
Allow for freeing of manually managed dataspaces.

Fixes #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
327ec61ee3 lx_kit: get buffer dataspace from virt addr
Introduce a method to access the dataspace capability of the underlying
backing store for a memory allocation. This is necessary for drivers
where the memory is managed manually and the capability needs to be
given to a client.

Issue #4325.
2021-11-29 15:10:53 +01:00
Josef Söntgen
cd7a65a313 dde_linux: extended pgtable header for etnaviv
The 'pgprot_noncached' function is referenced by the driver code.

Issue #4325.
2021-11-29 15:10:53 +01:00
Stefan Kalkowski
23514bf5c2 dde_linux: add runqueues symbol for -O0 build 2021-11-29 15:10:53 +01:00
Norman Feske
449f647e58 dde_linux: lx_emul interface for GPIO pin access
This patch introduces the lx_emul/pin.h interface that enables GPIO stub
drivers to interact with Genode's Pin_control and IRQ sessions via a
simple C API.

Fixes #4316
2021-11-29 15:10:52 +01:00
Stefan Kalkowski
b12b0ed93d imx8q_evk: remove board support from repository
Moved to separate repo at https://github.com/skalk/genode-imx/

Fix #4301
2021-11-29 15:10:51 +01:00
Tomasz Gajewski
332cfb38c1 usb_host: fix MMU fault on rpi2 and rpi3 2021-11-29 15:10:51 +01:00
Christian Helmuth
abc9a2f232 depot: update recipe hashes 2021-10-14 13:46:25 +02:00
Stefan Kalkowski
c976a1d7e0 dde_linux: iterate over device names not types
To clearly identify the correct device use the unique device's name
not the type. Otherwise a driver cannot drive several devices of the
same type.

Fix #4297
2021-10-14 11:02:15 +02:00
Josef Söntgen
8679f32d0b dde_linux: backport update event ring for usb_host
This commit contains a backport of commit [1] that deals with updating
the event ring dequeue pointer more often to prevent unnecessary
'Event Ring Full' errors.

  [1] 'usb: host: xhci: update event ring dequeue pointer on purpose'
      (dc0ffbea5729a3abafa577ebfce87f18b79e294b)

Fixes #4296.
2021-10-14 11:02:15 +02:00
Stefan Kalkowski
cb67d07e61 lx_emul: be compliant to original softirq impl.
Ref #4268
2021-10-14 11:02:10 +02:00
Stefan Kalkowski
f4cb5cc299 dde_linux: preserve Io_signal_handler for IRQs
Do not construct/destruct signal handlers for interrupts dynamically,
but only the Irq session to prevent a deadlock.

Fix #4272
2021-10-13 14:46:54 +02:00
Stefan Kalkowski
6ae55d490b lx_emul: restrict allocations to minimal alignment
* Use the architecture-dependent minimal alignment for all allocations,
  e.g. on ARM it is necessary to have cacheline aligned allocations for DMA
* Remove the allocation functions without alignment from generic API
* Fix a warning

Fix #4268
2021-10-13 14:46:54 +02:00
Stefan Kalkowski
2ac8620f44 lx_emul: invalidate cache for DMA-read only
After a DMA transaction do only invalidate cachelines from the
corresponding DMA buffers if data got transfered from device to
CPU, and not vice versa. Otherwise it might result in data corruption.

Ref #4268
2021-10-13 14:46:54 +02:00
Stefan Kalkowski
d8c344f6b9 lx_emul: do not block kworkers unconditionally
Ref #4268
2021-10-13 14:46:54 +02:00
Stefan Kalkowski
f8cf0442ed lx_emul: implement lookup of dma-addr to virt-addr
* Use the new Lx_kit::Map as lookup structure for virt-to-dma and vice versa,
  instead of a list-based registry

Ref #4268
2021-10-13 14:46:54 +02:00
Stefan Kalkowski
9bc7ecb605 lx_emul: provide alignment for DMA allocations
Ref #4268
2021-10-13 14:46:54 +02:00
Norman Feske
d072c408ab dde_linux: call init_page_count for each page
The lx_emul_virt_to_pages implementation initialized the page ref
counter only for the first page, leaving the remaining elements in
uninitialized state. This, in turn, rendered the Linux page_pool (as
used by the emac network driver) ineffective, ultimately leading the a
memory leak. The fix changes the call of 'init_page_count' to take the
loop variable as argument.

Issue #4225
2021-10-13 14:02:16 +02:00
Norman Feske
914a41a8bd dde_linux: adjustments for Linux 5.14.1
Issue #4259
2021-10-13 14:01:03 +02:00
Christian Helmuth
83c5648d33 depot: update recipe hashes 2021-08-30 15:00:39 +02:00
Christian Helmuth
a362505e8a usb_host: report bInterfaceProtocol too
Thanks to Raphael for the patch.
2021-08-30 15:00:38 +02:00
Norman Feske
324ad33736 lx_emul: prevent clk_disable_unused
Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
2cb4157211 lx_emul: support IRQCHIP_DECLARE initcalls
Similar to CLK_OF_DECLARE, this patch extends lx_emul with ability to
extend the __irqchip_of_table with secondary interrupt controllers.

Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
c95af254f4 lx_emul: sanitize size 0 for __kmalloc
Driver code such as mfd-core.c may pass 0 as argument n to kcalloc,
which eventually results in an allocation size 0.

  res = kcalloc(cell->num_resources, sizeof(*res), GFP_KERNEL);

Since 'res' is checked against NULL for success, kmalloc must not return
a NULL pointer in this case. The patch works around this issue by
forcing an allocation size of 1 byte in this case.

Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
29032caf40 lx_emul: support CLK_OF_DECLARE initcall mechanism
Clock providers such as drivers/clk/sunxi-ng/ccu-sun8i-r.c don't use
regular init calls but declare their init functions via CLK_OF_DECLARE,
which fill the __clk_of_table. Linux populates the table statically by
using special sections declared in the linker script. In contrast, we
populate the table by expanding the macro to global constructor
functions.

The __clk_of_table is then processed by the call of of_clk_init(NULL).

Issue #4253
2021-08-30 15:00:36 +02:00
Norman Feske
36af114d78 lx_emul: enhance krealloc implementation
Issue #4253
2021-08-30 15:00:36 +02:00
Christian Helmuth
7618c9410a depot: update recipe hashes 2021-08-18 15:06:12 +02:00
Sebastian Sumpf
2fe70f111b intel_fb_drv: Aperture exhaustion and display IRQ patch
* display an error in case the aperture is too small for all
  framebuffers
* handle display engine IRQs only

issue #4233
2021-08-18 15:06:11 +02:00
Christian Helmuth
fce525f122 depot: update recipe hashes 2021-07-28 11:27:05 +02:00
Stefan Kalkowski
1a526e73a3 dde_linux: introduce new lx_emul/lx_kit library
The re-newed approach currently supports ARM 64-bit only.
It depends on the Platform API of the ARM architecture.
It tries to meet the original semantic of the Linux kernel
functions as far as possible. To achieve this, device drivers
using this library should reference the original Linux kernel
headers at foremost. Only the headers in `src/include/lx_emul/shadow`
have to shadow clone the original ones.

Fix #4225
2021-07-28 11:27:04 +02:00
Johannes Schlatow
1aba330ae6 dde_linux: fix packet size calc. of Nic drivers
skb_push() already increases the skb->len by ETH_HLEN, hence adding
ETH_HLEN to the packet_size is redundant.

A too large packet size becomes a problem for large MTUs. With a maximum
MTU of 1500, adding ETH_HLEN twice will lead to a packet size of 1528.
Since this is larger than what we expect for good-old Ethernet (max. 1522),
some clients (e.g. the e1000 model in vbox5) may drop these packets.

Fixes genodelabs/genode#4228
2021-07-28 11:27:04 +02:00
Stefan Kalkowski
b16bb82f8b dde_linux: mark lx_emul and lx_kit as legacy
* Move headers in src/include into legacy sub-directory
* Move src/lx_kit to src/lib/legacy/

Fix #4223
2021-07-28 11:25:21 +02:00
Martin Stein
388e2a0e6d fec nic driver: fix compiler warnings
Fixes #4178
2021-07-28 11:24:55 +02:00
Christian Helmuth
ece33d37f8 depot: update recipe hashes 2021-06-25 11:46:37 +02:00
Sebastian Sumpf
a58473dece autopilot: add usb_hid_reconnect run script
- Adjust script to run on Qemu x86 only

fixes #4205
2021-06-25 11:43:41 +02:00
Martin Stein
0dc7084b0f wifi_drv: fix compile warnings with gcc 10
Fixes #4202
2021-06-25 11:41:45 +02:00
Johannes Schlatow
7346defc26 usb_modem_drv: remove nic_server mode
genodelabs/genode#4201
2021-06-25 11:41:45 +02:00
Johannes Schlatow
dff1df0b49 usb_modem: do not fail on netif_stop_queue
genodelabs/genode#4201
2021-06-25 11:41:45 +02:00
Johannes Schlatow
52a4293bbc depot: add usb_modem_drv archives
genodelabs/genode#4201
2021-06-25 11:41:44 +02:00