genode/repos/dde_linux/src/drivers/usb_host/README

67 lines
2.6 KiB
Plaintext

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"/>