genode/repos/dde_linux/src/drivers/usb_host
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
..
spec dde_linux: iterate over PCI devices in ascending BDF order 2019-02-12 10:33:15 +01:00
README Adapt usb_drv RAM quota to 12M 2019-02-12 10:33:32 +01:00
dummies.c dde_linux: support of GSIs in new usb_host_drv 2018-09-13 15:21:11 +02:00
lx_emul.cc dde_linux: support of GSIs in new usb_host_drv 2018-09-13 15:21:11 +02:00
lx_emul.h dde_linux: use correct type in lx_emul's `min` 2018-09-13 14:54:20 +02:00
main.cc dde_linux: usb host controller driver version 4.16 2018-08-30 09:24:45 +02:00
platform.h dde_*: remove the use of deprecated APIs 2019-01-30 13:49:54 +01:00
raw.cc dde_*: remove the use of deprecated APIs 2019-01-30 13:49:54 +01:00
raw.h dde_linux: usb host controller driver version 4.16 2018-08-30 09:24:45 +02:00
raw_driver.c dde_linux: usb host controller driver version 4.16 2018-08-30 09:24:45 +02:00
signal.h dde_*: remove the use of deprecated APIs 2019-01-30 13:49:54 +01:00
target.inc dde_linux: usb host controller driver version 4.16 2018-08-30 09:24:45 +02:00

README

USB host controller driver
##########################

Allows access to USB devices via the 'Usb' session interface.

Configuration snippet:

!<start name="usb_host_drv">
!  <resource name="RAM" quantum="10M"/>
!  <provides><service name="Usb"/></provides>
!  <config>
!     <report devices="yes"/>
!  </config>
!</start>

The optional 'devices' report lists the connected devices and gets updated
when devices are added or removed.

Example report:

!<devices>
!  <device label="usb-1-2" vendor_id="0x046d" product_id="0xc077" bus="0x0001" dev="0x0002" class="0x03"/>
!  <device label="usb-1-1" vendor_id="0x1d6b" product_id="0x0002" bus="0x0001" dev="0x0001" class="0x09"/>
!</devices>

For every device a unique identifier is generated that is used to access the
USB device. Only devices that have a valid policy configured at the USB driver
can be accessed by a client. The following configuration allows 'comp1' to
access the device 'usb-1-6':

!<start name="usb_drv">
!  <resource name="RAM" quantum="12M"/>
!  <provides><service name="Usb"/></provides>
!  <config uhci="yes" ohci="yes" ehci="yes" xhci="yes">
!    <raw>
!        <report devices="yes"/>
!        <policy label="comp1 -> usb-1-6" vendor_id="0x13fe" product_id="0x5200" bus="0x0001" dev="0x0006"/>
!    </raw>
!  </config>
!</start>

In addition to the mandatory 'label' attribute the policy node also
contains optional attribute tuples of which at least one has to be present.
The 'vendor_id' and 'product_id' tuple selects a device regardless of its
location on the USB bus and is mostly used in static configurations. The
'bus' and 'dev' tuple selects a specific device via its bus locations and
device address. It is mostly used in dynamic configurations because the device
address is not fixed and may change every time the same device is plugged in.
If the class attribute is defined only, the usb host controller driver allows
access to all devives of that class. In that case the actual device is chosen
by the last label given when a session gets opened.


BIOS Handoff
~~~~~~~~~~~~

Per default the USB driver performs a hand off of the USB controller from the
BIOS, since it still may access the controller when booting, for example, from
a USB device. The BIOS hand off induces the execution of BIOS/SMM USB driver
code and potentially DMA operations. Unfortunately, some ACPI tables report
wrong RMRR information, which implicates IOMMU faults on illegal DMA
operations and consequently the hand off may fail after noticeably long
timeouts. Therefore, the hand off can be disabled in the USB driver
configuration like follows.

! <config bios_handoff="no"/>