12#ifndef _USB2_HOSTCONTROLLER_H_
13#define _USB2_HOSTCONTROLLER_H_
20#define EFI_USB2_HC_PROTOCOL_GUID \
22 0x3e745226, 0x9818, 0x45b6, {0xa2, 0xac, 0xd7, 0xcd, 0xe, 0x8b, 0xa2, 0xbc } \
38#define USB_PORT_STAT_CONNECTION 0x0001
39#define USB_PORT_STAT_ENABLE 0x0002
40#define USB_PORT_STAT_SUSPEND 0x0004
41#define USB_PORT_STAT_OVERCURRENT 0x0008
42#define USB_PORT_STAT_RESET 0x0010
43#define USB_PORT_STAT_POWER 0x0100
44#define USB_PORT_STAT_LOW_SPEED 0x0200
45#define USB_PORT_STAT_HIGH_SPEED 0x0400
46#define USB_PORT_STAT_SUPER_SPEED 0x0800
47#define USB_PORT_STAT_OWNER 0x2000
52#define USB_PORT_STAT_C_CONNECTION 0x0001
53#define USB_PORT_STAT_C_ENABLE 0x0002
54#define USB_PORT_STAT_C_SUSPEND 0x0004
55#define USB_PORT_STAT_C_OVERCURRENT 0x0008
56#define USB_PORT_STAT_C_RESET 0x0010
76#define EFI_USB_SPEED_FULL 0x0000
77#define EFI_USB_SPEED_LOW 0x0001
78#define EFI_USB_SPEED_HIGH 0x0002
79#define EFI_USB_SPEED_SUPER 0x0003
114#define EFI_USB_HC_RESET_GLOBAL 0x0001
115#define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002
116#define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004
117#define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008
263#define EFI_USB_MAX_BULK_BUFFER_NUM 10
406#define EFI_USB_MAX_ISO_BUFFER_NUM 7
407#define EFI_USB_MAX_ISO_BUFFER_NUM1 2
volatile unsigned int DataLength
unsigned short UINT16
2-byte unsigned value.
unsigned char BOOLEAN
Logical Boolean.
UINT64 UINTN
Unsigned value of native width.
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaxiumPacketLength, IN BOOLEAN IsNewTransfer, IN OUT UINT8 *DataToggle, IN UINTN PollingInterval OPTIONAL, IN UINTN DataLength OPTIONAL, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator OPTIONAL, IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction OPTIONAL, IN VOID *Context OPTIONAL)
Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN OUT VOID *Data, IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits synchronous interrupt transfer to an interrupt endpoint of a USB device.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_CAPABILITY)(IN EFI_USB2_HC_PROTOCOL *This, OUT UINT8 *MaxSpeed, OUT UINT8 *PortNumber, OUT UINT8 *Is64BitCapable)
Retrieves the Host Controller capabilities.
EFI_GUID gEfiUsb2HcProtocolGuid
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack, IN VOID *Context OPTIONAL)
Submits nonblocking isochronous transfer to an isochronous endpoint of a USB device.
EFI_USB_PORT_FEATURE
Usb port features value Each value indicates its bit index in the port status and status change bitma...
@ EfiUsbPortOverCurrentChange
@ EfiUsbPortSuspendChange
@ EfiUsbPortConnectChange
struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL
Forward reference for pure ANSI compatability.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, OUT EFI_USB_PORT_STATUS *PortStatus)
Retrieves the current status of a USB root hub port.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_RESET)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT16 Attributes)
Provides software reset for the USB host controller.
#define EFI_USB_MAX_ISO_BUFFER_NUM
#define EFI_USB_MAX_BULK_BUFFER_NUM
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature)
Clears a feature for the specified root hub port.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SET_STATE)(IN EFI_USB2_HC_PROTOCOL *This, IN EFI_USB_HC_STATE State)
Sets the USB host controller to a specific state.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_BULK_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], IN OUT UINTN *DataLength, IN OUT UINT8 *DataToggle, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits bulk transfer to a bulk endpoint of a USB device.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN EFI_USB_DEVICE_REQUEST *Request, IN EFI_USB_DATA_DIRECTION TransferDirection, IN OUT VOID *Data OPTIONAL, IN OUT UINTN *DataLength OPTIONAL, IN UINTN TimeOut, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits control transfer to a target USB device.
EFI_USB_HC_STATE
Enumration value for status of USB HC.
@ EfiUsbHcStateHalt
The host controller is in halt state.
@ EfiUsbHcStateOperational
The host controller is in an operational state.
@ EfiUsbHcStateSuspend
The host controller is in the suspend state.
@ EfiUsbHcStateMaximum
Maximum value for enumration value of HC status.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN UINT8 DataBuffersNumber, IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM], IN UINTN DataLength, IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator, OUT UINT32 *TransferResult)
Submits isochronous transfer to an isochronous endpoint of a USB device.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_GET_STATE)(IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State)
Retrieves current state of the USB host controller.
EFI_STATUS(EFIAPI * EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE)(IN EFI_USB2_HC_PROTOCOL *This, IN UINT8 PortNumber, IN EFI_USB_PORT_FEATURE PortFeature)
Sets a feature for the specified root hub port.
EFI Usb I/O Protocol as defined in UEFI specification.
EFI_USB_DATA_DIRECTION
USB data transfer direction.
USB_DEVICE_REQUEST EFI_USB_DEVICE_REQUEST
EFI_STATUS(EFIAPI * EFI_ASYNC_USB_TRANSFER_CALLBACK)(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Status)
Async USB transfer callback routine.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
UINT8 TranslatorHubAddress
device address
UINT8 TranslatorPortNumber
the port number of the hub that device is connected to.
UINT16 PortChangeStatus
Contains current port status change bitmap.
UINT16 PortStatus
Contains current port status bitmap.
The EFI_USB2_HC_PROTOCOL provides USB host controller management, basic data transactions over a USB ...
EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus
EFI_USB2_HC_PROTOCOL_SET_STATE SetState
EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature
EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer
EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer
EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer
UINT16 MinorRevision
The minor revision number of the USB host controller.
EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer
EFI_USB2_HC_PROTOCOL_GET_STATE GetState
EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature
UINT16 MajorRevision
The major revision number of the USB host controller.
EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability
EFI_USB2_HC_PROTOCOL_RESET Reset
EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer
EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer