]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h
1. Remove “Force clear PK” feature in AuthVarialbe driver.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / XhciDxe / Xhci.h
index 953ba4c5c213fee32334d310666a6fadebad1ef3..f6da016bfb8ee8589b8105cb40d44248265600d9 100644 (file)
@@ -29,42 +29,41 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiLib.h>\r
-#include <Library/PcdLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
 #include <IndustryStandard/Pci.h>\r
 \r
-typedef struct _USB_XHCI_DEV    USB_XHCI_DEV;\r
-typedef struct _USB_DEV_CONTEXT USB_DEV_CONTEXT;\r
+typedef struct _USB_XHCI_INSTANCE    USB_XHCI_INSTANCE;\r
+typedef struct _USB_DEV_CONTEXT      USB_DEV_CONTEXT;\r
 \r
 #include "XhciReg.h"\r
 #include "XhciSched.h"\r
 #include "ComponentName.h"\r
 \r
 //\r
-// XHC timeout experience values\r
+// Convert millisecond to microsecond.\r
 //\r
-#define XHC_1_MICROSECOND            1\r
-#define XHC_1_MILLISECOND            (1000 * XHC_1_MICROSECOND)\r
-#define XHC_1_SECOND                 (1000 * XHC_1_MILLISECOND)\r
-\r
+#define XHC_1_MILLISECOND            (1000)\r
 //\r
-// XHCI register operation timeout, set by experience\r
+// XHC generic timeout experience values.\r
+// The unit is microsecond, setting it as 10ms.\r
 //\r
-#define XHC_RESET_TIMEOUT            (1 * XHC_1_SECOND)\r
-#define XHC_GENERIC_TIMEOUT          (10 * XHC_1_MILLISECOND)\r
-\r
+#define XHC_GENERIC_TIMEOUT          (10 * 1000)\r
 //\r
-// Wait for roothub port power stable, refers to Spec[XHCI1.0-2.3.9]\r
+// XHC reset timeout experience values.\r
+// The unit is microsecond, setting it as 1s.\r
 //\r
-#define XHC_ROOT_PORT_RECOVERY_STALL (20 * XHC_1_MILLISECOND)\r
-\r
+#define XHC_RESET_TIMEOUT            (1000 * 1000)\r
+//\r
+// XHC delay experience value for polling operation.\r
+// The unit is microsecond, set it as 1ms.\r
 //\r
-// Sync and Async transfer polling interval, set by experience,\r
-// and the unit of Async is 100us, means 50ms as interval.\r
+#define XHC_POLL_DELAY               (1000)\r
 //\r
-#define XHC_SYNC_POLL_INTERVAL       (20 * XHC_1_MILLISECOND)\r
-#define XHC_ASYNC_POLL_INTERVAL      (50 * 10000U)\r
+// XHC async transfer timer interval, set by experience.\r
+// The unit is 100us, takes 50ms as interval.\r
+//\r
+#define XHC_ASYNC_TIMER_INTERVAL     EFI_TIMER_PERIOD_MILLISECONDS(50)\r
 \r
 //\r
 // XHC raises TPL to TPL_NOTIFY to serialize all its operations\r
@@ -93,21 +92,29 @@ typedef struct _USB_DEV_CONTEXT USB_DEV_CONTEXT;
 \r
 #define EFI_LIST_CONTAINER(Entry, Type, Field) BASE_CR(Entry, Type, Field)\r
 \r
-#define XHC_LOW_32BIT(Addr64)        ((UINT32)(((UINTN)(Addr64)) & 0xFFFFFFFF))\r
-#define XHC_HIGH_32BIT(Addr64)       ((UINT32)(RShiftU64((UINTN)(Addr64), 32) & 0xFFFFFFFF))\r
-#define XHC_BIT_IS_SET(Data, Bit)    ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
+#define XHC_LOW_32BIT(Addr64)          ((UINT32)(((UINTN)(Addr64)) & 0xFFFFFFFF))\r
+#define XHC_HIGH_32BIT(Addr64)         ((UINT32)(RShiftU64((UINT64)(UINTN)(Addr64), 32) & 0xFFFFFFFF))\r
+#define XHC_BIT_IS_SET(Data, Bit)      ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
 \r
 #define XHC_REG_BIT_IS_SET(Xhc, Offset, Bit) \\r
           (XHC_BIT_IS_SET(XhcReadOpReg ((Xhc), (Offset)), (Bit)))\r
 \r
