Commit Graph

1178 Commits

Author SHA1 Message Date
Norman Feske
649647538b depot: update recipe hashes 2022-02-15 10:23:59 +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
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
Norman Feske
ec559b85e2 Add missing shared-object link dependencies
Issue #4408
2022-02-15 10:23:14 +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
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
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
Stefan Kalkowski
c99ca21649 rpi: remove drivers for platform, fb and sd_card
Fix #4396
2022-02-15 10:16:51 +01:00
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
Sebastian Sumpf
eabda8907f usb_host: add support to flush EP transfers
This causes all pending transfers of a EP to be canceled and in turn to
be acked by the raw session.

issue #4196
2021-06-25 11:41:44 +02:00
Martin Stein
ff128df131 dde_linux/fec: fix unsynchronized TX DMA write
Unfortunately, our current implementation of 'wmb()' doesn't seem to do what we
want it to do. On base-hw + imx6q_sabrelite, the write of bdp->cbd_sc seems to
get re-ordered after the write to txq->bd.reg_desc_active in the transmission
path of the contrib code. Due to this, the transmission of the packet is only
triggered the next time a packet is sent. However, we only quick-fix it by
enforcing the execution of the write with a volatile global read as we will
soon update the FEC NIC port with a new DDE approach anyway.

Fixes #4010
2021-06-25 11:41:44 +02:00
Alexander Boettcher
27004e1fd5 usb: remove monolithic usb driver
+ adjust README files

Fixes #4173
2021-06-25 11:41:43 +02:00
Stefan Kalkowski
8408bf6ac0 fec_nic_drv: remove nic_server mode
Issue #4133
2021-06-01 15:51:22 +02:00
Christian Helmuth
1d52bd017d depot: update recipe hashes 2021-05-28 14:16:46 +02:00
Christian Prochaska
f2ff1a6d52 dde_linux: save and restore ARM FPU state in setjmp.S
Fixes #4161
2021-05-28 14:16:45 +02:00
Christian Helmuth
f0b9549376 wifi_drv: optionally report MAC address
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
aab6f52325 wifi_drv: remove nic_server mode
Issue #4133
2021-05-28 14:16:45 +02:00
Christian Helmuth
4abc530974 ipxe_nic_drv: remove nic_server mode
Issue #4133
2021-05-28 14:16:45 +02:00
Josef Söntgen
0f72a342f3 wifi_drv: fix setting 'bssid' in config
The wpa_supplicant refuses to set the BSSID in case it is quoted.
Removing the quotes allows for specifying the BSSID in the
configuration.

Fixes #4175.
2021-05-28 14:16:45 +02:00
Alexander Boettcher
6b9fcc9449 drivers_interactive-rpi: use usb host/hid driver
Issue #4173
2021-05-28 14:16:45 +02:00
Sebastian Sumpf
7fcf9053b9 usb_hid: perform device destruction on unplug signal only
- Do not perform desctruction on report updatea in EP because
  'unregister_device' may block on Led state 'update' (synchronous
  control message) leading to the driver being stuck because no more
  signals are received
- Check if device is present in 'submit_urb' calls

fixes #4166
2021-05-28 14:16:44 +02:00
Sebastian Sumpf
6910b880e7 usb_host: make device creation/destruction robust
- Signal device ready depending on state (ready or not) immediately or
  when "actconfig" is set
- Report new devices when ready
- Drain packet stream in case there is no device present (needed for
  synchronous operations at client side)
- Do not use 'session_device' on device destruction, check pointer
  directly instead

issue #4149
2021-05-28 14:16:44 +02:00
Christian Helmuth
813f4d976b lxip: allocate skb with properly aligned IP header
Comment in Linux sources:

  Since an ethernet header is 14 bytes network drivers often end up with
  the IP header at an unaligned offset. The IP header can be aligned by
  shifting the start of the packet by 2 bytes. Drivers should do this
  with:

  skb_reserve(skb, NET_IP_ALIGN);

This is ensured when using netdev_alloc_skb_ip_align().

Issue #4094
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
a24224ffc3 usb_host: improve isochronous performance on Intel
This patch takes advantage of block transfer interrupts on Intel XHCI
controllers which is used during isochronous transfers. Because of a bug
in hardware (see usb_host_isoc_bei.patch header), this feature has been
disabled for Intel leading to up to 8000 interrupts/s for isochronous
transfer causing severe CPU consumption on Genode. With this commit we
lower host driver consumption to normal levels.

issue #4149
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
9543161827 usb_host: Move task to device in USB session
A Lx::Task is now associated to a USB device not the session any more.
This implies that a task lives as long as the device making it possible
to gracefully handle outstanding requests (i.e., synchronous) in case
the session has been closed.

issue #4149
2021-05-28 14:15:26 +02:00
Christian Helmuth
777923f9bd depot: update recipe hashes 2021-05-10 11:18:12 +02:00
Josef Söntgen
0f0edc0134 usb_host: implement sg_pcopy_* as TRACE dummies
The former implementation called 'TRACE_AND_STOP' which led to the
'usb_host_drv' to stop whenever such a function was called. Rather
than stopping return '0' and let the contrib code deal with this
situation.

Issue #4116.
2021-05-10 11:16:24 +02:00
Josef Söntgen
d0f084d449 usb_host: backport xhci bounce-buffer fix
This commit backports the Linux upstream commit (d4a6106) [*]
that introduces a check to prevent the sglist from being used
unconditionally.

[*] 'xhci: fix bounce buffer usage for non-sg list case'

Fixes #4116.
2021-05-10 11:16:24 +02:00
Norman Feske
516a9a6925 depot: update recipe hashes 2021-05-05 11:35:31 +02:00
Christian Prochaska
8f23e377d9 lxip: fix build error with gcc 10
Fixes #4102
2021-05-05 11:35:31 +02:00
Stefan Kalkowski
421d2bed40 platform driver: make device info XML optional
* The device XML information dataspace is only provided,
  when the client's policy states `info="yes"`
* The device XM information gets changed to include the
  physical resource names (I/O memory and IRQ addresses)
  instead of virtual ids and page offset

Fix #4077
2021-05-05 11:31:16 +02:00
Christian Helmuth
3f450a77e1 Fix touchscreen config in usb_hid README 2021-05-05 11:21:43 +02:00
Johannes Schlatow
462bff5aef dde_linux: test subdevice id for device matching
As linux drivers may distinguish device configuration by pci subdevice id in
addition to the pci device id, the former must also be used for finding the
matching entry. Otherwise, e.g., the iwlwifi driver might load the wrong
firmware.

Side note: Add break statement to save superfluous iterations after
match was identified.

Fixes genodelabs#4076
2021-05-05 11:21:43 +02:00
Norman Feske
efbed6f7bf depot: update recipe hashes 2021-04-20 12:10:58 +02:00
Norman Feske
dc8c899c1d Streamline platform-device API on ARM
This API rework eases the access to memory-mapped I/O registers and
interrupts when using the platform driver. It introduces the notions of

- Platform::Device       - one device obtained from a platform session
- Platform::Device::Mmio - locally-mapped MMIO registers of a device
- Platform::Device::Irq  - interface for receiving device interrupts

The patch touches several drivers. Some drivers would require a
significant structural change to adopt the new API (e.g., net/virtio,
dde_linux drivers, imx gpio). In these cases, the patch adds
compatibility shims meant to be temporary. In other cases (e.g., imx
i2c), the adaptation was simple enough to carry through.

Fixes #4075
2021-04-20 12:10:58 +02:00
Stefan Kalkowski
d1cf9c86b8 os: introduce device type in platform driver
* Move "compatible" property value to "type" attribute
* Turn device_by_property helper in Platform::Connection into device_by_type

Fix #4074
2021-04-20 12:10:58 +02:00
Norman Feske
0339318572 platform_session: cache arg for alloc_dma_buffer
This patch extends the 'Platform_session::alloc_dma_buffer' interface
with a 'Cache' argument that corresponds to the argument accepted by
'Ram_allocator::alloc', which is used by the platform driver under the
hood.

Since the x86 platform driver used to be hardwired to allocate DMA
buffers as UNCACHED, I adjusted all drivers by specifying the UNCACHED
argument. Right now, this is needed as a hint for core to steer the
allocation of I/O page tables. Once we eliminate the need for such hints
(by introducing an explicit 'Region_map::attach_dma' operation), we can
revisit the drivers individually because cached DMA buffers should
generally be fine on the x86 architecture.

Issue #2243
2021-04-20 12:10:57 +02:00
Norman Feske
468e7a825c base/cache.h: rename Cache_attribute to Cache
The short name is better because the type will become prominently
visible at the API.

Issue #2243
2021-04-20 12:10:31 +02:00
Tomasz Gajewski
1867cf4967 iwl_firmware: use CUSTOM_TARGET_DEPS 2021-04-20 12:03:04 +02:00
Norman Feske
eb89b13327 depot: update recipe hashes 2021-03-24 11:32:53 +01:00
Alexander Boettcher
53041f4cd8 usb_host: support to disable usb controller types
The commits adds the same configuration values as supported up to now by
the monolithic usb driver. In contrast to the original, by default all drivers
are started. Disabling a controller type is used by Sculpt, e.g. for OHCI if
running Sculpt inside Virtualbox.
2021-03-23 11:50:37 +01:00
Alexander Boettcher
521f61b9e0 usb_hid: disable wacom driver
Issue #3997
2021-03-23 11:32:24 +01:00
Norman Feske
ca50a41d28 depot: update recipe hashes 2021-03-23 11:28:53 +01:00
Tomasz Gajewski
2f0898d2a9 dde_linux: fixes in makefiles
Issue #3972
2021-03-16 11:25:25 +01:00
Christian Prochaska
9a0217f21a imx8: use 'snps,dis_u2_susphy_quirk'
Fixes #4048
2021-03-16 11:19:32 +01:00
Christian Prochaska
0cfafa1c8f usb_host_drv: support command timeouts and bool properties
Fixes #4047
2021-03-16 11:19:17 +01:00
Norman Feske
5c5b56d1e0 depot: update recipe hashes 2021-03-12 12:08:24 +01:00
Norman Feske
755aed7cb2 dde_linux: don't spin when panicking
Issue #3997
2021-03-12 12:01:38 +01:00
Christian Helmuth
7ce1f8e92d Enable en_us chargen in drivers_interactive-imx8q_evk
Issue #4038
2021-03-12 12:01:37 +01:00
Norman Feske
e1bb0e8e15 usb_host: refine class heuristics on device report
This patch is an interim fix for using HID devices that offer a HID
interface as not the first interface. It also supplements the
interface classes as supplemental information to the USB-devices
report.

Fixes #4035
2021-03-12 12:01:37 +01:00
Norman Feske
2e4ccc1459 usb_host: reflect ENOSPC as STALL
Issue #4035
2021-03-12 12:01:37 +01:00
Norman Feske
80522fadf6 usb_hid: don't touch non-HID interfaces
Issue #4035
2021-03-12 12:01:36 +01:00
Norman Feske
64165d829e depot: update recipe hashes 2021-02-23 12:07:18 +01:00
Martin Stein
a462a8e741 usb_host: compile errors with DEBUG_LINUX_PRINTK
Ref #3961
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
b6d20b4742 autopilot: disable run script not supported by riscv
- libc and nic driver are currently not available on RISC-V

issue #4021
2021-02-23 12:07:16 +01:00
Christian Helmuth
f23e302475 Update OpenSSL to version 1.1.1i
Note, OpenSSL now comes as one combined depot archive *openssl* that
replaces the former *libssl* and *libcrypto* archives. The libraries are
still separate binaries for compatibility with legacy software.

Issue #3773
2021-02-23 12:07:16 +01:00
Josef Söntgen
a6f0b05834 usb_host: properly handle ISOC read requests
* Update the 'packet_size' information with the actual length for
  each isoc frame to be able to handle short reads at the client side.

* Copy the whole transfer buffer because the host controller stores
  the data at the original offsets, i.e., the buffer is not densely
  packed.

Fixes #4018.
2021-02-23 12:02:44 +01:00
Martin Stein
23620942bf usb_net: allow calling netif_stop_queue dummy
When the usb_net_drv was introduced in ports/run/netperf.inc, the
netperf_lxip_usb test on x86_64/hw/pc triggered the calling of the
netif_stop_queue dummy at
contrib/<DDE_LINUX>/src/drivers/usb_net/drivers/net/usb/usbnet.c:1464. As
netif_start_queue was also a dummy and allowed to be called, we tried allowing
calls to the netif_stop_queue dummy as well which fixed the
netperf_lxip_usb test on x86_64/hw/pc.

