Commit Graph

767 Commits

Author SHA1 Message Date
Josef Söntgen
447f3fcb35 libnl: use MSG_DONTWAIT
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
f5eddce1d1 wifi/socket_call: add MSG_DONTWAIT
Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
24c0bb95ef pc_lx_emul: allow for being used in a library
The location of the used 'source.list' file is hard-coded and will not
work when the ported driver is implemented as a shared library. For
this use-case provide means to set the location differently.

Issue #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
b2e11f1e9e pc_lx_emul: add __put_user
Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
edb08770dc lx_emul: initialize task members needed by network
Those members are access via static inline functions in the network
core code and from certain protocols, e.g. AF_NETLINK.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
77cdceabaa lx_emul: add additional atomic64 functions
Needed by the WLAN driver on x86_32.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
0c617366e5 lx_emul: get pid from task
Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
4b43b5c1c1 lx_kit: handle %hu specifier in console
Prevent '<warning unsupported format specifier>' when encountering
'%hu'.

Issue #4455.
2022-04-13 09:29:03 +02:00
Josef Söntgen
ffea0bf857 lx_kit: remove execution of static ctors
In case where the ported driver or protocol stack is executed from
an already managed environment, e.g. the libc, the execution
of the static constructors will be performed at the appropriate
time.

Issue #4455.
2022-04-13 09:29:03 +02:00
Christian Helmuth
18c5f1e90d tool/run: improve disk image size automatic
Set disk size to 1.5 times the run folder size and shrinked later to
real content.

Thanks to Roland for the patch.
2022-04-13 08:08:00 +02:00
Christian Helmuth
1b4cd93dc2 lx_kit/x86: clamp PCI interrupt PIN to 1
If any PCI device reports 0 as interrupt PIN, drivers may try to force
MSI setup (e.g., xhci). So, we clamp the interrupt PIN to 1 to let
drivers finish initialization and don't bother the platform driver.
2022-04-13 08:08:00 +02:00
Josef Söntgen
c6cc43f0e4 lx_kit/x86: use virtual information for PCI
This commit removes all physical notions from the information given
to the Linux kernel regarding PCI BARs.

With the exception for the host bridge that needs to be located at
'0:00.0' as required by the Intel FB driver, all other devices are
announced at the PCI BUS in an ascending order.

Additionally the MMIO regions start at 1 GiB and are capped at 32 bit
to prevent unnecessary access to 64 bit addresses.
2022-04-13 08:08:00 +02:00
Alexander Boettcher
c0560ab0cb pc: update intel display driver
Fixes #4450
2022-04-13 08:08:00 +02:00
Alexander Boettcher
6d924d3285 lx_kit(x86): restrict usb heuristics to usb
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
b6c1b7806b lx_kit: io_mem_map with write combined support (x86)
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
6f64917e8f lx_emul: add ioremap_cache/_wc to shadow/asm/io.h
used by intel_fb for write combined allocation

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
8dbcda9943 lx_emul: x86_32 shadow header adaptations
required for upcoming intel display driver in 32bit

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
7c3f010cd6 lx_emul: shadow asm/uaccess_32/64.h
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
cdf1b39c5e lx_emul: shadow asm/special_insns.h
wbinvd is not supported in user mode

Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
88a6a9d628 lx_emul: add missing fpu/api.h to shadow pgtable.h
Issue #4450
2022-04-13 08:07:59 +02:00
Alexander Boettcher
279f038b9e lx_emul: shadow asm/cpufeature and asm/page_64
Issue #4450
2022-04-13 08:07:58 +02:00
Josef Söntgen
fd8df3a623 lx_emul: handle page refcount 2022-04-13 08:07:58 +02:00
Alexander Boettcher
4474460377 lx_emul: __alloc_pages support in shadow/mm/page_alloc.c 2022-04-13 08:07:58 +02:00
Alexander Boettcher
dd10e5d977 intel_fb: move to legacy_intel_fb
Move the depot recipe and consistently name the old drivers with a legacy_
prefix as done with the old usb_host driver.

Issue #4450
2022-04-13 08:07:58 +02:00
Norman Feske
33c71d1d2c usb_host: change error to warning message
An insufficient session quota as offered by a USB client is not an
erroneous situation of the USB driver.
2022-04-13 08:07:57 +02:00
Christian Helmuth
d182b20705 build: ensure rules with pipes might fail
.SHELLFLAGS is extended by option pipefail to make pipes fail if any pipe
element fails. As .SHELLFLAGS is exported into sub-make instances it
must be unexported before calling third-party build systems recursively.
2022-03-21 13:43:13 +01:00
Christian Helmuth
7da691b52a pc/usb: defer startup until config is available
The commit also adds lx_kit/initial_config.h as utility.
2022-03-21 13:42:17 +01:00
Stefan Kalkowski
e95f0a409d lx_emul: add implementation for Genode's USB C-API
Fix #4444
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
9713014130 dde_linux: add virt_linux lx_emul flavor
To support device-less protocol-stacks only ports, we can use a
Virt I/O Linux kernel flavor, and export the lx_kit/lx_emul parts
not depending on platform API and devices.

Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
35cf8aada4 lx_emul(x86): fill zero page with zeroes
Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
13c4abf4ad lx_emul: add static_cpu_has macro to shadow header
Ref #4397
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
0fa695dbd7 lx_kit/lx_emul: make memory backend configureable
* Drivers have to use lx_kit/memory_dma.cc
* Protocol-stacks use lx_kit/memory_non_dma.cc
* Moreover the device-dependent lx_emul parts get removed
  from the common lx_emul import rules

Fix #4443
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
5c71a8d74d lx_emul: extract common lx_emul import makefile
Fix #4442
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
b80146a6f7 genode_c_api: unify shared dataspace callbacks
* Unifies the declaration of callbacks which manage driver/client
  shared dataspaces
* Move the Linux driver-specific callback implementation to the
  lx_emul library from the PC's USB host driver

Fix genodelabs/genode#4439
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
600997d8d6 usb_hid_raw: don't use deprecated qemu option
* Use -device instead of deprecated -usbdevice
* Use the same xhci model as in usb_hid_reconnect
2022-03-07 16:43:12 +01:00
Stefan Kalkowski
2a35c8f9e7 lx_emul: add page macros to x86 shadow headers
* Add page_to_phys and dummy macro for pgprot_device

Original commit provided by Josef Soentgen

Ref genodelabs/genode#4438
2022-03-07 16:43:12 +01:00
Josef Söntgen
2760b67902 lx_kit/lx_emul: add I/O port support
Ref genodelabs/genode#4438
2022-03-07 16:43:12 +01:00
Christian Helmuth
2b3370c8d8 depot: update recipe hashes 2022-02-28 11:46:35 +01:00
Stefan Kalkowski
14d1ca17a9 Use new pc_usb_host_drv in all recipes and tests
* Switch from the legacy usb_host driver to the new PC version
  in recipes and automated tests
* Update documentation snippets
* Remove outdated, unused usb_rndis run-script

Fix genodelabs/genode#4416
2022-02-21 15:47:50 +01:00
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