Updated: April 19, 2023 |
Emulate a USB host controller
vdev exhci intr guest_intr loc addr [name path]
(ARM and x86) The xHCI vdev emulates a USB host controller. It presents the guest with a memory-mapped I/O interface that complies with the eXtensible Host Controller Interface (xHCI) specification. As a result, the guest can use its existing xHCI drivers, without modifications.
The loc and intr options specify the memory-mapped I/O region for the xHCI interface. The guest must start its xHCI driver with base address and IRQ parameters corresponding to these option settings. For Android guests, the VM provides the guest with these settings in the form of device tree information and thus, xHCI discovery (including driver-launching) should work without manual OS configuration. For information on other how guest types might do xHCI discovery, contact QNX Engineering Services.
For more information on setting guest interrupts, see the Configuration chapter in the QNX Hypervisor User's Guide.
The vdev creates two PPS objects: one to control device attachments and the other to report the connection status of each device. The names of these objects are determined by the name option argument. For instance, if you specify exhci_0, the vdev creates a control object named /pps/usb_vdev/exhci_0/ctrl and a status object named /pps/usb_vdev/exhci_0/status.
You will see these objects in the host filesystem, but you don't need to write to or read from them. They're used internally by the vdev and the enumerator.
See the PPS Developer's Guide for information on starting and configuring the PPS service.
To create and configure an xHCI vdev, specify the following in the VM configuration file:
vdev exhci loc 0xfc000000 intr gic:5 name exhci_0
In this example, the xHCI driver on the guest must be started with options to register the USB controller base address as 0xfc000000 and to use IRQ 5.