Ref #3961
2021-02-23 12:02:44 +01:00
Martin Stein
19d0142e10 ports/recipes/src: usb_net_drv
Ref #3961
2021-02-23 12:02:44 +01:00
Christian Prochaska
f654e6f02d usb_host_drv: dwc_otg stability improvements
- improve NYET error handling
- use split interrupt transaction hack
- clear TT buffers in error situations

Issue #3247
2021-02-23 12:02:43 +01:00
Christian Prochaska
c16611dff2 usb_hid_raw.run: add "Timer" service route
Fixes #4008
2021-02-23 12:02:42 +01:00
Christian Prochaska
33406940f3 usb_hid_drv: stability improvements
Fixes #4007
2021-02-23 12:02:42 +01:00
Christian Prochaska
e1698cf200 dde_linux: fix possible memory leak in wait queue implementation
Fixes #4006
2021-02-23 12:02:42 +01:00
Christian Prochaska
2670ae399b usb_host_drv: improve error handling
Fixes #4005
2021-02-23 12:02:42 +01:00
Norman Feske
8cc2662aac Remove support for the Muen separation kernel
Fixes #3995
Fixes #3994
2021-02-23 11:55:44 +01:00
Martin Stein
691be92046 Don't use the NIC server mode of NIC drivers
Issue #3961
2021-02-23 11:53:41 +01:00
Josef Söntgen
36b55e065a usb_host: check ep pointer before using it
The Usb session allows for submitting packets even when the interface
in question is not yet enabled. Enabling an interface will configure
the udev members properly and is normally done implicitly during
processing of an 'ALT_SETTING' packet.

In case the interface was not enabled this leads to a page-fault in
the USB host-controller driver as 'ep' is NULL.

Fixes #3999.
2021-02-23 11:51:57 +01:00
Norman Feske
a981fb864c depot: update recipe hashes 2021-01-25 14:00:43 +01:00
Stefan Kalkowski
bdd923406f base: remove SPEC variables of boards (fix #3971)
* Remove SPEC declarations from mk/spec
* Remove all board-specific REQUIRE declaratiions left
* Replace [have_spec <board>] run-script declarations with have_board where necessary
* Remove addition of BOARD variable to SPECS in toplevel Makefile
* Move board-specific directories in base-hw out of specs
2021-01-25 13:58:09 +01:00
Martin Stein
f6d195a9de nic drivers: provide optional Uplink-client mode
In order to perform a smooth transition from NIC drivers that act only as NIC
session clients to NIC drivers that act only as Uplink session clients, this
commit introduces an intermediate state in which all NIC drivers support both
modes. That said, a NIC drivers mode is now statically determined through a new
optional 'mode' attribute in the drivers <config> tag that can be set to either
'nic_server' (default value) or 'uplink_client'. Reconfiguring this attribute
at a driver doesn't have any effects. Whithout this attribute being set, all
NIC drivers will behave the same as they did before the commit. When set to
'uplink_client', however, instead of providing a Nic service, they request
an Uplink session whenever their network interface becomes "UP" and close the
session whenever their network interface becomes "DOWN".

Ref #3961
2021-01-25 13:58:09 +01:00
Martin Stein
1d2649b49a nic_router: act as "Uplink" server
Let the NIC router provide an Uplink service besides the Nic service that it
already provided. Requests for an Uplink session towards the NIC router are
assigned to Domains using the same <policy> configuration tags that are used in
order to assign Nic session requests. The MAC addresses of Uplink session
components are _NOT_ considered during the allocation of MAC addresses for NIC
session components at the same Domain. The task of avoiding MAC address clashes
between Uplink session components and Nic session components is therefore left
to the integrator. Apart from that, Uplink session components are treated by
the NIC router like any other interface.

Ref #3961
2021-01-25 13:57:43 +01:00
Christian Helmuth
1bef11accf depot: update recipe hashes 2020-12-18 09:10:52 +01:00
Sebastian Sumpf
0beda6bca4 dde_linux: USB MBIM modem driver support
Thise driver supports USB LTE modems for Huawais' ME906s through MBIM
and provides a traditional Nic session. The "control" interface is a
Terminal session, which can be used via libmbim/mbimcli.

issue #3822
2020-12-09 14:02:11 +01:00
Sebastian Sumpf
36eeab6df2 dde_linux: usb support extra data and zero config
- Vendor devices add addtional data to the config descriptor, read and
  added to the usb session
- allow '0' configuration within the usb session

issue #3822
2020-12-09 14:02:11 +01:00
Christian Helmuth
496dc5508f usb_hid: support for Apple HID devices
Issue #3953
2020-12-09 14:02:10 +01:00
Christian Helmuth
2a659cb750 usb_hid: support for Holtek-based mice fixups
This enables USB mice based on the Holtek chipsets, which need USB
descriptor fixups. An example mouse is the Sharkoon Drakonia.

Issue #3953
2020-12-09 14:02:10 +01:00
Alexander Boettcher
b097e598f1 usb_hid: use heap instead of dma/mem allocator
The usb_hid driver does not need to distinguish between
normal memory and DMA capable memory, since all requests are routed via the
USB raw session to the usb host driver. The default Malloc implementation
implements this distinction, however exposes restrictions on the size of
allocations. As seen now by several USB HID devices, the size of device
driver allocations depend on read out hardware features and can be
larger than we support with our specialized default Malloc implementation.

Since we don't need this functionality, switching to an well
tested allocator (Heap) which can cope with varying sizes of allocation,
we can mitigate the size restriction.

Fixes #3953
2020-12-09 14:02:10 +01:00
Alexander Boettcher
2c639169fd dde_linux: use linux memory primitives in impl/usb
Issue #3953
2020-12-09 14:02:10 +01:00
Martin Stein
063e4bd072 remove remnants of 'virtualbox_nic_router' test
Ref #3952
2020-12-09 14:02:10 +01:00
Christian Helmuth
f2e0c164c2 depot: update recipe hashes 2020-11-27 09:21:06 +01:00
Alexander Boettcher
78ab3c8db5 usb: avoid memset on failed memory allocation
Issue #3953
2020-11-27 09:19:09 +01:00
Alexander Boettcher
fae3c12366 usb: skip reporting of incomplete init. usb device
Fixes #3944
2020-11-23 12:03:00 +01:00
Stefan Kalkowski
4e90dc4512 dde_linux: adjust fec_nic_drv to use platform_drv
Fix #3947
2020-11-23 12:03:00 +01:00
Alexander Boettcher
cd8b436566 usb_hid: avoid destruction of used signal handler
Fixes #3945
2020-11-23 12:02:59 +01:00
Christian Helmuth
a8d3cd9b15 libc: open socket files early on socket creation
This prevents later file-descriptor shortage when opening files on
demand, which can't be reflected to the application in a sane manner.

The real fix is to open socket files not on libc level but on VFS level
only effectively consume one libc file descriptor for one socket.
2020-11-23 12:02:58 +01:00
Christian Helmuth
5be1c793a5 depot: update recipe hashes 2020-10-23 14:16:38 +02:00
Christian Helmuth
91f8281618 depot: update recipe hashes 2020-10-09 13:35:57 +02:00
Sebastian Sumpf
b9bd179e54 gpio_drv: remove specs for imx53 and imx6
Also cleanup run scripts and recipes were gpio driver is not required,
update the ones were it is.

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
6c6deb7e8b dde_linux: add touch to i.MX8 recipe
Add touch screen and event filter to drivers interactive package.

issue #3900
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
664b861f9d imx8_fb_drv: MIPI DSI display support
- support for Northwest Logic MIPI DSI bridge
- support for Radium panel (NXP MX8_DSI_OLED1)
- new 'DSI-1' connector in driver config file

issue #3900
2020-10-09 13:35:56 +02:00
Martin Stein
7feea78991 timeout: rework timeout framework
* get rid of alarm abstraction
* get rid of Timeout::Time type
* get rid of pointer arguments
* get rid of _discard_timeout indirection
* get rid of 65th bit in stored time values
* get rid of Timeout_scheduler interface
* get rid of uninitialized deadlines
* get rid of default arguments
* get rid of Timeout::_periodic
* get rid of Timeout::Raw
* use list abstraction
* only one interface for timeout handlers
* rework locking scheme to be smp safe
* move all method definitions to CC file
* name mutexes more accurate
* fix when & how to set time-source timeout
* fix deadlocks

Fixes #3884
2020-10-09 13:35:56 +02:00
Sebastian Sumpf
0fd979b147 imx8_fb_drv: make 'Capture' constructible
Reconstruct capture connection on config update in order to receive
update of complete screen data from GUI session.

fixes #3878
2020-09-18 15:21:10 +02:00
Christian Helmuth
f6337a6446 depot: update recipe hashes 2020-09-18 14:04:56 +02:00
Christian Helmuth
c59c266afc depot: update recipe hashes 2020-09-17 14:23:14 +02:00
Norman Feske
951409f14b intel_fb: reinit capture session on mode change
The current version of the driver leaves the screen in a black state
after a mode change, e.g., when connecting an external display.
With this patch, the framebuffer content is fetched for the entire
screen after a mode change. Thanks to Sebastian Sumpf for investigating.

Issue #3878
2020-09-17 10:14:07 +02:00
Christian Helmuth
2eb8c5e21a net: move ascii_to() into Net namespace
The combination of Net::Mac_address and
Genode::ascii_to(Net::Mac_address) required shaky quirks in several
places because GCC is not able to resolve the ascii_to overload if
base/xml_node.h was included to early. The current solution moves the
several ascii_to overloads "closer" to the Net types by putting them
into the Net namespace, where GCC reliably picks them up.

Hence, co-locating the ascii_to() utility with the overload type in the
same scope/namespace is good practice.

This patch removes the now obsolete <nic/xml_node.h> header file.
2020-09-17 10:13:22 +02:00
Stefan Kalkowski
fcb0ca305c dde_linux: don't zero out framebuffer of imx8
* On this platform there is no need to zero out the framebuffer
  dataspace, which is already blanked by core
* But it might happen that the GUI server is sending a capture
  event before the zero out happens. Thereby screen content can get
  lost

Fix #3878
2020-09-17 10:13:21 +02:00
Stefan Kalkowski
fd161cd814 dde_linux: turn imx8_fb_drv into Platform client
* Requests its I/O resources and clock settings from the platform driver

Fix #3877
2020-09-17 10:13:21 +02:00
Christian Helmuth
c649307720 depot: update recipe hashes 2020-08-28 08:29:12 +02:00
Stefan Kalkowski
e29485fa59 dde_linux: decouple Lx_kit::Irq and Platform::Device
Follow-up commit to fix the old usb_drv. Under rpi one and the
same irq can be requested several times. Therefore, we've to track
the Irq_connection objects.

Ref #3865
2020-08-28 08:28:13 +02:00
Norman Feske
7d0cb9620b depot: update recipe hashes 2020-08-25 11:50:41 +02:00
Stefan Kalkowski
a5f6d0f081 dde_linux: use new platform API for usb_host_drv
Introduce a common platform device initialization routine for all
ARM SoCs by using the new platform driver API.

Fix #3865
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
e223be32ce dde_linux: decouple Lx_kit::Irq and Platform::Device
The Lx_kit::Irq abstraction of DDE Linux was always using the very first
interrupt of a Platform::Device stored in it. Instead of handing over the
platform device it is much more flexible and sane to hand over the actual
interrupt capability.

Ref #3865
2020-08-25 11:50:12 +02:00
Stefan Kalkowski
5f5ad41ad3 hw: unify irq enumeration for Raspberri Pi
By now, the enumeration of peripheral interrupts on Raspberry Pi 1 was
different in between base-hw kernel and Fiasco.OC. Therefore, hacks were
needed in every driver to request the correct interrupt number dependent
on the kernel. Before reproducing the same in the platform driver for rpi,
we can more easily use the same enumeration with base-hw.

Ref #3864
2020-08-25 11:50:12 +02:00
Norman Feske
a2381c7e4c Turn USB HID drivers into event-session clients
Issue #3845
2020-08-25 11:50:09 +02:00
Norman Feske
9662d89cfb Replace input filter with event filter
This commit applies the transition from the "Input" session to the "Event"
session to the event-filtering mechansim. The functionality of the
input_filter is now provided by the event_filter. The event filter
requests only one "Event" session as destination for the filter result,
which is usually routed to the nitpicker GUI server. It provides an
"Event" service to which any number of event sources can connect.

The configuration of the filter chain remains almost the same. Only the
declaration of the <input> nodes is no longer needed. Instead, the
configuration must specify <policy> nodes, which define the mapping of
"Event" clients (event sources) to the inputs used in the filter chain.

The patch adjusts all uses of the nitpicker GUI server accordingly such
that the event filter reports events to nitpicker's event service
instead of having nitpicker request an "Input" session. This dissolves
the dependency of nitpicker from input drivers.

Issue #3827
2020-08-25 11:49:43 +02:00
Christian Helmuth
cb15f40028 Remove remnants of libc_lxip
Issue #2960
2020-08-25 11:49:42 +02:00
Christian Helmuth
de7d4a5523 Replace libc_pipe plugin by VFS pipe plugin 2020-07-30 08:49:24 +02:00
Norman Feske
de795b1a6e depot: update recipe hashes 2020-07-13 11:33:53 +02:00
Norman Feske
c81af531a3 Turn framebuffer drivers into capture clients
This patch replaces the use of the "Framebuffer" session interface by
the new "Capture" session interface in all framebuffer drivers. Thanks
to this change, those drivers have become mere clients of the nitpicker
GUI server now, and are no longer critical for the liveliness of the GUI
server.

The patch touches the following areas:

- The actual driver components. The new versions of all drivers have
  been tested on the respective hardware. Generally, the drivers
  have become simpler.

- The drivers_interactive packages for various boards. The drivers
  subsystem no longer provides a "Framebuffer" service but needs a
  valid route to the "Capture" service provided by nitpicker.

- The driver manager of Sculpt OS.

- This patch changes the role of the test-framebuffer component from a
  framebuffer client to a capture server so that drivers (capture clients)
  can be directly connected to the test component without the nitpicker
  server.

- Framebuffer driver no longer support the unbuffered mode.

- The fb_bench.run script is no longer very meaningful because it
  interplays solely with nitpicker, not with the driver directly.

- All run scripts for graphical scenarios and the related depot
  archives got adapted to the change.

Fixes #3813
2020-07-13 11:33:15 +02:00
Alexander Boettcher
5516dbcb1f dde_linux: use Mutex/Blockade
Issue #3805
2020-07-13 11:33:11 +02:00
Norman Feske
35c3acdf05 depot: update recipe hashes 2020-07-03 11:13:59 +02:00
Norman Feske
4450b37ff5 depot: update recipe hashes 2020-06-29 14:25:28 +02:00
Norman Feske
ef741ef80d Change pixel format to 32 bits per pixel
Until now, Genode's framebuffer session interface was based on the
RGB565 pixel format. This patch changes the pixel format to 32-bit
XRGB where the X part is ignored. It adapts all graphical applications
and device drivers accordingly.

The patch also adjusts the users of the drivers_interactive packages,
assigning 64 MiB RAM and 1500 caps to the drivers subsystem, which is
sufficient for covering high resolutions at 32 bits per pixel and to
accommodate multi-component USB HID input stacks.

Fixes #3784
2020-06-29 14:22:29 +02:00
Norman Feske
eb3a81a874 depot: update recipe hashes 2020-06-22 09:39:41 +02:00
Stefan Kalkowski
b11da67679 usb_hid: introduce cpu quota
Ref #3247
2020-06-22 09:39:40 +02:00
Christian Helmuth
6006051fb9 depot: update recipe hashes 2020-05-27 11:56:47 +02:00
Stefan Kalkowski
935dcf8b18 usb_drv: include specific rpi platform_session API
The rpi_usb_drv uses the rpi-specific variant of the platform_session API.
Therefore, it has to include it excplicitly.

Ref #3299
2020-05-27 11:56:46 +02:00
Norman Feske
b078224753 Replace Genode::strncpy by Genode::copy_cstring
- Since Genode::strncpy is not 100% compatible with the POSIX
  strncpy function, better use a distinct name.

- Remove bogus return value from the function, easing the potential
  enforcement of mandatory return-value checks later.

Fixes #3752
2020-05-27 11:56:45 +02:00
Norman Feske
0f27d139bd depot: update recipe hashes 2020-05-18 10:16:59 +02:00
Emery Hemingway
7f928a6573 LxIP "peek" file
Add a control file for peeking at socket buffers.

Ref #2875
2020-05-18 10:16:15 +02:00
Christian Helmuth
c11d9b7b5c Remove false API dependencies from libc/posix components
Fixes #3720
2020-05-18 10:16:13 +02:00
Norman Feske
c39a342fe5 Remove use of <configfile> feature of init
Issue #3753
2020-05-18 10:16:13 +02:00
Norman Feske
dd899fde29 depot: update recipe hashes 2020-04-24 14:37:57 +02:00
Norman Feske
f14cc2edab Replace use of ram_fs by VFS server
Issue #3734
2020-04-21 16:24:37 +02:00
Stefan Kalkowski
0e49336b96 Retire Exynos 5 support (fix #3725) 2020-04-17 12:53:57 +02:00
Christian Helmuth
b60b591d06 depot: update recipe hashes 2020-04-17 12:40:13 +02:00
Stefan Kalkowski
f051065582 Retire OMAP4 support
Fix #2850
2020-04-17 12:39:32 +02:00
Norman Feske
46fa8197a2 depot: update recipe hashes 2020-03-26 11:39:02 +01:00
Christian Helmuth
5affd51250 depot: update recipe hashes 2020-02-28 08:59:43 +01:00
Christian Helmuth
4cccf74664 depot: update recipe hashes 2020-02-20 12:11:23 +01:00
Norman Feske
57ea1dbdd3 depot: update recipe hashes 2020-02-10 14:29:06 +01:00
Stefan Kalkowski
e84e1bbf36 dde_linux: optimize refresh routine in imx8_fb_drv
Fix #3616
2020-02-04 16:03:08 +01:00
Christian Helmuth
90535a1401 depot: update recipe hashes 2020-02-04 15:51:10 +01:00
Christian Helmuth
1e578f1a50 Log key count in input test 2020-02-04 15:51:10 +01:00
Christian Helmuth
285a33c97d dde_linux: add missing white space in log message 2020-02-04 15:51:09 +01:00
Christian Prochaska
746d373362 vfs_lxip: classify 'data' file as continuous
Fixes #3603
2020-02-04 15:51:09 +01:00
Alexander Boettcher
2256f5fb4b dde_linux: add dma_wmb/rmb barriers for arm_v6 2020-02-04 15:51:09 +01:00
Alexander Boettcher
6506240642 dde_linux: add dma_wmb/rmb barriers for arm_v7
and remove re-defined dma_wmb in fec driver
2020-02-04 15:51:09 +01:00
Christian Prochaska
d4f246517c depot: recipe for drivers_interactive-imx8q_evk
Fixes #3595
2020-02-04 15:51:08 +01:00
Stefan Kalkowski
5bfebe7a3f depot: recipe for usb_hid_drv
Fixes #3594
2020-02-04 15:47:27 +01:00
Stefan Kalkowski
3df67362b4 depot: recipe for usb_host_drv
Fixes #3593
2020-02-04 15:47:27 +01:00
Christian Prochaska
f1042e7fb1 depot: recipe for imx8_fb_drv
Fixes #3592
2020-02-04 15:47:27 +01:00
Christian Prochaska
b29112efdf dde_linux: framebuffer driver for i.MX8 EVK
Fixes #3591
2020-02-04 15:47:27 +01:00
Christian Helmuth
4bbbf5d2e3 dde_linux: reduce compiler warnings 2020-02-04 15:47:27 +01:00
Christian Prochaska
0eaa1f7a08 lx_kit: support enable/disable IRQ and pass IRQ number to handler
Fixes #3589
2020-01-02 15:53:46 +01:00
Christian Helmuth
b931b67cba depot: update recipe hashes 2019-12-19 17:01:43 +01:00
Christian Helmuth
8699f5592f wifi: run wpa_main in pthread 2019-12-19 17:01:42 +01:00
Christian Prochaska
81a78cf1d0 usb_host_drv: fix 'matches->compatible' string access
Fixes #3582
2019-12-19 17:01:42 +01:00
Alexander Boettcher
6e99f00f5c usb_hid_raw: enable imx8q_evk for nightly testing
Issue #3571
2019-12-19 17:00:47 +01:00
Alexander Boettcher
e34b443c29 usb: add imx8q_evk support to usb_host
Issue #3571
2019-12-19 17:00:47 +01:00
Alexander Boettcher
6b17bb647e dde_linux: add barriers to readl/writel
Issue #3571
2019-12-19 17:00:47 +01:00
Sebastian Sumpf
e4255e4c8b vfs/lxip: wait for i/o progress on connect
Since connect is asynchronous, add a waiter during connect

issue #3568
2019-12-19 17:00:47 +01:00
Christian Helmuth
11ef8e1ff2 depot: update recipe hashes 2019-11-28 09:06:39 +01:00
Josef Söntgen
25aa25c6a0
wifi_drv: enable loading of 9000 series FW
Tested with a 'Intel(R) Wireless-AC 9462' device.

Fixes #3556.
2019-11-20 12:56:10 +01:00
Christian Helmuth
7ed1d7f11d depot: update recipe hashes 2019-11-19 14:54:14 +01:00
Norman Feske
5f350adb57 vfs/lxip: don't misinterpret EINPROGRESS as error 2019-11-19 14:54:13 +01:00
Oleg Girko
4007cee852 Fix MAC address printing in dde_linux USB net drivers.
Passing array of unsigned chars to Genode::log() function
makes it converted to void pointer, resulting in printing its address.

Wrapping this array into Genode::Cstring solves this problem
and makes it being printed properly as zero-terminaled string.

Signed-off-by: Oleg Girko <ol@infoserver.lv>

Fixes #3530
2019-11-19 14:42:23 +01:00
Norman Feske
5ab1505d43 file system: enhanced file status info
This patch extends the 'File_system::Status',
'File_system::Directory_entry', and the related 'Vfs' types with
the following additional information:

- Distinction between continuous and transactional files (Node_type)
  (issue #3507)
- Readable, writeable, and executable attributes (Node_rwx),
  replacing the former 'mode' bits
  (issue #3030)

The types 'Node_rwx', 'Node_type' are defined twice,
once for the VFS (vfs/types.h) and once for the 'File_system'
session (file_system_session/file_system_session.h).
Similarly, there is a direct correspondance between
'Vfs::Directory_service::Dirent' and 'File_system::Directory_entry'.

This duplication of types follows the existing pattern of keeping the
VFS and file-system session independent from each other.
2019-11-19 14:23:56 +01:00
Christian Helmuth
2166a4b17f dde_linux: prevent warning about 'register' keyword 2019-11-19 14:23:55 +01:00
Josef Söntgen
c5706e8f4a wifi_drv: enable loading of 5000 series FW
Fixes #3502.
2019-11-19 14:23:55 +01:00
Christian Helmuth
76438a3f85 dde_linux: refactor usb arch-dependent includes
Also added arm_64/arm_v8, which fixes building board-independent usb_hid
etc.
2019-11-19 14:19:34 +01:00
Norman Feske
90a91f3536 dde_linux: eliminate global ctors in lx_kit
As the lx_kit library is used by the vfs_lxip plugin, it must not
contain any static global constructor.

Related to issue #3487
2019-11-19 14:17:29 +01:00
Christian Helmuth
4a7b0e99a6 depot: update recipe hashes 2019-09-20 14:14:16 +02:00
Christian Helmuth
ede009edf9 Fix expected output in USB HID tests
Invalid characters in press events are no longer 0 but 0xfffe since

  a97b8043b5 utf8: non-character U+fffe as invalid codepoint

Issue #3483
2019-09-09 11:35:42 +02:00
Christian Helmuth
b2c59576ae depot: update recipe hashes 2019-08-28 14:36:56 +02:00
Sebastian Sumpf
15b27a1e9d drivers_nic-imx7d_sabre: increase caps for sel4 2019-08-21 14:00:47 +02:00
Christian Helmuth
312f801f8a depot: update recipe hashes 2019-08-21 13:25:26 +02:00
Christian Prochaska
91c8e70bef depot: add recipe for drivers_nic-imx8q_evk
Fixes #3452
2019-08-13 12:02:27 +02:00
Christian Prochaska
38dcdeeb04 fec_nic_drv: arm_64 support
Fixes #3446
2019-08-13 12:02:27 +02:00
Christian Helmuth
17d32b3e15 depot: update recipe hashes 2019-07-09 09:06:54 +02:00
Christian Prochaska
5dd1abcc2d depot: add recipe for drivers_nic-imx7d_sabre
Fixes #3433
2019-07-09 08:58:38 +02:00
Christian Prochaska
4dafdbd5b7 dde_linux: update 'fec' driver to version 4.16.3
Fixes #3432
2019-07-09 08:58:38 +02:00
Sebastian Sumpf
ef8140cce5 lxip: ARM 64-Bit support
issue #3407
2019-07-09 08:55:23 +02:00
Christian Helmuth
3c4c460f82 depot: update recipe hashes 2019-06-13 13:40:37 +02:00
Christian Helmuth
2b183f9497 depot: update recipe hashes 2019-05-29 10:20:52 +02:00
Martin Stein
ca95621db5 run/nic_router_uplinks: do not run on muen
On muen, we don't have configured access to wifi so far. Thus, the wifi
driver doesn't come up and we should skip tests using this driver for
the platform.

Fix #3384
2019-05-29 10:20:52 +02:00
Josef Söntgen
d223539165 wifi_drv: ignore socket flags on socket creation
The libc features support for SOCK_CLOEXEC now which gets set via
the type argument in 'libnl'. Since we are only interested in the
actual type, i.e. if it is SOCK_RAW, just ignore the flags.

Issue #3289.
2019-05-27 14:46:54 +02:00
Christian Prochaska
c7d9df6350 lx_kit: update 'arch_execute()' functions based on libc
This ensures proper stack alignment for FPU instructions on x86_64.

Fixes #3356
2019-05-27 14:46:53 +02:00
Stefan Kalkowski
e6f83d4df2 depot: add recipe for drivers_interactive-rpi
Ref #2190
2019-05-16 13:11:01 +02:00
Stefan Kalkowski
8dd618d67f depot: add recipe for drivers_nic-imx6q_sabrelite
Ref #3180
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
82693ba5b5 depot: add recipe for drivers_nic-imx53_qsb
Ref #3180
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
bf5a631a14 dde_linux: name usb_drv unambigously
* Make package buildable for ARM too
* Move usb library to src targets for explicitly named targets
* adapt remaining run-scripts to use the correctly named usb drivers

Ref #2190
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
d5104aca05 dde_linux: make rpi usb drivers kernel independent
Ref #3180
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
d00bcac941 dde_linux: exclude non-base API from fec_nic_drv
Ref #3180
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
5bc498c812 dde_linux: name FEC nic_drv unambigously
Ref #2190
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
dcc28b65cb run: use driver_nic-* pkg where possible (fix #3180) 2019-05-16 13:10:06 +02:00
Stefan Kalkowski
7c1e3c84ba os: name gpio_drv unambigously (ref #2190) 2019-05-16 12:52:59 +02:00
Christian Helmuth
ba51800b31 depot: update recipe hashes 2019-05-06 16:15:27 +02:00
Stefan Kalkowski
c767f6ccf1 os: explicit cache policy in Nic::Session_component
To enable the use of uncached DMA buffers as RX and TX communication
buffers in between driver (service) and client, introduce a cache
attribute in the constructor of Nic::Session_component

Ref #3291
2019-05-06 16:15:26 +02:00
Martin Stein
181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
2019-05-06 16:15:26 +02:00
Norman Feske
bbe3ee8dc5 block_session: server-defined payload alignment
This patch replaces the formerly fixed 2 KiB data alignment within the
packet-stream buffer by a server-defined alignment. This has two
benefits.

First, when using block servers that provide small block sizes like 512
bytes, we avoid fragmenting the packet-stream buffer, which occurs when
aligning 512-byte requests at 2 KiB boundaries. This reduces meta data
costs for the packet-stream allocator and also allows fitting more
requests into the buffer.

Second, block drivers with alignment constraints dictated by the
hardware can now pass those constraints to the client, thereby easing
the use of zero-copy DMA directly into the packet stream.

The alignment is determined by the Block::Session_client at construction
time and applied by the Block::Session_client::alloc_packet method.
Block-session clients should always use this method, not the 'alloc_packet'
method of the packet stream (tx source) directly. The latter merely
applies a default alignment of 2 KiB.

At the server side, the alignment is automatically checked by
block/component.h (old API) and block/request_stream.h (new API).

Issue #3274
2019-05-03 13:53:12 +02:00
Norman Feske
2208220c12 block session: remove Block::Session::Operations
This patch modernizes the 'Block::Session::info' interface. Instead of
using out parameters, the 'init' RPC function returns a compound 'Info'
object now. The rather complicated 'Operations' struct is replaced by
a 'writeable' attribute in the 'Info' object.

Fixes #3275
2019-05-03 13:53:12 +02:00
Christian Helmuth
6ea1179145 depot: update recipe hashes 2019-04-09 12:30:35 +02:00
Emery Hemingway
a635873568 VFS: Replace global response handlers with local handlers
Replace the I/O response handler that is passed to the VFS at
construction with an object that is dynamically attached to handles.
This object shall also accept read-ready notifications, and plugins are
encouraged to keep handles awaiting ready-ready notifications separate
from handles that await I/O progress.

Replace the use of handle lists in plugins with handle queues, this
makes the code easier to understand and the ordering of notifications to
the application more explicit.

These changes replace the use of the Post_signal_hook from all VFS
plugins, applications must assume that read-ready and I/O notifications
occur during I/O signal dispatch and use an Io_progress_handler at its
entrypoints to defer response until after signal dispatching.

Fix #3257
2019-04-09 12:30:34 +02:00
Norman Feske
d027f12764 depot: update recipe hashes 2019-04-02 09:36:39 +02:00
Emery Hemingway
800b4e44b1 Reduce Vfs::Vfs_handle::Context to empty struct type
The "Vfs::Vfs_handle" type should not contain any public members that
can be initialized by the VFS internally and by the application, so
remove inheritance from the "Genode::list::Element" class. The VFS
plugins must instead use lists of "Vfs::Vfs_handle" sub-classes, the
lifetime of which are always managed by the plugin.

Ref #3036
2019-04-01 19:33:47 +02:00
Emery Hemingway
260fc30be3 lxip: consolidate lx timers and timeouts
Use a single timeout scheduler passed during lxip instantiation for
both timers and 'schedule_timeout' facilites rather than instantiate
two timer sessions and signal handlers. This reduces the library's
capability cost and initialization time.

Fix #2961
2019-04-01 19:33:47 +02:00
Christian Helmuth
ebe71a12ed depot: update recipe hashes 2019-03-19 11:12:36 +01:00
Stefan Kalkowski
3e70b53165 vfs_lxip: fix return code in blocking accept case
Ref #3217
2019-03-18 15:56:24 +01:00
Christian Helmuth
36adbef3f9 depot: update recipe hashes 2019-02-28 11:34:45 +01:00
Christian Helmuth
46a29532a9 depot: update recipe hashes 2019-02-26 14:47:02 +01:00
Norman Feske
3de673a8ca dde_linux/usb: remove deprecated APIs on ARM
Issue #1987
2019-02-26 14:45:07 +01:00
Christian Helmuth
2211d20c1d Increase CAP quota in wifi tests (sel4) 2019-02-26 14:45:07 +01:00
Christian Helmuth
2a41f50661 Remove obsolete usb_hid_panda test 2019-02-26 14:44:31 +01:00
Christian Helmuth
c749f577e6 Do not run usb_hid test on imx6q_sabrelite
We do not support the monolithic usb_drv on this platform.
2019-02-26 14:44:31 +01:00
Norman Feske
0e0b6bdde7 depot: update recipe hashes 2019-02-19 11:13:56 +01:00
Christian Prochaska
4921388732 usb_hid.run: adapt for rpi and arndale
- add 'Regulator' route and adapt string unification rule for arndale
- add 'IRQ' route for rpi

Fixes #3166
2019-02-19 11:12:12 +01:00
Norman Feske
aa66b5d62f base: remove dependency from deprecated APIs
This patch adjusts the implementation of the base library and core such
that the code no longer relies on deprecated APIs except for very few
cases, mainly to keep those deprecated APIs in tact for now.

The most prominent changes are:

- Removing the use of base/printf.h

- Removing of the log backend for printf. The 'Console' with the
  format-string parser is still there along with 'snprintf.h' because
  the latter is still used at a few places, most prominently the
  'Connection' classes.

- Removing the notion of a RAM session, which does not exist in
  Genode anymore. Still the types were preserved (by typedefs to
  PD session) to keep up compatibility. But this transition should
  come to an end now.

- Slight rennovation of core's tracing service, e.g., the use of an
  Attached_dataspace as the Argument_buffer.

- Reducing the reliance on global accessors like deprecated_env() or
  core_env(). Still there is a longish way to go to eliminate all such
  calls. A useful pattern (or at least a stop-gap solution) is to
  pass the 'Env' to the individual compilation units via init functions.

- Avoiding the use of the old 'Child_policy::resolve_session_request'
  interface that returned a 'Service' instead of a 'Route'.

Issue #1987
2019-02-19 11:08:17 +01:00
Christian Prochaska
87d526968c usb_hid: test both USB host drivers
Fixes #3152
2019-02-19 11:08:17 +01:00
Christian Helmuth
271e2398f9 depot: update recipe hashes 2019-02-12 14:24:12 +01:00
Christian Helmuth
193c1aa533 wifi: refactor config generation in run script
Now sophisticated test scripts can be easily generated like documented.
2019-02-12 10:33:32 +01:00
Christian Helmuth
2b1732bdec Adapt usb_drv RAM quota to 12M
All autopilot scripts use 12 or more MiB for the usb_drv and my personal
tests never succeeded with less on x86 test machines.
2019-02-12 10:33:32 +01:00
Christian Prochaska
ddacb1400c Do not disable USB BIOS handoff in tests
Fixes #3140
2019-02-12 10:33:15 +01:00
Josef Söntgen
ac59b68257 wifi_drv: split front end notification
Issue #3139.
2019-02-12 10:33:15 +01:00
Josef Söntgen
8f47609024 wifi_drv: fix explicit SCAN request handling
* Increase the CMD length to accomodate the limit of the wpa_supplicant
* Fix case where multiple SSIDs with 32 bytes are used
* Use Expanding_reporter for accesspoints report

Fixes #3139.
2019-02-12 10:33:15 +01:00
Christian Prochaska
369d60bc21 dde_linux: iterate over PCI devices in ascending BDF order
On a Lenovo ThinkCentre M57p, the system locks up when the UHCI controller
BIOS handoff (disabling bit 4 in the LEGSUP register) for the controller
with PCI BDF 00:1d:2 is attempted before the handoff for the controller
with BDF 00:1a:0.

Fixes #3138
2019-02-12 10:33:15 +01:00
Christian Prochaska
e9e048c4ea dde_linux: fix timer callback compatibility with older drivers
Fixes #3137
2019-02-12 10:33:15 +01:00
Christian Helmuth
845253af3a dde_linux: prevent truncation in update_jiffies()
Before, jiffies wrapped after 2**32 microseconds (71.5 minutes) to 0.
2019-02-12 10:33:15 +01:00
Christian Helmuth
bcef3aeb1e dde_linux: fix calculation of ktime from jiffies 2019-02-12 10:33:15 +01:00
Emery Hemingway
47c6377ac0 Remove libc_lxip
The libc_lxip library is superceded by vfs_lwip.

Fix #2960
Fix #2535
2019-02-12 10:33:14 +01:00
Norman Feske
3a169d3a78 depot: update recipe hashes 2019-01-30 13:55:20 +01:00
Christian Helmuth
f7f1509a27 Re-enable network tests on all platforms 2019-01-30 13:54:53 +01:00
Norman Feske
f23579532e dde_*: remove the use of deprecated APIs
Issue #1987
Issue #3125
2019-01-30 13:49:54 +01:00
Stefan Kalkowski
b765cef359 replace Wandboard by i.MX6 reference board
Instead of using the Wandboard Quad, the reference hardware from NXP
i.MX6 Quad Sabrelite will be used by Fiasco.OC, sel4 and hw by default.
2019-01-30 13:35:28 +01:00
Christian Prochaska
21ed41da9a usb_hid_drv: wait for keyboard LED registry in 'led_connect()'
It can happen that a keyboard gets plugged in and 'led_connect()' is
called while the keyboard LED of another keyboard is just being updated
(and the registry is locked).

Fixes #3118
2019-01-30 13:35:28 +01:00
Christian Prochaska
e8ea28d897 socket fs: support non-blocking 'connect()'
Fixes #3113
2019-01-30 13:35:28 +01:00
Norman Feske
ed65267bc5 depot: update recipe hashes 2019-01-14 12:34:41 +01:00
Christian Prochaska
8aaffe829a usb_hid.run: enable more platforms for autopilot test
Fixes #3105
2019-01-14 12:34:41 +01:00
Norman Feske
81fb10daaa Consistently name block components
This patch replaces abbreviations like "blk", "cli", and "srv" by their
full forms "block", "client", and "server".

Fixes #1258
2019-01-14 12:34:39 +01:00
Norman Feske
bf62d6b896 Move timer from os to base repository
Since the timer and timeout handling is part of the base library (the
dynamic linker), it belongs to the base repository.

Besides moving the timer and its related infrastructure (alarm, timeout
libs, tests) to the base repository, this patch also moves the timer
from the 'drivers' subdirectory directly to 'src' and disamibuates the
timer's build locations for the various kernels. Otherwise the different
timer implementations could interfere with each other when using one
build directory with multiple kernels.

Note that this patch changes the include paths for the former os/timer,
os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/.

Issue #3101
2019-01-14 12:33:57 +01:00
Christian Helmuth
21a61cd583 depot: update recipe hashes 2019-01-07 12:43:37 +01:00
Christian Helmuth
6315e4503e dde_linux: adapt to changes in os/duration.h
The Linux emulation library provides preprocessor macros for min() and
max(), which now clash with implementation in duration.h. So, we disable
those macros in the delay implementation.
2019-01-07 12:25:44 +01:00
Christian Helmuth
11eecdc7bd depot: update recipe hashes 2018-11-29 11:54:31 +01:00
Emery Hemingway
a2bdcc68c2 Throw exception for invalid packets at packet streams
Some application code is dereferencing the pointer returned by
'packet_content' at packet streams without checking that it is valid.
Throw an exception rather than return a null pointer, except for
zero-length packets, which have somewhat implicit invalid content and
that we believe to be properly handled in all current cases.

The client-side of a packet stream cannot take corrective action if the
server-side is sending packets with invalid content, but the servers
that provide packet streams should catch this exception to detect
misbehaving clients.

Ref #3059
2018-11-29 11:54:29 +01:00
Emery Hemingway
7a11384177 Merge pthread into libc library
The pthread API is considered a standard feature of libc so better to
simply merge it with the libc. Pthreads are in fact already a part of
the libc in the form of weak symbols. This merger is also a prerequisite
for better integrating pthreads with the libc I/O task.

Fix #3054
2018-11-29 11:46:01 +01:00
Christian Helmuth
70e7499e48 depot: update recipe hashes 2018-11-16 15:07:53 +01:00
Christian Helmuth
0867da28a2 depot: update recipe hashes 2018-10-29 09:36:23 +01:00
Christian Helmuth
9ca214eee8 usb: quickfix pointer-emulation for touch screen
Move button-event reporting behind pointer-position update.

This is just a quickfix to restore correct pointer emulation with
dde_linux usb_drv. It does not change usb_hid_drv because the approach
is a questionable workaround of the current input event handling, which
reports events promptly on occurrence of inputs events and ignores
synchronization events completely. The original contrib code reported
the button press before absolute x and y positioning followed by a sync
event.

Issue #3019
2018-10-29 09:36:22 +01:00
Alexander Boettcher
5446c52c43 base: make Entrypoint placeable on specific cpu
Fixes #3008
2018-10-29 09:36:22 +01:00
Christian Helmuth
e88081a454 depot: update recipe hashes 2018-10-01 11:25:03 +02:00
Christian Prochaska
9c6120ccad usb_drv: call 'mod_timer()' with absolute timeout value
Fixes #3001
2018-10-01 10:41:46 +02:00
Josef Söntgen
018aebc0c8 wifi_drv: re-arm scan timer when enabled again
Issue #2988.
2018-09-21 15:51:58 +02:00
Josef Söntgen
f888c70982 wifi_drv: use dynamic allocations for AP list
Issue #2988.
2018-09-21 15:51:33 +02:00
Christian Helmuth
0f9059dea8 depot: update recipe hashes 2018-09-21 13:24:46 +02:00
Josef Söntgen
293e86eda9 wifi_drv: update README to reflect current state
Issue #2988.
2018-09-20 09:06:18 +02:00
Josef Söntgen
ecccbb46cb wifi_drv: add hidden network support
Fixes #2988.
2018-09-20 09:06:17 +02:00
Josef Söntgen
8193e7b3b4 wifi_drv: schedule on socket call kick
Issue #2988.
2018-09-20 09:06:17 +02:00
Christian Helmuth
5dcf06d208 depot: update recipe hashes 2018-09-13 15:21:26 +02:00
Martin Stein
590ad78bfd nic_router_uplinks.run: make it easier to debug
Issue #2973
2018-09-13 15:21:13 +02:00
Martin Stein
d0aa699299 nic_router_uplinks.run: adapt to new wifi driver
Issue #2973
2018-09-13 15:21:13 +02:00
Josef Söntgen
040eae4806 wifi_drv: fix tasklet_schedule
The tasklet_schedule implementation was missing the unblock call, which
was no problem in the past because the correspending task would get un-
blocked by other work items. Now that every workqueue has its own task,
there is nobody left to unblock the task and thereby execute the
tasklet. As a tasklet is the only way to transmit any pending frames
after transmission was temporarily suspended - because the device/fw
was not able to process the TX request - this rendered 6xxx devices
unusable whenever this situation occurred.

Fixes #2973.
2018-09-13 15:21:13 +02:00
Stefan Kalkowski
76e9645787 dde_linux: support of GSIs in new usb_host_drv 2018-09-13 15:21:11 +02:00
Martin Stein
770fc77584 dde_linux lx_emul wait: get rid of unused args 2018-09-13 15:21:11 +02:00
Alexander Boettcher
4ca8e31e00 intel_fb: enable Intel VBT lookup via ACPI
Fixes #2965
2018-09-13 14:54:21 +02:00
Stefan Kalkowski
9221f7916a dde_linux: enable QEMU support for new usb_hid_drv 2018-09-13 14:54:21 +02:00
Stefan Kalkowski
1ec2f43713 dde_linux: use correct type in lx_emul's min
* use a macro for `min` inside lx_emul/kernel.h
* unify the definition of the clamp function

Fix #2964
2018-09-13 14:54:20 +02:00
Alexander Boettcher
dbb37607c5 usb: fix regression in setup_timer
introduced by update to 4.16.3. Fixes page faults in OHCI USB driver part.

Issue #2963
2018-09-05 11:08:25 +02:00
Norman Feske
2049498af0 depot: update recipe hashes 2018-09-05 11:04:24 +02:00
Josef Söntgen
b93f15046c dde_linux: remove unused WPA code in src archive
Rather than removing the source files during the port preration, which
breaks preparing the port anew, they are now removed while creating
the src archive.

Fixes #2959.
2018-09-05 11:04:23 +02:00
Emery Hemingway
fcbe060096 Remove legacy lwIP plugins
Now that the lwIP VFS plugin has become a first class IP stack it is
time to remove the lwIP 1.x library and the associated libc plugins.

Fix #2958
2018-09-05 11:04:22 +02:00
Norman Feske
bbff6ae529 dde_linux: keep .git contrib directory
This is a follow-up commit to "dde_linux: remove unused WPA supplicant
code" that prevents the potential data loss described in #2959.
2018-09-03 16:53:30 +02:00
Christian Helmuth
c2e0d0ae20 depot: update recipe hashes 2018-08-30 09:25:10 +02:00
Josef Söntgen
8c9ea49ff5 dde_linux: remove unused WPA supplicant code
Since we use the git repo by now remove all unnecessary ballast like
unused code and the git history. The will bring down the wifi_drv's
src archive to reasonable size again.
2018-08-30 09:24:46 +02:00
Stefan Kalkowski
2882bd48e6 dde_linux: USB client driver for NIC version 4.16 2018-08-30 09:24:46 +02:00
Stefan Kalkowski
b32a3cd4d9 dde_linux: USB-client driver for HID version 4.16 2018-08-30 09:24:45 +02:00
Stefan Kalkowski
b02f483841 dde_linux: usb host controller driver version 4.16 2018-08-30 09:24:45 +02:00
Christian Helmuth
44a8bec56a dde_linux: streamline strlcpy/strlcat implementations 2018-08-28 16:48:46 +02:00
Christian Prochaska
aa909702c6 vfs_lxip: fix 'sendmsg()' result interpretation
Issue #2920
2018-08-28 16:45:24 +02:00
Josef Söntgen
6238d61f7e nic_router_uplinks.run: adapt to wifi_drv front end changes 2018-08-28 16:45:23 +02:00
Josef Söntgen
6f62f5d428 wifi: fix missing regulatory DB 2018-08-28 16:45:23 +02:00
Josef Söntgen
ec9e8ecfaa wifi_drv: enable soft RFKILL and new front end
* TODO
2018-08-28 16:18:34 +02:00
Josef Söntgen
870505bcd9 wifi: update iwlwifi to 4.16.3 2018-08-28 16:18:33 +02:00
Alexander Boettcher
eb62d9cc04 dde_linux: update intel_fb to 4.16.3
Fixes #2736
2018-08-28 16:18:33 +02:00
Josef Söntgen
80104f5192 usb: adapt to lx_kit/lx_emul update 2018-08-28 16:18:32 +02:00
Josef Söntgen
05179409be fec: adapt to lx_kit/lx_emul update 2018-08-28 16:18:32 +02:00
Josef Söntgen
ced585fd5e lxip: adapt to lx_kit/lx_emul updates 2018-08-08 13:33:38 +02:00
Alexander Boettcher
2efc64ace7 lx_kit: adjust to 4.16.3 2018-08-08 13:33:37 +02:00
Christian Helmuth
f4ea50c6ff depot: update recipe hashes 2018-08-08 10:59:04 +02:00
Emery Hemingway
a7e5d4ef03 LxIP: propagate write errors using SYNC_ERR_INVALID
The libc sockets implementation already syncs socket control files after
writes, so sync errors will induce failures for operations such as
"connect".

Fix #2920
2018-08-02 14:36:49 +02:00
Emery Hemingway
d9a4773194 LwIP VFS plugin
This patch reintroduces the LwIP stack to libc as a VFS plugin
implementing the socket_fs interface. Rather than use LwIP's socket
emulation layer this plugin interfaces directly to LwIP raw API and is
single threaded.

The internal TCP parameters of the stack are untuned.

Fix #2050
Fix #2335
2018-08-02 14:36:48 +02:00
Sebastian Sumpf
037a0d6822 usb_drv: add isochronous packet support
Commit extents USB session an driver accordingly.

issue #2910
2018-08-02 14:36:46 +02:00
Christian Prochaska
b2f7a6a934 vfs_lxip: look up path in 'leaf_path()'
Fixes #2913
2018-08-02 14:36:43 +02:00
Norman Feske
953c62c04c dde_linux: removed libc_setjmp dependency
This is no longer needed since dde_linux uses the lx_kit_setjmp
library now.
2018-08-02 14:36:39 +02:00
Christian Helmuth
b485caf33c depot: update recipe hashes 2018-07-03 09:40:11 +02:00
Sebastian Sumpf
10485b0d39 run: rename 'check_installed' to 'installed_command'
Also remove 'requires_installation_of', while also checking sbin
directories in 'have_installed'. The run scripts have been adjusted
accordingly.

Fixes #2853
2018-07-03 09:39:31 +02:00
Christian Prochaska
38ae718509 usb_drv: wait for keyboard LED registry in 'led_connect()'
It can happen that a keyboard gets plugged in and 'led_connect()' is
called while the keyboard LED of another keyboard is just being updated
(and the registry is locked).

Fixes #2869
2018-06-29 10:44:56 +02:00
Martin Stein
49a3a0e0d0 nic_router: multiple uplinks
Introduce the uplink tag:

! <config>
!    <uplink label="wifi"  domain="uplink">
!    <uplink label="wired" domain="wired_bridge">
!    <uplink               domain="wired_bridge">
! <config/>

For each uplink tag, the NIC router requests a NIC session with the
corresponding label or an empty label if there is no label attribute.
These NIC sessions get attached to the domain that is set in their
uplink tag as soon as the domain appears. This means their lifetime is
not bound to the domain. Uplink NIC sessions can be safely moved from
one domain to another without being closed by reconfiguring the
corresponding domain attribute.

Attention: This may render previously valid NIC router configurations
useless. A domain named "uplink" doesn't automatically request a NIC
session anymore. To fix these configurations, just add

! <uplink domain="uplink"/>

or

! <uplink label="[LABEL]" domain="uplink"/>

as direct subtag of the <config> tag.

Issue #2840
2018-06-29 10:44:53 +02:00
Christian Helmuth
246bacd9da depot: update recipe hashes 2018-06-13 13:52:12 +02:00
Christian Helmuth
91b2e023b8 vfs/lxip: make gateway config attribute optional
This enables the application in router/gateway-less network
configurations, e.g., test environments.
2018-06-12 12:11:46 +02:00
Christian Helmuth
bd86efe5fe depot: update recipe hashes 2018-05-31 14:02:21 +02:00
Martin Stein
1306892fbf nic_router: fix interface update on missing domain
When updating an interface in the NIC router to a new configuration and
the domain name of the interface has not changed but the domain
disappeared, the NIC router did not detach from the old domain correctly
which led to broken remnants of interface state objects (like connection
states).

Adapt the nic_router_uplinks run script to work with the fix.
2018-05-31 12:28:15 +02:00
Martin Stein
f278a3bafb nic_router_uplinks.run: test uplink re-connect
Automated test for switching the NIC-router uplink between NIC driver and Wifi
driver with DHCP and different subnets. Tests also removal and later re-
insertion of the uplink domain tag.

Issue #2815
2018-05-30 13:36:35 +02:00
Christian Helmuth
aa8b725457 wifi: don't generate unused files in port 2018-05-30 13:36:25 +02:00
Emery Hemingway
72cb71c827 Replace SHA1 hashes of port downloads with SHA256
Now SHA256 has been shown to be an adequate replacement for SHA1, use
SHA256 for verifying all port downloads.

Ref #2767
2018-05-30 13:36:22 +02:00
Emery Hemingway
e36ddaf659 Rename lwip library to lwip_legacy
Rename LwIP library in preparation for removal of LwIP libc plugin. The
current LwIP library will be replaced with a new version stripped of its
synchronous socket support. The next version will be incompatible with
the current, so removing 'lwip.lib.so' completely for a period makes it
easy to identify legacy users.

Fix #2797
2018-05-30 13:36:22 +02:00
Emery Hemingway
e2661c58dc Convert static VFS library to dynamic library
Fix #2759
2018-05-30 12:26:19 +02:00
Christian Helmuth
3b7d6394d7 depot: update recipe hashes 2018-05-03 15:32:01 +02:00
Emery Hemingway
401ba6e7fd Manage socket_fs socket lifetime via handles
Socket_fs sockets are now created each time a 'new_socket' control file
is opened, not each time a 'new_socket' file is read. When a handle on a
'new_socket' file is closed the socket and its socket files are
destroyed. The accept control file on a listening socket reads "1" or
reads nothing to indicate a client connection is queued. Client sockets
are accepted by opening an 'accept_socket' file in the listen socket
directory. This file behaves like the aforementioned 'new_socket' file.

Ref #2707
2018-05-03 15:31:57 +02:00
Norman Feske
afcad2a968 os: new Input::Event representation
This commit changes the 'Input::Event' type to be more safe and to
deliver symbolic character information along with press events.

Issue #2761
Fixes #2786
2018-05-03 15:31:25 +02:00
Christian Helmuth
47569458d4 depot: update recipe hashes 2018-04-19 12:39:20 +02:00
Emery Hemingway
82a683eccc VFS: construct file-systems using Vfs::Env object
Reduce the size and forward compatibility of VFS file-system
constructors by passing an object holding accessors for 'Genode::Env',
'Genode::Allocator', response handlers, and the root file-system.

Fix #2742
2018-04-19 12:38:27 +02:00
Stefan Kalkowski
2af5dbc201 dde_linux: enable more platforms for nic_drv
In addition to the i.MX6Q SoC, the Freescale network driver
works now on i.MX6SX and i.MX53 SoCs.

Ref #2749
2018-04-19 12:38:24 +02:00
Stefan Kalkowski
a3171befe9 dde_linux: canceling a pending work is no error
Ref #2749
2018-04-19 12:38:24 +02:00
Christian Helmuth
d54f95d497 depot: update recipe hashes 2018-04-10 13:03:26 +02:00
Norman Feske
b0b92e4ee2 vfs: pass root directory to plugins
This patch enables the use of the VFS from VFS plugins by passing a
reference of the root directory to the constructors of file-system
instances. Since it changes the signature of 'Vfs::Dir_file_system',
any code that uses the VFS directly requires an adaptation.

Fixes #2701
2018-04-10 11:09:17 +02:00
Sebastian Sumpf
f61c0c6309 lx_kit: Do not align DMA memory kmalloc
Aligning memory to page size will require at lead 8KB per allocation (even for 8
bytes). This should severely reduce memory requirements of all dde_linux
projects.

related to #2731
2018-04-10 11:09:17 +02:00
Sebastian Sumpf
eab4c887ec usb: fix memory leaks during device disconnect
fixes #2731
2018-04-10 11:09:17 +02:00
Alexander Boettcher
de82980e89 wandboard: improve memory usage of ethernet driver
Use a 8K slab entry instead of 16K slab entry, per 2K
network packet.

Issue #2665
2018-04-10 11:09:16 +02:00
Alexander Boettcher
fce15b4f13 sel4: adjust network scenarios for wandboard
Issue #2665
2018-04-10 11:09:16 +02:00
Christian Helmuth
b07d6eced8 depot: update recipe hashes 2018-03-29 14:59:07 +02:00
Boris Mulder
964aac599c wpa_supplicant: report auth_failures
Fixes #2668
2018-03-08 15:45:34 +01:00
Christian Helmuth
1f7b5e75bf depot: update recipe hashes 2018-03-08 12:05:10 +01:00
Christian Helmuth
a8f186c7d4 depot: update recipe hashes 2018-02-28 11:05:05 +01:00
Stefan Kalkowski
9f945a782f run: enable Wandquad board for network tests
Ref #2665
2018-02-28 11:04:57 +01:00
Stefan Kalkowski
d5dc234a00 dde_linux: wandboard ethernet driver
Fixes #2665
2018-02-28 11:04:56 +01:00
Emery Hemingway
590f51dbe1 dde_linux: Build net/ipv4/datagram.c for UDP connect
Fix #2683
2018-02-28 11:01:32 +01:00
Norman Feske
5261462d7a depot: src/vfs_lxip recipe 2018-02-28 11:01:31 +01:00
Emery Hemingway
f177107a4f Fix string handling in Lxip
Use a utility method to copy application provided strings into control
file buffers. This fixes an potential connect error.

Ref #2535
2018-02-28 11:01:31 +01:00
Emery Hemingway
01800ad1a3 vfs_lxip: check that socket is ready for I/O
Check that the Linux socket structure is populated before performing
read or write operations on control files.

Fix #2679
2018-02-28 11:01:31 +01:00
Norman Feske
7bee21a4fd depot: fix firmware name in pkg/wifi/runtime 2018-02-19 20:50:48 +01:00
Norman Feske
e79ce5a036 depot: update recipe hashes 2018-02-16 08:42:31 +01:00
Josef Söntgen
d4576833d6 dde_linux: silence waitqueue related warnings 2018-02-16 08:42:30 +01:00
Norman Feske
fc902b797e depot: runtime definitions for sculpt installation
This patch supplements 'runtime' files to several pkg archives,
which thereby become deployable by the depot_deploy tool.

Issue #2676
2018-02-15 10:22:10 +01:00
Emery Hemingway
d82ddeeaff Add Intel Wireless-N 1000 to raw/wifi_firmware
Fix #2674
2018-02-14 20:41:07 +01:00
Norman Feske
8aa1e349fc terminal session: propagate resize events
The new 'Terminal_session::size_changed_sigh' RPC function registers a
signal handler that is triggered each time when the terminal size
changes. It enables the client to adjust itself to the new size by
subsequently calling the 'size' RPC function. Of all terminal servers,
only the graphical terminal triggers this signal.
2018-02-14 20:41:03 +01:00
Norman Feske
8d09d02b85 depot: update recipe hashes 2018-02-09 13:34:24 +01:00
Christian Helmuth
bb9d15b8b9 intel_fb: prevent destruction of session singleton
Issue #2588
2018-02-09 13:34:22 +01:00
Alexander Boettcher
1f1d1af041 dde_linux: enable pci config command memory access
Issue #2620
2018-02-09 13:34:18 +01:00
Christian Helmuth
6013889028 depot: update recipe hashes 2018-01-17 12:14:44 +01:00
Martin Stein
8844c57254 net-stat: remove as it is not used and outdated
According to the creator of the net-stat lib, this lib was a mere debugging
tool that is not used anymore nor worth the work of updating the it to
modern Genode coding paradigms. Also, there exist no tests for the lib.
2018-01-17 12:14:42 +01:00
Norman Feske
366bba0227 Exclude higher-level repos from strict warnings
This is a follow-up commit to "Increase default warning level", which
overrides Genode's new default warning level for targets contained in
higher-level repositories. By explicitly whitelisting all those targets,
we can selectively adjust them to the new strictness over time - by
looking out for 'CC_CXX_WARN_STRICT' in the target description files.

Issue #465
2018-01-17 12:14:36 +01:00
Norman Feske
eba9c15746 Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:

* A class with virtual functions can no longer publicly inherit base
  classed without a vtable. The inherited object may either be moved
  to a member variable, or inherited privately. The latter would be
  used for classes that inherit 'List::Element' or 'Avl_node'. In order
  to enable the 'List' and 'Avl_tree' to access the meta data, the
  'List' must become a friend.

* Instead of adding a virtual destructor to abstract base classes,
  we inherit the new 'Interface' class, which contains a virtual
  destructor. This way, single-line abstract base classes can stay
  as compact as they are now. The 'Interface' utility resides in
  base/include/util/interface.h.

* With the new warnings enabled, all member variables must be explicitly
  initialized. Basic types may be initialized with '='. All other types
  are initialized with braces '{ ... }' or as class initializers. If
  basic types and non-basic types appear in a row, it is nice to only
  use the brace syntax (also for basic types) and align the braces.

* If a class contains pointers as members, it must now also provide a
  copy constructor and assignment operator. In the most cases, one
  would make them private, effectively disallowing the objects to be
  copied. Unfortunately, this warning cannot be fixed be inheriting
  our existing 'Noncopyable' class (the compiler fails to detect that
  the inheriting class cannot be copied and still gives the error).
  For now, we have to manually add declarations for both the copy
  constructor and assignment operator as private class members. Those
  declarations should be prepended with a comment like this:

        /*
         * Noncopyable
         */
        Thread(Thread const &);
        Thread &operator = (Thread const &);

  In the future, we should revisit these places and try to replace
  the pointers with references. In the presence of at least one
  reference member, the compiler would no longer implicitly generate
  a copy constructor. So we could remove the manual declaration.

Issue #465
2018-01-17 12:14:35 +01:00
Christian Helmuth
553cf556af depot: update recipe hashes 2017-12-21 15:01:56 +01:00
Christian Helmuth
25ca29002e depot: update recipe hashes 2017-11-30 11:24:49 +01:00
Alexander Boettcher
f68be31fa3 usb_hid.run: filter_out messages from core 2017-11-30 11:23:20 +01:00
Christian Helmuth
d5518aa938 lib/vfs/lxip: support configuration of MTU
The MTU can be set via the "mtu" attribute like follows.

  <vfs> <lxip mtu="1200" dhcp="yes"/> </vfs>
2017-11-30 11:23:18 +01:00
Christian Helmuth
64c8b06377 dde_linux: fix mod_delayed_work(delay)
'delay' is a relative timeout while mod_timer() needs an absolute point
in time.
2017-11-30 11:23:17 +01:00
Christian Helmuth
73a3ef4dbe lib/vfs/lxip: stack info (nameserver etc.) in test 2017-11-30 11:23:17 +01:00
Martin Stein
ea76b08f9f lib/vfs/lxip: provide nic link state in a file 2017-11-30 11:23:17 +01:00
Sebastian Sumpf
9d0518661b usb: remove warning in 'find_next_zero_bit_le'
in case no zero bit is found.
2017-11-30 11:23:13 +01:00
Sebastian Sumpf
fe4f304815 usb: LED suppport 2017-11-30 11:23:11 +01:00
Josef Söntgen
b3b10c1439 dde_linux: create wifi recipe 2017-11-30 11:23:07 +01:00
Martin Stein
f831800ae0 test/lxip/udp_client: remove because not used
Was once introduced it for the NIC router/dump tests which do not use it
anymore.

Fix #2543
2017-11-30 11:23:03 +01:00
Martijn Verschoor
55a014acbc dde_linux wifi: firmware for Intel Wireless 3160
Fixes #2572
2017-11-30 11:23:02 +01:00
Stefan Kalkowski
83a88d46b7 dde_linux: remove timer optimization
Instead of storing whether the first item in the timeout list was already
programmed using the timer service, just program the first timeout in the
list unconditionally. In the past we lost a timeout at least when using the
usb ethernet driver on hw/arndale sporadically.
2017-11-30 11:23:01 +01:00
Christian Helmuth
491be000ca depot: update recipe hashes 2017-11-09 12:19:59 +01:00
Josef Söntgen
bc6f523c8d wifi: initialize 'struct device' member properly
Normally this is done in 'platform_device_add()' but let's do it in
our 'platform_device_register_simple()' implementation.
2017-11-09 12:18:41 +01:00
Norman Feske
96351801c9 wifi_drv: implement vzalloc
This function is called by the rarely executed error handling code
(iwl_mvm_fw_error_dump) of wifi.lib.so.
2017-11-09 12:18:41 +01:00
Alexander Senier
66f3742112 dde_linux/usb: Support HTC device in RNDIS test
Fixes #2550
2017-11-09 12:18:40 +01:00
Alexander Senier
77010d6434 dde_linux/usb: Don't treat trimming SKB to current len as error
The rndis_host driver calls skb_trim with the current SKB length which
results in many "errors" logged. We shouldn't treat this condition
as an error.
2017-11-09 12:18:39 +01:00
Alexander Senier
f15e8fec8f dde_linux/usb: Add RNDIS driver 2017-11-09 12:18:39 +01:00
Alexander Senier
50ec5c03c1 dde_linux/usb: Support CDC Ethernet 2017-11-09 12:18:39 +01:00
Alexander Senier
6d69f946a8 dde_linux/usb: Do not unset carrier flag in register_netdev
Linux does not do that in register_netdev() either. Some drivers set the
carrier flags on attach and never reenable it (as seen with rndis_host).
Consequently, the usbnet driver refuses to receive data as it checks the
carrier state before enqueuing new SKBs to its receive queue.

Apart from rndis_host, this change was tested with an ax88179_178a
device which worked as expected.
2017-11-09 12:18:06 +01:00
Alexander Senier
aa0f13fba5 dde_linux/usb: Initialize head pointer of SKB 2017-11-09 12:18:06 +01:00
Alexander Boettcher
c1493b2ed2 usb: avoid pagefault during session destruction
due to pointer to object allocated in context of the session object.

Fixes #2565
2017-11-09 12:18:05 +01:00
Christian Helmuth
30948a4b0d depot: update recipe hashes 2017-11-06 13:57:25 +01:00
Josef Söntgen
2f32308c0b wifi_drv: use task for sending frames
Until now the client called the Linux code directly through the EP
when sending ethernet frames and was not part of the driver's internal
task scheduling. This will lead to problems if the sending code needs
to grab a lock as those depend on running from within a Lx::Task.
Although this has only happend recently when using 8260 devices, this
is an issue that needs to be fix.

This commit addresses the issue by using a dedicated transmit task
in whose context the Linux code sends the ethernet frame or rather
newly allocated skb.

Fixes #2559.
2017-11-06 13:57:24 +01:00
Josef Söntgen
bb95121ee5 wifi_drv: remove unnecessary debug message
AFAICT, we do the right thing by calling 'consume_skb()'.

Issue #2559.
2017-11-06 13:57:24 +01:00
Sebastian Sumpf
3409eeeb34 wifi_drv: occasionally crashes during session destruction
Drop rx-packets in case there is no client session

fixes #2557
2017-11-06 13:57:21 +01:00
Emery Hemingway
6aba4871a7 lib/vfs/lxip: allow missing nameserver configuration
Ref #2535
2017-11-06 13:57:17 +01:00
Christian Helmuth
ee4ee6a8ac depot: update recipe hashes 2017-10-19 13:31:18 +02:00
Sebastian Sumpf
7a359f95a3 wifi: use with libc in config update 2017-10-05 17:40:05 +02:00
Emery Hemingway
8ca63d4a6e libc: reintegrate libc_resolv library
Remove getaddrinfo and freeaddrinfo from the Libc::Plugin and get rid of
the extra libc_resolv library. Remove getaddrinfo/freeaddrinfo symbol
hiding patch for FreeBSD sources. Remove libc_resolv from Makefiles and
run scenarios.

Fix #2273
2017-10-05 17:40:04 +02:00
Christian Helmuth
b3f620436c dde_linux: fix timer deletion and modification (lx_kit) 2017-10-05 17:40:03 +02:00
Christian Helmuth
7b9edcf90c lxip: fix timer deletion and modification
Linux del_timer() and mod_timer() return if the timer was pending before
the modification. Additionally, these functions are potentially called
from handler function of the timer to modify and, therefore, checking
for timeout != INVALID_TIMEOUT is not sufficient as the timeout is
indeed valid when the handler is executed.
2017-10-05 17:40:03 +02:00
Christian Helmuth
9ff82d76c0 lxip: fix timer handling and jiffies update 2017-10-05 17:40:03 +02:00
Christian Helmuth
ad49fba42a Fix syntax in lxip_udp_echo run script
Thanks to Steven Harp for reporting.
2017-10-05 17:40:02 +02:00
Alexander Boettcher
c66c23b7f1 intel_fb: avoid assertion on X201
Issue #2208
2017-10-05 17:40:00 +02:00
Christian Helmuth
d80fadc635 intel_fb: optionally respect connector hz config 2017-10-05 17:39:59 +02:00
Christian Helmuth
c63f7725be intel_fb: support forced virtual framebuffer size 2017-10-05 17:39:59 +02:00
Christian Helmuth
02d7b401fe intel_fb: initial backlight brightness of 75% 2017-10-05 17:39:59 +02:00
Norman Feske
14b5e81f1e depot: recipe for src/intel_fb_drv 2017-10-05 17:39:58 +02:00
Christian Helmuth
b586b00845 Fix typo in usb_hid test script 2017-10-05 17:39:56 +02:00
Christian Helmuth
2ed904faab depot: update recipe hashes 2017-08-30 12:41:43 +02:00
Martin Stein
570b5a6920 libc_resolv/_lxip: fix undefined references...
... to Libc::Plugin::getdirentries, Libc::Plugin::mmap, and
Libc::Plugin::msync.

Ref #2490
2017-08-30 10:01:35 +02:00
Christian Helmuth
28764e2332 Increase cap quota for wifi_drv 2017-08-30 10:01:35 +02:00
Christian Helmuth
ae0c9e7692 Increase cap quota for usb_drv 2017-08-30 10:00:00 +02:00
Emery Hemingway
1fce8d0d74 default ahci_drv and part_blk Block sessions to read-only
Add a "writeable" policy option to the ahci_drv and part_blk Block
servers and default from writeable to ready-only. Should a policy
permit write acesss the session request argument "writeable" may still
downgrade a session to ready-only.

Fix #2469
2017-08-28 16:49:51 +02:00
Christian Prochaska
ee352abc56 run: add Xen support
When building Genode on a Linux system running in a Xen Dom0, the 'xen'
run target can run a Genode scenario in a Xen DomU.

Usage: in build/x86_*/etc/build.conf, define:

RUN_OPT = --include boot_dir/$(KERNEL) --include image/iso --include power_on/xen --include log/xen --include power_off/xen

The Xen DomU runs in HVM mode and loads Genode from an ISO image. Serial
log output is printed to the console and graphical output is shown in an
SDL window.

The Xen DomU ist managed using the 'xl' command line tool and it is
possible to add configuration options in the 'xen_args' variable in a run
script. Common options are:

- disabling the graphical output:

  append xen_args { sdl="0" }

- configuring a network device:

  append xen_args { vif=\["model=e1000,mac=02:00:00:00:01:01,bridge=xenbr0"\] }

- configuring USB input devices:

  append xen_args { usbdevice=\["mouse","keyboard"\] }

Note: the 'xl' tool requires super-user permissions and interactive
password input can be troublesome in combination with 'expect' and is not
practical for automatic tests. For this reason, the current implementation
assumes that no password input is needed when running 'sudo xl', which can
be achieved by creating a file '/etc/sudoers.d/xl' with the content
'user ALL=(root) NOPASSWD: /usr/sbin/xl'
(where 'user' is the Linux user name).

Fixes #2504
2017-08-28 16:49:48 +02:00
Christian Prochaska
e90d21c9ab wifi_drv: add missing 'Libc::with_libc()'
Fixes #2506
2017-08-28 16:49:45 +02:00
Christian Prochaska
b0935ef9b2 VFS: nonblocking interface
The VFS library can be used in single-threaded or multi-threaded
environments and depending on that, signals are handled by the same thread
which uses the VFS library or possibly by a different thread. If a VFS
plugin needs to block to wait for a signal, there is currently no way
which works reliably in both environments.

For this reason, this commit makes the interface of the VFS library
nonblocking, similar to the File_system session interface.

The most important changes are:

- Directories are created and opened with the 'opendir()' function and the
  directory entries are read with the recently introduced 'queue_read()'
  and 'complete_read()' functions.

- Symbolic links are created and opened with the 'openlink()' function and
  the link target is read with the 'queue_read()' and 'complete_read()'
  functions and written with the 'write()' function.

- The 'write()' function does not wait for signals anymore. This can have
  the effect that data written by a VFS library user has not been
  processed by a file system server yet when the library user asks for the
  size of the file or closes it (both done with RPC functions at the file
  system server). For this reason, a user of the VFS library should
  request synchronization before calling 'stat()' or 'close()'. To make
  sure that a file system server has processed all write request packets
  which a client submitted before the synchronization request,
  synchronization is now requested at the file system server with a
  synchronization packet instead of an RPC function. Because of this
  change, the synchronization interface of the VFS library is now split
  into 'queue_sync()' and 'complete_sync()' functions.

Fixes #2399
2017-08-28 16:49:38 +02:00
Martin Stein
47dc708887 usb rpi: get rid of local hardware timer
We used a hardware timer locally in the RPI USB driver because a timer
connection was not precise enough to fullfill the host controllers
requirements.

With the modern timer connection interface, however, reading out time at
a connection is microseconds precise and we can remove the local timer.
But we cannot use the same timer connection for doing legacy-interface
stuff like usleep (currently used in LX kit) and modern-interface stuff
like curr_time. Thus, we open two connections for now.

Ref #2400
2017-08-23 14:08:37 +02:00
Christian Helmuth
8b073f46df depot: update recipe hashes 2017-08-18 10:25:28 +02:00
Alexander Boettcher
6f8cc92ce0 run: disable some scripts in autopilot mode
because of the limit hardware features of our x86 32bit test hardware
2017-08-18 10:24:48 +02:00
Sebastian Sumpf
5adda2d934 usb: add asynchronous interface release
This became necessary, since URBs may still be pending upon interface
release.

Fixes #2466
2017-08-17 11:04:22 +02:00
Christian Helmuth
31cffe52a6 usb_terminal: remove obsolete vendor/product enums 2017-08-17 11:04:20 +02:00
Norman Feske
50a1b84308 usb_drv: wait for first valid config
This patch defers the initialization of the USB driver until its
configuration is valid.
2017-08-17 10:59:44 +02:00
Norman Feske
0d1be4abe2 depot: update recipe hashes 2017-06-29 12:00:04 +02:00
Christian Helmuth
892ede515f depot: update recipe hashes 2017-05-31 16:18:01 +02:00
Christian Helmuth
8bd0efced6 Remove obsolete RAM/CAP services from run scripts
Adapted launchpad and also the rm_fault and resource_request tests.

Issue #2407
2017-05-31 13:16:22 +02:00
Stefan Kalkowski
632ef28463 os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
Christian Helmuth
a431657851 lxip: correct msghdr initialization 2017-05-31 13:16:21 +02:00
Stefan Kalkowski
0fb672b493 run: use default Qemu memory size for x86
Fix #2428
2017-05-31 13:16:19 +02:00
Emery Hemingway
c1edfa5d46 lib/vfs/lxip: return READ_QUEUED from read_queued and complete_read
Ref #2406
2017-05-31 13:16:17 +02:00
Christian Helmuth
d0bc389e93 vfs_lxip: correctly initialize iov on remote-file read 2017-05-31 13:16:16 +02:00
Josef Söntgen
5b6735e1c9 lxip: fix iovec iter operations 2017-05-31 13:16:15 +02:00
Martin Stein
c70fed29f7 os/timer: interpolate time via timestamps
Previously, the Genode::Timer::curr_time always used the
Timer_session::elapsed_ms RPC as back end.  Now, Genode::Timer reads
this remote time only in a periodic fashion independently from the calls
to Genode::Timer::curr_time. If now one calls Genode::Timer::curr_time,
the function takes the last read remote time value and adapts it using
the timestamp difference since the remote-time read. The conversion
factor from timestamps to time is estimated on every remote-time read
using the last read remote-time value and the timestamp difference since
the last remote time read.

This commit also re-works the timeout test. The test now has two stages.
In the first stage, it tests fast polling of the
Genode::Timer::curr_time. This stage checks the error between locally
interpolated and timer-driver time as well as wether the locally
interpolated time is monotone and sufficiently homogeneous. In the
second stage several periodic and one-shot timeouts are scheduled at
once. This stage checks if the timeouts trigger sufficiently precise.

This commit adds the new Kernel::time syscall to base-hw. The syscall is
solely used by the Genode::Timer on base-hw as substitute for the
timestamp. This is because on ARM, the timestamp function uses the ARM
performance counter that stops counting when the WFI (wait for
interrupt) instruction is active. This instruction, however is used by
the base-hw idle contexts that get active when no user thread needs to
be scheduled.  Thus, the ARM performance counter is not a good choice for
time interpolation and we use the kernel internal time instead.

With this commit, the timeout library becomes a basic library. That means
that it is linked against the LDSO which then provides it to the program it
serves. Furthermore, you can't use the timeout library anymore without the
LDSO because through the kernel-dependent LDSO make-files we can achieve a
kernel-dependent timeout implementation.

This commit introduces a structured Duration type that shall successively
replace the use of Microseconds, Milliseconds, and integer types for duration
values.

Open issues:

* The timeout test fails on Raspberry PI because of precision errors in the
  first stage. However, this does not render the framework unusable in general
  on the RPI but merely is an issue when speaking of microseconds precision.

* If we run on ARM with another Kernel than HW the timestamp speed may
  continuously vary from almost 0 up to CPU speed. The Timer, however,
  only uses interpolation if the timestamp speed remained stable (12.5%
  tolerance) for at least 3 observation periods. Currently, one period is
  100ms, so its 300ms. As long as this is not the case,
  Timer_session::elapsed_ms is called instead.

  Anyway, it might happen that the CPU load was stable for some time so
  interpolation becomes active and now the timestamp speed drops. In the
  worst case, we would now have 100ms of slowed down time. The bad thing
  about it would be, that this also affects the timeout of the period.
  Thus, it might "freeze" the local time for more than 100ms.

  On the other hand, if the timestamp speed suddenly raises after some
  stable time, interpolated time can get too fast. This would shorten the
  period but nonetheless may result in drifting away into the far future.
  Now we would have the problem that we can't deliver the real time
  anymore until it has caught up because the output of Timer::curr_time
  shall be monotone. So, effectively local time might "freeze" again for
  more than 100ms.

  It would be a solution to not use the Trace::timestamp on ARM w/o HW but
  a function whose return value causes the Timer to never use
  interpolation because of its stability policy.

Fixes #2400
2017-05-31 13:16:11 +02:00
Norman Feske
4d442bca30 Streamline exception types
This patch reduces the number of exception types by facilitating
globally defined exceptions for common usage patterns shared by most
services. In particular, RPC functions that demand a session-resource
upgrade not longer reflect this condition via a session-specific
exception but via the 'Out_of_ram' or 'Out_of_caps' types.

Furthermore, the 'Parent::Service_denied', 'Parent::Unavailable',
'Root::Invalid_args', 'Root::Unavailable', 'Service::Invalid_args',
'Service::Unavailable', and 'Local_service::Factory::Denied' types have
been replaced by the single 'Service_denied' exception type defined in
'session/session.h'.

This consolidation eases the error handling (there are fewer exceptions
to handle), alleviates the need to convert exceptions along the
session-creation call chain, and avoids possible aliasing problems
(catching the wrong type with the same name but living in a different
scope).
2017-05-31 13:16:07 +02:00
Norman Feske
773e08976d Assign cap quotas in run scripts and recipes
Issue #2398
2017-05-31 13:16:06 +02:00
Norman Feske
6609aafb05 Replace Quota_exceeded by Insufficient_ram_quota
This patch replaces the 'Parent::Quota_exceeded',
'Service::Quota_exceeded', and 'Root::Quota_exceeded' exceptions
by the single 'Insufficient_ram_quota' exception type.

Furthermore, the 'Parent' interface distinguished now between
'Out_of_ram' (the child's RAM is exhausted) from
'Insufficient_ram_quota' (the child's RAM donation does not suffice to
establish the session).

This eliminates ambiguities and removes the need to convert exception
types along the path of the session creation.

Issue #2398
2017-05-31 13:16:05 +02:00
Christian Helmuth
e9b42a127b dde_linux: download libnl from github.com/thom311
The old download location is very shaky resp. currently unavailable and
also other projects (e.g., Gentoo and Linux From Scratch) use this
location. Note, the archive hash does _not_ change.
2017-05-31 13:16:02 +02:00
Johannes Kliemann
aac0ac7c63 dde_linux: kernel-version independent file lists
Replace the version dependent file lists with generic ones to simplify
kernel version changes.

Fixes #2368
2017-05-31 13:16:02 +02:00
Norman Feske
03d7208386 Turn posix lib into shared library
By building the posix library as shared object with an ABI, we
effectively decouple posix-using programs from the library
implementation (which happens to depend on several os-level APIs such as
the VFS).
2017-05-31 13:16:02 +02:00
Stefan Kalkowski
6106e64aac base: remove include/spec/* other than ISA
This commit moves the headers residing in `repos/base/include/spec/*/drivers`
to `repos/base/include/drivers/defs` or repos/base/include/drivers/uart`
respectively. The first one contains definitions about board-specific MMIO
iand RAM addresses, or IRQ lines. While the latter contains device driver
code for UART devices. Those definitions are used by driver implementations
in `repos/base-hw`, `repos/os`, and `repos/dde-linux`, which now need to
include them more explicitely.

This work is a step in the direction of reducing 'SPEC' identifiers overall.

Ref #2403
2017-05-31 13:16:01 +02:00
Alexander Boettcher
80eddd8731 usb: add OHCI support
Fixes #2357
2017-05-31 13:16:00 +02:00
Christian Helmuth
4ab2b85437 lxip: support large sendmsg (like recvmsg)
Add missing socket wait-queue head on demand.
2017-05-31 13:15:58 +02:00
Christian Helmuth
3b5c16e307 lxip: poll/read_ready for all socket fs files 2017-05-31 13:15:58 +02:00
Christian Helmuth
1d99e7ede9 base: classify signals as I/O and application level
Fixes #2363
2017-05-31 13:15:58 +02:00
Christian Helmuth
f7313e841d vfs_lxip: always allow broadcast packets for UDP 2017-05-31 13:15:57 +02:00
Norman Feske
b58fbe5ba5 Depot-archive recipes
Issue #2339
2017-05-31 13:15:56 +02:00
Alexander Boettcher
f52eec5af7 intel_fb: avoid deprecated warnings
Issue #1987
2017-05-31 13:15:55 +02:00
Christian Helmuth
6b2d8a740d dde_linux: explicitly build C89 with GNU extensions
Issue #2372
2017-05-31 13:15:53 +02:00
Christian Helmuth
c475edccfc dde_linux: use internal setjmp/longjmp only 2017-05-02 15:29:03 +02:00
Christian Helmuth
67f22a6c90 Fix key count in input test 2017-05-02 15:29:02 +02:00
Norman Feske
7200ab2935 usb_drv: disambiguate header scan locations
When creating a source archive for the USB driver, both the contrib and
Genode-specific source codes are merged into a single directory
structure. In this case, the original way of determining the Linux
source code to scan for #include directives would apply the scanning to
Genode-specific source codes too. This patch tightens the search
criterion such that only Linux source codes are processed.
2017-05-02 15:29:02 +02:00
Norman Feske
075c32409a usb_drv: Add missing definition of __aligned macro
This macro is implicitly pulled in by libc-setjmp (via the libc's
cdefs.h). However, apparently not all sources include <setjmp.h>.
Unfortunately, for sources that do, this change produces a
double-definition warning. We should fix it by removing the dependency
from the libc's setjmp.
2017-05-02 15:29:02 +02:00
Alexander Boettcher
2668a55688 usb_drv: fix various nullpointer in raw binding
during reset of a VM, usb device ejected before hand:

ded! amount=27941, size=4096, consumed=24576
Warning: could not allocate metadata
[init -> nit_fb1] using xywh=(0,0,2560,1440)
[init -> usb_drv] dev_info: new SuperSpeed USB device number 2 using xhci_hcd
[init -> vbox1] Attach USB device 0002:0002 (vendor=951, product=16a5)
Warning: Quota exceeded! amount=36133, size=4096, consumed=32768
Warning: could not allocate metadata
[init -> nit_fb1] using xywh=(0,0,2560,1440)
[init -> vbox1] EMT-0    VMMDev: Guest Additions capability report: (0x5 -> 0x5) seamless: yes, hostWindowMapping: no, graphics: yes
[init -> vbox1] EMT-0    VMMDev: Guest Additions capability report: (0x5 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
[init -> vbox1] EMT-0    VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
[init -> vbox1] EMT-1    VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
Warning: Quota exceeded! amount=44325, size=4096, consumed=40960
Warning: could not allocate metadata
[init -> vbox1] fb resize : [0] 2560x1440 -> 1024x768
no RM attachment (READ pf_addr=0x4 pf_ip=0x105367e from pager_object: pd='init -> usb_drv' thread='ep')
page fault, pd='init -> usb_drv' thread='ep' cpu=0 ip=0x105367e address=0x4 stack pointer=0xa07fef18 qualifiers=0x4 irUwp reason=1

Seen during #2338
2017-05-02 15:28:55 +02:00
Christian Helmuth
cb43e04691 ldso: defer execution of static constructors
Ldso now does not automatically execute static constructors of the
binary and shared libraries the binary depends on. If static
construction is required (e.g., if a shared library with constructor is
used or a compilation unit contains global statics) the component needs
to execute the constructors explicitly in Component::construct() via
Genode::Env::exec_static_constructors().

In the case of libc components this is done by the libc startup code
(i.e., the Component::construct() implementation in the libc).

The loading of shared objects at runtime is not affected by this change
and constructors of those objects are executed immediately.

Fixes #2332
2017-03-24 16:20:04 +01:00
Christian Helmuth
88db3c0df7 Fix some deprecated warnings
Issue #1987
2017-03-24 16:20:03 +01:00
Josef Söntgen
806e0a8029 udp_client: remove os/config.h usage
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen
46463562f6 udp_echo: remove os/config.h usage
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen
fcd39f9bb2 usb_terminal: remove env deprecated warning
Issue #2310.
2017-03-24 16:19:54 +01:00
Christian Helmuth
43e7cc56a3 Rename Linux NIC driver to linux_nic_drv
Related to #2190
Issue #2278
2017-03-15 12:32:27 +01:00
Sebastian Sumpf
c707713be8 usb/rpi: fix inconsistency between C and C++
Change fiq_enable from 'int' to 'char' (is bool/_BOOL in C) so data does
not get overwritten accidentally.
2017-02-28 13:00:44 +01:00
Josef Söntgen
27cc20049e wifi: fix off-by-one in min PSK length handling
The MIN_PSK_LENGTH constant was not adjusted to accommodate for the
semcantic change when switching from using the raw char array to using
the Genode::String class. The Genode::String::length() method includes
the terminating NUL byte while strlen() does not.

Fixes #2296.
2017-02-28 13:00:44 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Martin Stein
959b80bab1 lxip/lwip tests: non-libc attributes to config tag
The 'server_ip' and 'server_port' attributes for 'lxip/udp_client' and
'lwip/http_clnt' as well as the 'port' attribute for 'lxip/udp_echo' and
'lwip/http_srv_static' are not directly libc-related so they should not
live in the libc tag but in the config tag of the component.

Ref #2193
2017-02-28 12:59:21 +01:00
Martin Stein
335685b7fe usb: get rid of combined specs
Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
15821e32ec nic: remove usage of deprecated env()
This commit includes changes to the Nic::Session_component interface.
We now pass the entire env to the component instead of only ram, rm and
the ep because we need the env to open connections from within the
Session_component implemenation. So far only the cadence_gem driver
needs this, though.

Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
3c57a8b3c2 usb_session: pass Region_map explicitly
Issue #2280.
2017-02-28 12:59:17 +01:00
Josef Söntgen
a2cff03539 dde_linux: remove usage of deprecated env()
Fixes #2280.
2017-02-28 12:59:17 +01:00
Sebastian Sumpf
304f2eaf38 lxip: VFS plugin
Provides file-system compatible to libc socket-fs requirements. This
includes pseudo file for network configuration.
2017-02-28 12:59:15 +01:00
Christian Helmuth
1f29e1854a lxip: poll_does_not_wait() for non-blocking API 2017-02-27 15:37:50 +01:00
Christian Helmuth
eda0828ca0 Skip binary files in GEN_INCLUDES
A binary file may be a temporary Vim .swp file when examining contrib
sources. The commit prevents build errors like

  .../repos/dde_linux/lib/mk/lxip_include.mk:29:
  target '.../x86_64/var/libcache/lxip_include/include/include/include/Binary'
  given more than once in the same rule
  .../repos/dde_linux/lib/mk/lxip_include.mk:29:
  target '.../x86_64/var/libcache/lxip_include/include/include/include/file'
  given more than once in the same rule
  ...
2017-02-23 15:03:28 +01:00
Sebastian Sumpf
3048017d90 lxip: schedule timeout + poll wait
* poll_wait + schedule_timeout +  block on wait_and_dispatch_one_signal
2017-02-23 14:54:50 +01:00
Martin Stein
ed370a8f5c Introduce gpio_drv function in run scripts
Do not use automatic alias in the run tool for the name of the
gpio-driver binary.

Ref #2268
2017-02-23 14:54:50 +01:00
Christian Prochaska
2d700d0b2d lxip: return zero-initialized memory in '__alloc_percpu()' 2017-02-23 14:54:49 +01:00
Christian Prochaska
59f38fe38c lxip: implement 'rt_genid_ipv4()' and "rt_genid_bump_ipv4()' 2017-02-23 14:54:49 +01:00
Christian Prochaska
7b3a6e6347 lxip: delete default gateway route before reconfiguration 2017-02-23 14:54:49 +01:00