-#define XHCI_IS_DATAIN(EndpointAddr) XHC_BIT_IS_SET((EndpointAddr), 0x80)\r
+#define XHCI_IS_DATAIN(EndpointAddr)   XHC_BIT_IS_SET((EndpointAddr), 0x80)\r
 \r
-#define USB_XHCI_DEV_SIGNATURE       SIGNATURE_32 ('x', 'h', 'c', 'i')\r
-#define XHC_FROM_THIS(a)             CR(a, USB_XHCI_DEV, Usb2Hc, USB_XHCI_DEV_SIGNATURE)\r
+#define XHCI_INSTANCE_SIG              SIGNATURE_32 ('x', 'h', 'c', 'i')\r
+#define XHC_FROM_THIS(a)               CR(a, USB_XHCI_INSTANCE, Usb2Hc, XHCI_INSTANCE_SIG)\r
 \r
 #define USB_DESC_TYPE_HUB              0x29\r
 #define USB_DESC_TYPE_HUB_SUPER_SPEED  0x2a\r
 \r
+//\r
+// The RequestType in EFI_USB_DEVICE_REQUEST is composed of\r
+// three fields: One bit direction, 2 bit type, and 5 bit\r
+// target.\r
+//\r
+#define USB_REQUEST_TYPE(Dir, Type, Target) \\r
+          ((UINT8)((((Dir) == EfiUsbDataIn ? 0x01 : 0) << 7) | (Type) | (Target)))\r
+\r
 //\r
 // Xhci Data and Ctrl Structures\r
 //\r
@@ -129,68 +136,6 @@ typedef struct {
 } EFI_USB_HUB_DESCRIPTOR;\r
 #pragma pack()\r
 \r
