USB has been the dominant standard for connecting peripherals to computers for decades. With the introduction of USB4, the USB Implementers Forum (USB-IF) has defined a new specification that brings significant improvements in terms of speed, power delivery, and versatility. However, one notable difference compared to previous host controller specifications, such as xHCI, is that the USB-IF has not specified a vendor-neutral solution for accessing USB over PCI. This article will delve into the details of this topic, covering key concepts, subtitles, and paragraphs, while providing code blocks and references.
What is USB4?
USB4 is a new specification introduced by the USB-IF that builds upon the Thunderbolt 3 protocol developed by Intel. USB4 provides a maximum throughput of up to 40 Gbps, doubling the speed of USB 3.2, and offers other benefits such as improved power delivery and the ability to daisy-chain multiple devices.
Host Controller Interface
A host controller interface (HCI) is a set of specifications that define how a host controller interacts with the USB protocol. Previous versions of USB, such as USB 2.0 and USB 3.x, have used the Enhanced Host Controller Interface (xHCI) as the standard HCI. However, the USB-IF has not specified a vendor-neutral solution for accessing USB4 over PCI.
Why no Vendor-Neutral Solution for USB4 over PCI?
The decision not to specify a vendor-neutral solution for USB4 over PCI is likely due to a few factors. First, USB4 is built upon the Thunderbolt 3 protocol, which has been dominated by Intel. Second, the USB-IF may have wanted to allow vendors to differentiate themselves by providing their own solutions for USB4 over PCI.
Alternative Solutions for USB4 over PCI
Despite the lack of a vendor-neutral solution for USB4 over PCI, there are alternative solutions available. These solutions typically come in the form of host controller chips provided by vendors such as Intel, ASMedia, and VIA Labs. These chips implement the USB4 specification and provide a way for host systems to access USB4 over PCI.
Example: Intel JHL8440 Host Controller
The Intel JHL8440 is an example of a host controller chip that implements the USB4 specification. Here is an example of how the chip can be accessed using the PCI configuration space:
#include
#include
#include
int main() {
pci_t *dev;
int ret;
dev = pci_get_device(PCI_ANY_ID, 0x3573, NULL);
if (dev == NULL) {
printf("Device not found
");
return -1;
}
ret = pci_read_config_dword(dev, 0x54, &val);
if (ret < 0) {
printf("Error reading config space
");
return -1;
}
if (val & (1 << 15))
printf("Link is active
");
else
printf("Link is not active
");
return 0;
}
The above example demonstrates how to read the link status of the Intel JHL8440 host controller using the PCI configuration space.