+EFI_STATUS\r
+EFIAPI\r
+UsbVirtualHcControlTransfer (\r
+ IN USB_BUS_CONTROLLER_DEVICE *UsbBusDev,\r
+ IN UINT8 DeviceAddress,\r
+ IN UINT8 DeviceSpeed,\r
+ IN UINTN MaximumPacketLength,\r
+ IN EFI_USB_DEVICE_REQUEST *Request,\r
+ IN EFI_USB_DATA_DIRECTION TransferDirection,\r
+ IN OUT VOID *Data,\r
+ IN OUT UINTN *DataLength,\r
+ IN UINTN TimeOut,\r
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
+ OUT UINT32 *TransferResult\r
+ )\r
+/*++\r
+ \r
+ Routine Description:\r
+ \r
+ Virtual interface to submits control transfer to a target USB device\r
+ for both Hc2 and Hc protocol.\r
+ \r
+ Arguments:\r
+ \r
+ UsbBusDev - A pointer to bus controller of the device.\r
+ DeviceAddress - Represents the address of the target device on the USB,\r
+ which is assigned during USB enumeration.\r
+ DeviceSpeed - Indicates target device speed.\r
+ MaximumPacketLength - Indicates the maximum packet size that the \r
+ default control transfer endpoint is capable of \r
+ sending or receiving.\r
+ Request - A pointer to the USB device request that will be sent \r
+ to the USB device. \r
+ TransferDirection - Specifies the data direction for the transfer.\r
+ There are three values available, DataIn, DataOut \r
+ and NoData.\r
+ Data - A pointer to the buffer of data that will be transmitted \r
+ to USB device or received from USB device.\r
+ DataLength - Indicates the size, in bytes, of the data buffer \r
+ specified by Data.\r
+ TimeOut - Indicates the maximum time, in microseconds, \r
+ which the transfer is allowed to complete.\r
+ Translator - A pointr to the transaction translator data.\r
+ TransferResult - A pointer to the detailed result information generated \r
+ by this control transfer.\r
+ \r
+ Returns:\r
+ \r
+ EFI_SUCCESS \r
+ The control transfer was completed successfully.\r
+ EFI_OUT_OF_RESOURCES \r
+ The control transfer could not be completed due to a lack of resources.\r
+ EFI_INVALID_PARAMETER \r
+ Some parameters are invalid.\r
+ EFI_TIMEOUT \r
+ The control transfer failed due to timeout.\r
+ EFI_DEVICE_ERROR \r
+ The control transfer failed due to host controller or device error. \r
+ Caller should check TranferResult for detailed error information.\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UsbVirtualHcBulkTransfer (\r
+ IN USB_BUS_CONTROLLER_DEVICE *UsbBusDev,\r
+ IN UINT8 DeviceAddress,\r
+ IN UINT8 EndPointAddress,\r
+ IN UINT8 DeviceSpeed,\r
+ IN UINTN MaximumPacketLength,\r
+ IN UINT8 DataBuffersNumber,\r
+ IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],\r
+ IN OUT UINTN *DataLength,\r
+ IN OUT UINT8 *DataToggle,\r
+ IN UINTN TimeOut,\r
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
+ OUT UINT32 *TransferResult\r
+ )\r
+/*++\r
+ \r
+ Routine Description:\r
+ \r
+ Virtual interface to submits bulk transfer to a bulk endpoint of a USB device\r
+ both for Hc2 and Hc protocol.\r
+ \r
+ Arguments:\r
+ \r
+ UsbBusDev - A pointer to bus controller of the device.\r
+ DeviceAddress - Represents the address of the target device on the USB,\r
+ which is assigned during USB enumeration. \r
+ EndPointAddress - The combination of an endpoint number and an \r
+ endpoint direction of the target USB device. \r
+ Each endpoint address supports data transfer in \r
+ one direction except the control endpoint \r
+ (whose default endpoint address is 0). \r
+ It is the caller's responsibility to make sure that \r
+ the EndPointAddress represents a bulk endpoint. \r
+ DeviceSpeed - Indicates device speed. The supported values are EFI_USB_SPEED_FULL\r
+ and EFI_USB_SPEED_HIGH.\r
+ MaximumPacketLength - Indicates the maximum packet size the target endpoint\r
+ is capable of sending or receiving. \r
+ DataBuffersNumber - Number of data buffers prepared for the transfer.\r
+ Data - Array of pointers to the buffers of data that will be transmitted \r
+ to USB device or received from USB device. \r
+ DataLength - When input, indicates the size, in bytes, of the data buffer\r
+ specified by Data. When output, indicates the actually \r
+ transferred data size. \r
+ DataToggle - A pointer to the data toggle value. On input, it indicates \r
+ the initial data toggle value the bulk transfer should adopt;\r
+ on output, it is updated to indicate the data toggle value \r
+ of the subsequent bulk transfer. \r
+ Translator - A pointr to the transaction translator data. \r
+ TimeOut - Indicates the maximum time, in microseconds, which the \r
+ transfer is allowed to complete. \r
+ TransferResult - A pointer to the detailed result information of the \r
+ bulk transfer.\r
+\r
+ Returns:\r
+ \r
+ EFI_SUCCESS \r
+ The bulk transfer was completed successfully.\r
+ EFI_OUT_OF_RESOURCES \r
+ The bulk transfer could not be submitted due to lack of resource.\r
+ EFI_INVALID_PARAMETER \r
+ Some parameters are invalid.\r
+ EFI_TIMEOUT \r
+ The bulk transfer failed due to timeout.\r
+ EFI_DEVICE_ERROR \r
+ The bulk transfer failed due to host controller or device error.\r
+ Caller should check TranferResult for detailed error information.\r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UsbVirtualHcAsyncInterruptTransfer (\r
+ IN USB_BUS_CONTROLLER_DEVICE * UsbBusDev,\r
+ IN UINT8 DeviceAddress,\r
+ IN UINT8 EndPointAddress,\r
+ IN UINT8 DeviceSpeed,\r
+ IN UINTN MaximumPacketLength,\r
+ IN BOOLEAN IsNewTransfer,\r
+ IN OUT UINT8 *DataToggle,\r
+ IN UINTN PollingInterval,\r
+ IN UINTN DataLength,\r
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR * Translator,\r
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction,\r
+ IN VOID *Context OPTIONAL\r
+ )\r
+/*++\r
+ \r
+ Routine Description:\r
+ \r
+ Virtual interface to submits an asynchronous interrupt transfer to an \r
+ interrupt endpoint of a USB device for both Hc2 and Hc protocol.\r
+ \r
+ Arguments:\r
+ \r
+ UsbBusDev - A pointer to bus controller of the device.\r
+ DeviceAddress - Represents the address of the target device on the USB,\r
+ which is assigned during USB enumeration. \r
+ EndPointAddress - The combination of an endpoint number and an endpoint \r
+ direction of the target USB device. Each endpoint address \r
+ supports data transfer in one direction except the \r
+ control endpoint (whose default endpoint address is 0). \r
+ It is the caller's responsibility to make sure that \r
+ the EndPointAddress represents an interrupt endpoint. \r
+ DeviceSpeed - Indicates device speed.\r
+ MaximumPacketLength - Indicates the maximum packet size the target endpoint\r
+ is capable of sending or receiving. \r
+ IsNewTransfer - If TRUE, an asynchronous interrupt pipe is built between\r
+ the host and the target interrupt endpoint. \r
+ If FALSE, the specified asynchronous interrupt pipe \r
+ is canceled. \r
+ DataToggle - A pointer to the data toggle value. On input, it is valid \r
+ when IsNewTransfer is TRUE, and it indicates the initial \r
+ data toggle value the asynchronous interrupt transfer \r
+ should adopt. \r
+ On output, it is valid when IsNewTransfer is FALSE, \r
+ and it is updated to indicate the data toggle value of \r
+ the subsequent asynchronous interrupt transfer. \r
+ PollingInterval - Indicates the interval, in milliseconds, that the \r
+ asynchronous interrupt transfer is polled. \r
+ This parameter is required when IsNewTransfer is TRUE. \r
+ DataLength - Indicates the length of data to be received at the \r
+ rate specified by PollingInterval from the target \r
+ asynchronous interrupt endpoint. This parameter \r
+ is only required when IsNewTransfer is TRUE. \r
+ Translator - A pointr to the transaction translator data.\r
+ CallBackFunction - The Callback function.This function is called at the \r
+ rate specified by PollingInterval.This parameter is \r
+ only required when IsNewTransfer is TRUE. \r
+ Context - The context that is passed to the CallBackFunction.\r
+ - This is an optional parameter and may be NULL.\r
+ \r
+ Returns:\r
+ \r
+ EFI_SUCCESS \r
+ The asynchronous interrupt transfer request has been successfully \r
+ submitted or canceled.\r
+ EFI_INVALID_PARAMETER \r
+ Some parameters are invalid.\r
+ EFI_OUT_OF_RESOURCES \r
+ The request could not be completed due to a lack of resources. \r
+ EFI_DEVICE_ERROR\r
+ Can't read register\r
+ \r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UsbVirtualHcSyncInterruptTransfer (\r
+ IN USB_BUS_CONTROLLER_DEVICE *UsbBusDev,\r
+ IN UINT8 DeviceAddress,\r
+ IN UINT8 EndPointAddress,\r
+ IN UINT8 DeviceSpeed,\r
+ IN UINTN MaximumPacketLength,\r
+ IN OUT VOID *Data,\r
+ IN OUT UINTN *DataLength,\r
+ IN OUT UINT8 *DataToggle,\r
+ IN UINTN TimeOut,\r
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
+ OUT UINT32 *TransferResult\r
+ )\r
+/*++\r
+ \r
+ Routine Description:\r
+ \r
+ Vitual interface to submits synchronous interrupt transfer to an interrupt endpoint \r
+ of a USB device for both Hc2 and Hc protocol.\r
+ \r
+ Arguments:\r
+ \r
+ UsbBusDev - A pointer to bus controller of the device.\r
+ DeviceAddress - Represents the address of the target device on the USB, \r
+ which is assigned during USB enumeration.\r
+ EndPointAddress - The combination of an endpoint number and an endpoint \r
+ direction of the target USB device. Each endpoint \r
+ address supports data transfer in one direction \r
+ except the control endpoint (whose default \r
+ endpoint address is 0). It is the caller's responsibility\r
+ to make sure that the EndPointAddress represents \r
+ an interrupt endpoint. \r
+ DeviceSpeed - Indicates device speed.\r
+ MaximumPacketLength - Indicates the maximum packet size the target endpoint \r
+ is capable of sending or receiving.\r
+ Data - A pointer to the buffer of data that will be transmitted \r
+ to USB device or received from USB device.\r
+ DataLength - On input, the size, in bytes, of the data buffer specified \r
+ by Data. On output, the number of bytes transferred.\r
+ DataToggle - A pointer to the data toggle value. On input, it indicates\r
+ the initial data toggle value the synchronous interrupt \r
+ transfer should adopt; \r
+ on output, it is updated to indicate the data toggle value \r
+ of the subsequent synchronous interrupt transfer. \r
+ TimeOut - Indicates the maximum time, in microseconds, which the \r
+ transfer is allowed to complete.\r
+ Translator - A pointr to the transaction translator data.\r
+ TransferResult - A pointer to the detailed result information from \r
+ the synchronous interrupt transfer. \r
+\r
+ Returns:\r
+ \r
+ EFI_SUCCESS \r
+ The synchronous interrupt transfer was completed successfully.\r
+ EFI_OUT_OF_RESOURCES \r
+ The synchronous interrupt transfer could not be submitted due \r
+ to lack of resource.\r
+ EFI_INVALID_PARAMETER \r
+ Some parameters are invalid.\r
+ EFI_TIMEOUT \r
+ The synchronous interrupt transfer failed due to timeout.\r
+ EFI_DEVICE_ERROR \r
+ The synchronous interrupt transfer failed due to host controller \r
+ or device error. Caller should check TranferResult for detailed \r
+ error information. \r
+ \r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UsbVirtualHcIsochronousTransfer (\r
+ IN USB_BUS_CONTROLLER_DEVICE *UsbBusDev,\r
+ IN UINT8 DeviceAddress,\r
+ IN UINT8 EndPointAddress,\r
+ IN UINT8 DeviceSpeed,\r
+ IN UINTN MaximumPacketLength,\r
+ IN UINT8 DataBuffersNumber,\r
+ IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
+ IN UINTN DataLength,\r
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
+ OUT UINT32 *TransferResult\r
+ )\r
+/*++\r
+ \r
+ Routine Description:\r
+ \r
+ Virtual interface to submits isochronous transfer to a target USB device\r
+ for both Hc2 and Hc protocol.\r
+ \r
+ Arguments:\r
+ \r
+ UsbBusDev - A pointer to bus controller of the device.\r
+ DeviceAddress - Represents the address of the target device on the USB,\r
+ which is assigned during USB enumeration.\r
+ EndPointAddress - End point address\r
+ DeviceSpeed - Indicates device speed.\r
+ MaximumPacketLength - Indicates the maximum packet size that the \r
+ default control transfer endpoint is capable of \r
+ sending or receiving.\r
+ DataBuffersNumber - Number of data buffers prepared for the transfer.\r
+ Data - Array of pointers to the buffers of data that will be \r
+ transmitted to USB device or received from USB device.\r
+ DataLength - Indicates the size, in bytes, of the data buffer \r
+ specified by Data.\r
+ Translator - A pointr to the transaction translator data.\r
+ TransferResult - A pointer to the detailed result information generated \r
+ by this control transfer. \r
+ \r
+ Returns:\r
+ \r
+ EFI_UNSUPPORTED \r
+\r
+--*/\r
+;\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+UsbVirtualHcAsyncIsochronousTransfer (\r
+ IN USB_BUS_CONTROLLER_DEVICE *UsbBusDev,\r
+ IN UINT8 DeviceAddress,\r
+ IN UINT8 EndPointAddress,\r
+ IN UINT8 DeviceSpeed,\r
+ IN UINTN MaximumPacketLength,\r
+ IN UINT8 DataBuffersNumber,\r
+ IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],\r
+ IN UINTN DataLength,\r
+ IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,\r
+ IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,\r
+ IN VOID *Context\r
+ )\r
+/*++\r
+ \r
+ Routine Description:\r
+ \r
+ Vitual interface to submits Async isochronous transfer to a target USB device\r
+ for both Hc2 and Hc protocol.\r
+ \r
+ Arguments:\r
+ \r
+ UsbBusDev - A pointer to bus controller of the device.\r
+ DeviceAddress - Represents the address of the target device on the USB,\r
+ which is assigned during USB enumeration.\r
+ EndPointAddress - End point address\r
+ DeviceSpeed - Indicates device speed.\r
+ MaximumPacketLength - Indicates the maximum packet size that the \r
+ default control transfer endpoint is capable of \r
+ sending or receiving.\r
+ DataBuffersNumber - Number of data buffers prepared for the transfer.\r
+ Data - Array of pointers to the buffers of data that will be transmitted \r
+ to USB device or received from USB device.\r
+ DataLength - Indicates the size, in bytes, of the data buffer \r
+ specified by Data.\r
+ Translator - A pointr to the transaction translator data.\r
+ IsochronousCallBack - When the transfer complete, the call back function will be called\r
+ Context - Pass to the call back function as parameter\r
+ \r
+ Returns:\r
+ \r
+ EFI_UNSUPPORTED \r
+\r
+--*/\r
+;\r