-struct _USB_XHCI_DEV {\r
-  UINT32                    Signature;\r
-  EFI_PCI_IO_PROTOCOL       *PciIo;\r
-  UINT64                    OriginalPciAttributes;\r
-\r
-  EFI_USB2_HC_PROTOCOL      Usb2Hc;\r
-\r
-  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
-\r
-  //\r
-  // ExitBootServicesEvent is used to set OS semaphore and\r
-  // stop the XHC DMA operation after exit boot service.\r
-  //\r
-  EFI_EVENT                 ExitBootServiceEvent;\r
-  EFI_EVENT                 PollTimer;\r
-  LIST_ENTRY                AsyncIntTransfers;\r
-\r
-  UINT8                     CapLength;    ///< Capability Register Length\r
-  XHC_HCSPARAMS1            HcSParams1;   ///< Structural Parameters 1\r
-  XHC_HCSPARAMS2            HcSParams2;   ///< Structural Parameters 2\r
-  XHC_HCCPARAMS             HcCParams;    ///< Capability Parameters\r
-  UINT32                    DBOff;        ///< Doorbell Offset\r
-  UINT32                    RTSOff;       ///< Runtime Register Space Offset\r
-  UINT16                    MaxInterrupt;\r
-  UINT32                    PageSize;\r
-  UINT64                    *ScratchBuf;\r
-  UINT32                    MaxScratchpadBufs;\r
-  UINT32                    ExtCapRegBase;\r
-  UINT32                    UsbLegSupOffset;\r
-  UINT64                    *DCBAA;\r
-  UINT32                    MaxSlotsEn;\r
-  //\r
-  // Cmd Transfer Ring\r
-  //\r
-  TRANSFER_RING             CmdRing;\r
-  //\r
-  // CmdEventRing\r
-  //\r
-  EVENT_RING                CmdEventRing;\r
-  //\r
-  // ControlTREventRing\r
-  //\r
-  EVENT_RING                CtrlTrEventRing;\r
-  //\r
-  // BulkTREventRing\r
-  //\r
-  EVENT_RING                BulkTrEventRing;\r
-  //\r
-  // IntTREventRing\r
-  //\r
-  EVENT_RING                IntTrEventRing;\r
-  //\r
-  // AsyncIntTREventRing\r
-  //\r
-  EVENT_RING                AsynIntTrEventRing;\r
-  //\r
-  // Misc\r
-  //\r
-  EFI_UNICODE_STRING_TABLE  *ControllerNameTable;\r
-\r
-};\r
-\r
 struct _USB_DEV_CONTEXT {\r
   //\r
   // Whether this entry in UsbDevContext array is used or not.\r
@@ -228,7 +173,7 @@ struct _USB_DEV_CONTEXT {
   //\r
   // The pointer to the output device context.\r
   //\r
-  VOID                      *OutputDevContxt;\r
+  VOID                      *OutputContext;\r
   //\r
   // The transfer queue for every endpoint.\r
   //\r
@@ -247,10 +192,61 @@ struct _USB_DEV_CONTEXT {
   EFI_USB_CONFIG_DESCRIPTOR **ConfDesc;\r
 };\r
 \r
+struct _USB_XHCI_INSTANCE {\r
+  UINT32                    Signature;\r
+  EFI_PCI_IO_PROTOCOL       *PciIo;\r
+  UINT64                    OriginalPciAttributes;\r
+\r
+  EFI_USB2_HC_PROTOCOL      Usb2Hc;\r
+\r
+  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;\r
+\r
+  //\r
+  // ExitBootServicesEvent is used to set OS semaphore and\r
+  // stop the XHC DMA operation after exit boot service.\r
+  //\r
+  EFI_EVENT                 ExitBootServiceEvent;\r
+  EFI_EVENT                 PollTimer;\r
+  LIST_ENTRY                AsyncIntTransfers;\r
+\r
+  UINT8                     CapLength;    ///< Capability Register Length\r
+  XHC_HCSPARAMS1            HcSParams1;   ///< Structural Parameters 1\r
+  XHC_HCSPARAMS2            HcSParams2;   ///< Structural Parameters 2\r
+  XHC_HCCPARAMS             HcCParams;    ///< Capability Parameters\r
+  UINT32                    DBOff;        ///< Doorbell Offset\r
+  UINT32                    RTSOff;       ///< Runtime Register Space Offset\r
+  UINT16                    MaxInterrupt;\r
+  UINT32                    PageSize;\r
+  UINT64                    *ScratchBuf;\r
+  UINT32                    MaxScratchpadBufs;\r
+  UINT32                    ExtCapRegBase;\r
+  UINT32                    UsbLegSupOffset;\r
+  UINT64                    *DCBAA;\r
+  UINT32                    MaxSlotsEn;\r
+  //\r
+  // Cmd Transfer Ring\r
+  //\r
+  TRANSFER_RING             CmdRing;\r
+  //\r
+  // EventRing\r
+  //\r
+  EVENT_RING                EventRing;\r
+  //\r
+  // Misc\r
+  //\r
+  EFI_UNICODE_STRING_TABLE  *ControllerNameTable;\r
+\r
+  //\r
+  // Store device contexts managed by XHCI instance\r
+  // The array supports up to 255 devices, entry 0 is reserved and should not be used.\r
+  //\r
+  USB_DEV_CONTEXT           UsbDevContext[256];\r
+};\r
+\r
+\r
 extern EFI_DRIVER_BINDING_PROTOCOL      gXhciDriverBinding;\r
 extern EFI_COMPONENT_NAME_PROTOCOL      gXhciComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL     gXhciComponentName2;\r
-extern USB_DEV_CONTEXT                  UsbDevContext[];\r
 \r
 /**\r
   Test to see if this driver supports ControllerHandle. Any\r
@@ -316,6 +312,109 @@ XhcDriverBindingStop (
   IN EFI_HANDLE                  *ChildHandleBuffer\r
   );\r
 \r
+/**\r
+  Retrieves the capability of root hub ports.\r
+\r
+  @param  This                  The EFI_USB2_HC_PROTOCOL instance.\r
+  @param  MaxSpeed              Max speed supported by the controller.\r
+  @param  PortNumber            Number of the root hub ports.\r
+  @param  Is64BitCapable        Whether the controller supports 64-bit memory\r
+                                addressing.\r
+\r
+  @retval EFI_SUCCESS           Host controller capability were retrieved successfully.\r
+  @retval EFI_INVALID_PARAMETER Either of the three capability pointer is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcGetCapability (\r
+  IN  EFI_USB2_HC_PROTOCOL  *This,\r
+  OUT UINT8                 *MaxSpeed,\r
+  OUT UINT8                 *PortNumber,\r
+  OUT UINT8                 *Is64BitCapable\r
+  );\r
+\r
+/**\r
+  Provides software reset for the USB host controller.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  Attributes            A bit mask of the reset operation to perform.\r
+\r
+  @retval EFI_SUCCESS           The reset operation succeeded.\r
+  @retval EFI_INVALID_PARAMETER Attributes is not valid.\r
+  @retval EFI_UNSUPPOURTED      The type of reset specified by Attributes is\r
+                                not currently supported by the host controller.\r
+  @retval EFI_DEVICE_ERROR      Host controller isn't halted to reset.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcReset (\r
+  IN EFI_USB2_HC_PROTOCOL  *This,\r
+  IN UINT16                Attributes\r
+  );\r
+\r
+/**\r
+  Retrieve the current state of the USB host controller.\r
+\r
+  @param  This                   This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  State                  Variable to return the current host controller\r
+                                 state.\r
+\r
+  @retval EFI_SUCCESS            Host controller state was returned in State.\r
+  @retval EFI_INVALID_PARAMETER  State is NULL.\r
+  @retval EFI_DEVICE_ERROR       An error was encountered while attempting to\r
+                                 retrieve the host controller's current state.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcGetState (\r
+  IN  EFI_USB2_HC_PROTOCOL  *This,\r
+  OUT EFI_USB_HC_STATE      *State\r
+  );\r
+\r
+/**\r
+  Sets the USB host controller to a specific state.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  State                 The state of the host controller that will be set.\r
+\r
+  @retval EFI_SUCCESS           The USB host controller was successfully placed\r
+                                in the state specified by State.\r
+  @retval EFI_INVALID_PARAMETER State is invalid.\r
+  @retval EFI_DEVICE_ERROR      Failed to set the state due to device error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcSetState (\r
+  IN EFI_USB2_HC_PROTOCOL  *This,\r
+  IN EFI_USB_HC_STATE      State\r
+  );\r
+\r
+/**\r
+  Retrieves the current status of a USB root hub port.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  PortNumber            The root hub port to retrieve the state from.\r
+                                This value is zero-based.\r
+  @param  PortStatus            Variable to receive the port state.\r
+\r
+  @retval EFI_SUCCESS           The status of the USB root hub port specified.\r
+                                by PortNumber was returned in PortStatus.\r
+  @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r
+  @retval EFI_DEVICE_ERROR      Can't read register.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcGetRootHubPortStatus (\r
+  IN  EFI_USB2_HC_PROTOCOL  *This,\r
+  IN  UINT8                 PortNumber,\r
+  OUT EFI_USB_PORT_STATUS   *PortStatus\r
+  );\r
+\r
 /**\r
   Sets a feature for the specified root hub port.\r
 \r
@@ -359,4 +458,255 @@ XhcClearRootHubPortFeature (
   IN EFI_USB_PORT_FEATURE  PortFeature\r
   );\r
 \r
+/**\r
+  Submits control transfer to a target USB device.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  DeviceAddress         The target device address.\r
+  @param  DeviceSpeed           Target device speed.\r
+  @param  MaximumPacketLength   Maximum packet size the default control transfer\r
+                                endpoint is capable of sending or receiving.\r
+  @param  Request               USB device request to send.\r
+  @param  TransferDirection     Specifies the data direction for the data stage\r
+  @param  Data                  Data buffer to be transmitted or received from USB\r
+                                device.\r
+  @param  DataLength            The size (in bytes) of the data buffer.\r
+  @param  Timeout               Indicates the maximum timeout, in millisecond.\r
+  @param  Translator            Transaction translator to be used by this device.\r
+  @param  TransferResult        Return the result of this control transfer.\r
+\r
+  @retval EFI_SUCCESS           Transfer was completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resources.\r
+  @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
+  @retval EFI_TIMEOUT           Transfer failed due to timeout.\r
+  @retval EFI_DEVICE_ERROR      Transfer failed due to host controller or device error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcControlTransfer (\r
+  IN     EFI_USB2_HC_PROTOCOL                *This,\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
+  Submits bulk transfer to a bulk endpoint of a USB device.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  DeviceAddress         Target device address.\r
+  @param  EndPointAddress       Endpoint number and its direction in bit 7.\r
+  @param  DeviceSpeed           Device speed, Low speed device doesn't support bulk\r
+                                transfer.\r
+  @param  MaximumPacketLength   Maximum packet size the endpoint is capable of\r
+                                sending or receiving.\r
+  @param  DataBuffersNumber     Number of data buffers prepared for the transfer.\r
+  @param  Data                  Array of pointers to the buffers of data to transmit\r
+                                from or receive into.\r
+  @param  DataLength            The lenght of the data buffer.\r
+  @param  DataToggle            On input, the initial data toggle for the transfer;\r
+                                On output, it is updated to to next data toggle to\r
+                                use of the subsequent bulk transfer.\r
+  @param  Timeout               Indicates the maximum time, in millisecond, which\r
+                                the transfer is allowed to complete.\r
+  @param  Translator            A pointr to the transaction translator data.\r
+  @param  TransferResult        A pointer to the detailed result information of the\r
+                                bulk transfer.\r
+\r
+  @retval EFI_SUCCESS           The transfer was completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.\r
+  @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
+  @retval EFI_TIMEOUT           The transfer failed due to timeout.\r
+  @retval EFI_DEVICE_ERROR      The transfer failed due to host controller error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcBulkTransfer (\r
+  IN     EFI_USB2_HC_PROTOCOL                *This,\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
+  Submits an asynchronous interrupt transfer to an\r
+  interrupt endpoint of a USB device.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  DeviceAddress         Target device address.\r
+  @param  EndPointAddress       Endpoint number and its direction encoded in bit 7\r
+  @param  DeviceSpeed           Indicates device speed.\r
+  @param  MaximumPacketLength   Maximum packet size the target endpoint is capable\r
+  @param  IsNewTransfer         If TRUE, to submit an new asynchronous interrupt\r
+                                transfer If FALSE, to remove the specified\r
+                                asynchronous interrupt.\r
+  @param  DataToggle            On input, the initial data toggle to use; on output,\r
+                                it is updated to indicate the next data toggle.\r
+  @param  PollingInterval       The he interval, in milliseconds, that the transfer\r
+                                is polled.\r
+  @param  DataLength            The length of data to receive at the rate specified\r
+                                by  PollingInterval.\r
+  @param  Translator            Transaction translator to use.\r
+  @param  CallBackFunction      Function to call at the rate specified by\r
+                                PollingInterval.\r
+  @param  Context               Context to CallBackFunction.\r
+\r
+  @retval EFI_SUCCESS           The request has been successfully submitted or canceled.\r
+  @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
+  @retval EFI_OUT_OF_RESOURCES  The request failed due to a lack of resources.\r
+  @retval EFI_DEVICE_ERROR      The transfer failed due to host controller error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcAsyncInterruptTransfer (\r
+  IN     EFI_USB2_HC_PROTOCOL                *This,\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
+  Submits synchronous interrupt transfer to an interrupt endpoint\r
+  of a USB device.\r
+\r
+  @param  This                  This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  DeviceAddress         Target device address.\r
+  @param  EndPointAddress       Endpoint number and its direction encoded in bit 7\r
+  @param  DeviceSpeed           Indicates device speed.\r
+  @param  MaximumPacketLength   Maximum packet size the target endpoint is capable\r
+                                of sending or receiving.\r
+  @param  Data                  Buffer of data that will be transmitted to  USB\r
+                                device or received from USB device.\r
+  @param  DataLength            On input, the size, in bytes, of the data buffer; On\r
+                                output, the number of bytes transferred.\r
+  @param  DataToggle            On input, the initial data toggle to use; on output,\r
+                                it is updated to indicate the next data toggle.\r
+  @param  Timeout               Maximum time, in second, to complete.\r
+  @param  Translator            Transaction translator to use.\r
+  @param  TransferResult        Variable to receive the transfer result.\r
+\r
+  @return EFI_SUCCESS           The transfer was completed successfully.\r
+  @return EFI_OUT_OF_RESOURCES  The transfer failed due to lack of resource.\r
+  @return EFI_INVALID_PARAMETER Some parameters are invalid.\r
+  @return EFI_TIMEOUT           The transfer failed due to timeout.\r
+  @return EFI_DEVICE_ERROR      The failed due to host controller or device error\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcSyncInterruptTransfer (\r
+  IN     EFI_USB2_HC_PROTOCOL                *This,\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
+  Submits isochronous transfer to a target USB device.\r
+\r
+  @param  This                 This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  DeviceAddress        Target device address.\r
+  @param  EndPointAddress      End point address with its direction.\r
+  @param  DeviceSpeed          Device speed, Low speed device doesn't support this\r
+                               type.\r
+  @param  MaximumPacketLength  Maximum packet size that the endpoint is capable of\r
+                               sending or receiving.\r
+  @param  DataBuffersNumber    Number of data buffers prepared for the transfer.\r
+  @param  Data                 Array of pointers to the buffers of data that will\r
+                               be transmitted to USB device or received from USB\r
+                               device.\r
+  @param  DataLength           The size, in bytes, of the data buffer.\r
+  @param  Translator           Transaction translator to use.\r
+  @param  TransferResult       Variable to receive the transfer result.\r
+\r
+  @return EFI_UNSUPPORTED      Isochronous transfer is unsupported.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcIsochronousTransfer (\r
+  IN     EFI_USB2_HC_PROTOCOL                *This,\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
+  Submits Async isochronous transfer to a target USB device.\r
+\r
+  @param  This                 This EFI_USB2_HC_PROTOCOL instance.\r
+  @param  DeviceAddress        Target device address.\r
+  @param  EndPointAddress      End point address with its direction.\r
+  @param  DeviceSpeed          Device speed, Low speed device doesn't support this\r
+                               type.\r
+  @param  MaximumPacketLength  Maximum packet size that the endpoint is capable of\r
+                               sending or receiving.\r
+  @param  DataBuffersNumber    Number of data buffers prepared for the transfer.\r
+  @param  Data                 Array of pointers to the buffers of data that will\r
+                               be transmitted to USB device or received from USB\r
+                               device.\r
+  @param  DataLength           The size, in bytes, of the data buffer.\r
+  @param  Translator           Transaction translator to use.\r
+  @param  IsochronousCallBack  Function to be called when the transfer complete.\r
+  @param  Context              Context passed to the call back function as\r
+                               parameter.\r
+\r
+  @return EFI_UNSUPPORTED      Isochronous transfer isn't supported.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+XhcAsyncIsochronousTransfer (\r
+  IN     EFI_USB2_HC_PROTOCOL                *This,\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
 #endif\r