aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2015-09-04 02:26:01 +0100
committerMichael Brown <mcb30@ipxe.org>2015-09-07 01:38:40 +0100
commit15a8800a984239553cbbb6629e076e98a3be7537 (patch)
tree87c62eac43dc8f06224e128625d157e5cdf94fc9 /src/include
parent5cea7bdb2af44a5e6b652c302f2761dc8fa1048f (diff)
downloadipxe-15a8800a984239553cbbb6629e076e98a3be7537.zip
ipxe-15a8800a984239553cbbb6629e076e98a3be7537.tar.gz
ipxe-15a8800a984239553cbbb6629e076e98a3be7537.tar.bz2
[efi] Add a USB host controller driver based on EFI_USB_IO_PROTOCOL
Allow iPXE to coexist with other USB device drivers, by attaching to the EFI_USB_IO_PROTOCOL instances provided by the UEFI platform firmware. The EFI_USB_IO_PROTOCOL is an unsurprisingly badly designed abstraction of a USB device. The poor design choices intrinsic in the UEFI specification prevent efficient operation as a network device, with the result that devices operated using the EFI_USB_IO_PROTOCOL operate approximately two orders of magnitude slower than devices operated using our native EHCI or xHCI host controller drivers. Since the performance is so abysmally slow, and since the underlying problems are due to fundamental architectural mistakes in the UEFI specification, support for the EFI_USB_IO_PROTOCOL host controller driver is left as disabled by default. Users are advised to use the native iPXE host controller drivers instead. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/errfile.h1
-rw-r--r--src/include/ipxe/usb.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h
index 00f8f98..aff911e 100644
--- a/src/include/ipxe/errfile.h
+++ b/src/include/ipxe/errfile.h
@@ -85,6 +85,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_uhci ( ERRFILE_DRIVER | 0x000b0000 )
#define ERRFILE_usbhid ( ERRFILE_DRIVER | 0x000c0000 )
#define ERRFILE_usbkbd ( ERRFILE_DRIVER | 0x000d0000 )
+#define ERRFILE_usbio ( ERRFILE_DRIVER | 0x000e0000 )
#define ERRFILE_nvs ( ERRFILE_DRIVER | 0x00100000 )
#define ERRFILE_spi ( ERRFILE_DRIVER | 0x00110000 )
diff --git a/src/include/ipxe/usb.h b/src/include/ipxe/usb.h
index f7c0b96..dfe0f34 100644
--- a/src/include/ipxe/usb.h
+++ b/src/include/ipxe/usb.h
@@ -68,7 +68,7 @@ enum usb_pid {
struct usb_setup_packet {
/** Request */
uint16_t request;
- /** Value paramer */
+ /** Value parameter */
uint16_t value;
/** Index parameter */
uint16_t index;
@@ -91,6 +91,9 @@ struct usb_setup_packet {
/** Vendor-specific request type */
#define USB_TYPE_VENDOR ( 2 << 5 )
+/** Request recipient mask */
+#define USB_RECIP_MASK ( 0x1f << 0 )
+
/** Request recipient is the device */
#define USB_RECIP_DEVICE ( 0 << 0 )