eXtensible Host Controller Interface (xHCI) is a computer interface specification that defines a register-level description of a host controller for Universal Serial Bus (USB), which is capable of interfacing with USB 1.x, 2.0, and 3.x compatible devices. The specification is also referred to as the USB 3.0 host controller specification. xHCI improves on the pre-existing Open Host Controller Interface (OHCI) and the Universal Host Controller Interface (UHCI) architectures most prominently in handling a wider range of speeds within a single standard, in managing resources more efficiently for the benefit of mobile hosts with limited power resources (such as tablets and cell phones), and in simplifying support for mixing of low-speed and high-speed devices.
Architectural goals The xHCI is a radical break from the previous generations of USB host controller interface architectures (i.e. the Open Host Controller Interface (OHCI), the Universal Host Controller Interface (UHCI), and the Enhanced Host Controller Interface (EHCI)) on many counts. Following are the key goals of the xHCI architecture:
Efficient operation – idle power and performance better than legacy USB host controller architectures. A device level programming model that is fully consistent with the existing USB software model Decouple the host controller interface presented to software from the underlying USB protocols Minimize host memory accesses, fully eliminating them when USB devices are idle Eliminate register writes and minimize register reads for normal data transfers Eliminate the "Companion Controller" model Enable hardware "fail-over" modes in system resource constrained situations so devices are still accessible, but perhaps at less optimal power/performance point Provide the ability for different markets to differentiate hardware capabilities, e.g. target host controller power, performance and cost trade-offs for specific markets Define an extensible architecture that provides an easy path for new USB specifications and technologies, such as higher bandwidth interfaces, optical transmission medium, etc., without requiring the definition of yet another USB host controller interface
Architectural details
Support for all speeds The OHCI and UHCI controllers support only USB 1 speed devices (1.5 Mbit/s and 12 Mbit/s), and the EHCI only supports USB 2 devices (480 Mbit/s). The xHCI architecture was designed to support all USB speeds, including SuperSpeed (5 Gbit/s) and future speeds, under a single driver stack.
Power efficiency When USB was originally developed in 1995, it was targeted at desktop platforms to stem the proliferation of connectors that were appearing on PCs, e.g. PS/2, serial port, parallel port, game port, etc., and host power consumption was not an important consideration at the time. Since then, mobile platforms have become the platform of choice, and their batteries have made power consumption a key consideration. The architectures of the legacy USB host controllers (OHCI, UHCI, and EHCI) were very similar in that the "schedule" for the transactions to be performed on the USB were built by software in host memory, and the host controller hardware would continuously read the schedules to determine what transactions needed to be driven on the USB, and when, even if no data was moved. Additionally, in the case of reads from the device, the device was polled each schedule interval, even if there was no data to read.
The xHCI eliminates host memory based USB transaction schedules, enabling zero host memory activity when there is no USB data movement. The xHCI reduces the need for periodic device polling by allowing a USB 3.0 or later device to notify the host controller when it has data available to read, and moves the management of polling USB 2.0 and 1.1 devices that use interrupt transactions from the CPU-driven USB driver to the USB host controller. EHCI, OHCI, and UHCI host controllers would automatically handle polling for the CPU if there are no changes that need to be made and if no device has any interrupts to send but they all rely on the CPU to set the schedule up for the controllers. If any USB device using interrupt transactions does have data to send, then an xHCI host controller will send an interrupt to notify the CPU that there is a USB interrupt transaction that needs handling. Since the CPU no longer has to manage the polling of the USB bus, it can spend more time in low power states. The xHCI does not require that implementations provide support for all advanced USB 2 and 3 power management features, including USB 2 LPM, USB 3 U1 and U2 states, HERD, LTM, Function Wake, etc.; but these features are required to realize all of the advantages of xHCI.
Virtualization support Legacy USB host-controller architectures exhibit some serious shortcomings when applied to virtualized environments. Legacy USB host-controller interfaces define a relatively simple hardware data-pump; where critical state related to overall bus-management (bandwidth allocation, address assignment, etc.) resides in the software of the host-controller driver (HCD). Trying to apply the standard hardware IO virtualization technique - replicating I/O interface registers - to the legacy USB host controller interface is problematic because critical state that must be managed across virtual machines (VMs) is not available to hardware. The xHCI architecture moves the control of this critical state into hardware, enabling USB resource management across VMs. The xHCI virtualization features also provide for:
direct-Assignment of individual USB devices (irrespective of their location in the bus topology) to any VM minimizing run-time inter-VM communications support for native USB device-sharing support of PCIe SR-IOV (single root I/O virtualization)
… excerpt ends here. Continue reading the full article.