]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Ppi/Usb2HostController.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / Usb2HostController.h
index e6d00ee92ea615a01c22b5dfce0881569fa53ed7..e979e9ebece3200684798069b93b68bb0c9d410c 100644 (file)
@@ -1,20 +1,13 @@
 /** @file\r
-  Defines the USB Host Controller PPI that provides I/O services for a USB Host \r
-  Controller that may be used to access recovery devices.  These interfaces are \r
+  Defines the USB Host Controller PPI that provides I/O services for a USB Host\r
+  Controller that may be used to access recovery devices.  These interfaces are\r
   modeled on the UEFI 2.3 specification EFI_USB2_HOST_CONTROLLER_PROTOCOL.\r
-  Refer to section 16.1 of the UEFI 2.3 Specification for more information on \r
+  Refer to section 16.1 of the UEFI 2.3 Specification for more information on\r
   these interfaces.\r
\r
-Copyright (c) 2010, Intel Corporation. All rights reserved. <BR>\r
 \r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution.  The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -37,42 +30,45 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 typedef struct _PEI_USB2_HOST_CONTROLLER_PPI PEI_USB2_HOST_CONTROLLER_PPI;\r
 \r
 /**\r
-  Initiate a USB control transfer using a specific USB Host controller on the USB bus. \r
+  Initiate a USB control transfer using a specific USB Host controller on the USB bus.\r
 \r
   @param[in]     PeiServices           The pointer to the PEI Services Table.\r
-  @param[in]     This                  The pointer to this instance of the \r
+  @param[in]     This                  The pointer to this instance of the\r
                                        PEI_USB2_HOST_CONTROLLER_PPI.\r
-  @param[in]     DeviceAddress         Represents the address of the target device \r
+  @param[in]     DeviceAddress         Represents the address of the target device\r
                                        on the USB.\r
   @param[in]     DeviceSpeed           Indicates device speed.\r
-  @param[in]     MaximumPacketLength   Indicates the maximum packet size that the \r
+  @param[in]     MaximumPacketLength   Indicates the maximum packet size that the\r
                                        default control transfer\r
                                        endpoint is capable of sending or receiving.\r
-  @param[in]     Request               A pointer to the USB device request that \r
+  @param[in]     Request               A pointer to the USB device request that\r
                                        will be sent to the USB device.\r
-  @param[in]     TransferDirection     Specifies the data direction for the transfer. \r
-                                       There are three values available: \r
+  @param[in]     TransferDirection     Specifies the data direction for the transfer.\r
+                                       There are three values available:\r
                                        EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData.\r
-  @param[in,out] Data                  A pointer to the buffer of data that will \r
+  @param[in,out] Data                  A pointer to the buffer of data that will\r
                                        be transmitted to USB device or\r
                                        received from USB device.\r
-  @param[in,out] DataLength            On input, indicates the size, in bytes, of \r
+  @param[in,out] DataLength            On input, indicates the size, in bytes, of\r
                                        the data buffer specified by Data.\r
-                                       On output, indicates the amount of data \r
+                                       On output, indicates the amount of data\r
                                        actually transferred.\r
-  @param[in]     TimeOut               Indicates the maximum time, in milliseconds, \r
+  @param[in]     TimeOut               Indicates the maximum time, in milliseconds,\r
                                        that the transfer is allowed to complete.\r
+                                       If Timeout is 0, then the caller must wait for\r
+                                       the function to be completed until EFI_SUCCESS\r
+                                       or EFI_DEVICE_ERROR is returned.\r
   @param[in]     Translator            A pointer to the transaction translator data.\r
-  @param[out]    TransferResult        A pointer to the detailed result information \r
+  @param[out]    TransferResult        A pointer to the detailed result information\r
                                        generated by this control transfer.\r
 \r
   @retval EFI_SUCCESS           The control transfer was completed successfully.\r
-  @retval EFI_DEVICE_ERROR      The control transfer failed due to host controller \r
+  @retval EFI_DEVICE_ERROR      The control transfer failed due to host controller\r
                                 or device error.\r
   @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES  The control transfer could not be completed due to a lack of resources.\r
   @retval EFI_TIMEOUT           The control transfer failed due to timeout.\r
-  \r
+\r
 \r
 **/\r
 typedef\r
@@ -93,29 +89,32 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  Initiate a USB bulk transfer using a specific USB Host controller on the USB bus. \r
+  Initiate a USB bulk transfer using a specific USB Host controller on the USB bus.\r
 \r
   @param[in]     PeiServices           The pointer to the PEI Services Table.\r
-  @param[in]     This                  The pointer to this instance of the \r
+  @param[in]     This                  The pointer to this instance of the\r
                                        PEI_USB2_HOST_CONTROLLER_PPI.\r
-  @param[in]     DeviceAddress         Represents the address of the target device \r
+  @param[in]     DeviceAddress         Represents the address of the target device\r
                                        on the USB.\r
-  @param[in]     EndPointAddress       The combination of an endpoint number and \r
+  @param[in]     EndPointAddress       The combination of an endpoint number and\r
                                        an endpoint direction of the target USB device.\r
   @param[in]     DeviceSpeed           Indicates device speed.\r
-  @param[in]     MaximumPacketLength   Indicates the maximum packet size the target \r
+  @param[in]     MaximumPacketLength   Indicates the maximum packet size the target\r
                                        endpoint is capable of sending or receiving.\r
-  @param[in,out] Data                  Array of pointers to the buffers of data \r
-                                       that will be transmitted to USB device or \r
+  @param[in,out] Data                  Array of pointers to the buffers of data\r
+                                       that will be transmitted to USB device or\r
                                        received from USB device.\r
-  @param[in,out] DataLength            When input, indicates the size, in bytes, of  \r
+  @param[in,out] DataLength            When input, indicates the size, in bytes, of\r
                                        the data buffers specified by Data. When output,\r
                                        indicates the data size actually transferred.\r
   @param[in,out] DataToggle            A pointer to the data toggle value.\r
   @param[in]     TimeOut               Indicates the maximum time, in milliseconds,\r
                                        in which the transfer is allowed to complete.\r
+                                       If Timeout is 0, then the caller must wait for\r
+                                       the function to be completed until EFI_SUCCESS\r
+                                       or EFI_DEVICE_ERROR is returned.\r
   @param[in]     Translator            A pointer to the transaction translator data.\r
-  @param[out]    TransferResult        A pointer to the detailed result information \r
+  @param[out]    TransferResult        A pointer to the detailed result information\r
                                        of the bulk transfer.\r
 \r
   @retval EFI_SUCCESS           The bulk transfer was completed successfully.\r
@@ -123,8 +122,8 @@ EFI_STATUS
                                 Caller should check TransferResult for detailed error information.\r
   @retval EFI_INVALID_PARAMETER Some parameters are invalid.\r
   @retval EFI_OUT_OF_RESOURCES  The bulk transfer could not be submitted due to a lack of resources.\r
-  @retval EFI_TIMEOUT           The bulk transfer failed due to timeout.  \r
-  \r
+  @retval EFI_TIMEOUT           The bulk transfer failed due to timeout.\r
+\r
 \r
 **/\r
 typedef\r
@@ -134,7 +133,7 @@ EFI_STATUS
   IN     PEI_USB2_HOST_CONTROLLER_PPI        *This,\r
   IN     UINT8                               DeviceAddress,\r
   IN     UINT8                               EndPointAddress,\r
-  IN     UINT8                               DeviceSpeed,  \r
+  IN     UINT8                               DeviceSpeed,\r
   IN     UINTN                               MaximumPacketLength,\r
   IN OUT VOID                                *Data[EFI_USB_MAX_BULK_BUFFER_NUM],\r
   IN OUT UINTN                               *DataLength,\r
@@ -148,10 +147,10 @@ EFI_STATUS
   Retrieves the number of root hub ports.\r
 \r
   @param[in]  PeiServices       The pointer to the PEI Services Table.\r
-  @param[in]  This              The pointer to this instance of the \r
+  @param[in]  This              The pointer to this instance of the\r
                                 PEI_USB2_HOST_CONTROLLER_PPI.\r
-  @param[out] PortNumber        The pointer to the number of the root hub ports.                                \r
-                                \r
+  @param[out] PortNumber        The pointer to the number of the root hub ports.\r
+\r
   @retval EFI_SUCCESS           The port number was retrieved successfully.\r
   @retval EFI_INVALID_PARAMETER PortNumber is NULL.\r
 \r
@@ -168,15 +167,15 @@ EFI_STATUS
   Retrieves the current status of a USB root hub port.\r
 \r
   @param[in]  PeiServices       The pointer to the PEI Services Table.\r
-  @param[in]  This              The pointer to this instance of the \r
+  @param[in]  This              The pointer to this instance of the\r
                                 PEI_USB2_HOST_CONTROLLER_PPI.\r
-  @param[in]  PortNumber        Specifies the root hub port from which the status is \r
+  @param[in]  PortNumber        Specifies the root hub port from which the status is\r
                                 to be retrieved.\r
                                 This value is zero based.\r
-  @param[out] PortStatus        A pointer to the current port status bits and port \r
+  @param[out] PortStatus        A pointer to the current port status bits and port\r
                                 status change bits.\r
-  \r
-  @retval EFI_SUCCESS           The status of the USB root hub port specified by \r
+\r
+  @retval EFI_SUCCESS           The status of the USB root hub port specified by\r
                                 PortNumber was returned in PortStatus.\r
   @retval EFI_INVALID_PARAMETER PortNumber is invalid.\r
 \r
@@ -194,18 +193,18 @@ EFI_STATUS
   Sets a feature for the specified root hub port.\r
 \r
   @param[in] PeiServices        The pointer to the PEI Services Table.\r
-  @param[in] This               The pointer to this instance of the \r
+  @param[in] This               The pointer to this instance of the\r
                                 PEI_USB2_HOST_CONTROLLER_PPI.\r
-  @param[in] PortNumber         Specifies the root hub port whose feature is requested \r
+  @param[in] PortNumber         Specifies the root hub port whose feature is requested\r
                                 to be set. This value is zero based.\r
-  @param[in] PortFeature        Indicates the feature selector associated with the feature \r
+  @param[in] PortFeature        Indicates the feature selector associated with the feature\r
                                 set request.\r
-  \r
-  @retval EFI_SUCCESS           The feature specified by PortFeature was set for \r
+\r
+  @retval EFI_SUCCESS           The feature specified by PortFeature was set for\r
                                 the USB root hub port specified by PortNumber.\r
-  @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid \r
+  @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid\r
                                 for this function.\r
-  @retval EFI_TIMEOUT           The time out occurred                                \r
+  @retval EFI_TIMEOUT           The time out occurred\r
 \r
 **/\r
 typedef\r
@@ -221,7 +220,7 @@ EFI_STATUS
   Clears a feature for the specified root hub port.\r
 \r
   @param[in] PeiServices          The pointer to the PEI Services Table.\r
-  @param[in] This                 The pointer to this instance of the \r
+  @param[in] This                 The pointer to this instance of the\r
                                   PEI_USB2_HOST_CONTROLLER_PPI.\r
   @param[in] PortNumber           Specifies the root hub port whose feature is\r
                                   requested to be cleared.\r
@@ -245,19 +244,18 @@ EFI_STATUS
 ///\r
 /// This PPI contains a set of services to interact with the USB host controller.\r
 /// These interfaces are modeled on the UEFI 2.3 specification protocol\r
-/// EFI_USB2_HOST_CONTROLLER_PROTOCOL.  Refer to section 16.1 of the UEFI 2.3 \r
+/// EFI_USB2_HOST_CONTROLLER_PROTOCOL.  Refer to section 16.1 of the UEFI 2.3\r
 /// Specification for more information on these interfaces.\r
 ///\r
 struct _PEI_USB2_HOST_CONTROLLER_PPI {\r
-  PEI_USB2_HOST_CONTROLLER_CONTROL_TRANSFER            ControlTransfer;\r
-  PEI_USB2_HOST_CONTROLLER_BULK_TRANSFER               BulkTransfer;\r
-  PEI_USB2_HOST_CONTROLLER_GET_ROOTHUB_PORT_NUMBER     GetRootHubPortNumber;\r
-  PEI_USB2_HOST_CONTROLLER_GET_ROOTHUB_PORT_STATUS     GetRootHubPortStatus;\r
-  PEI_USB2_HOST_CONTROLLER_SET_ROOTHUB_PORT_FEATURE    SetRootHubPortFeature;\r
-  PEI_USB2_HOST_CONTROLLER_CLEAR_ROOTHUB_PORT_FEATURE  ClearRootHubPortFeature;\r
+  PEI_USB2_HOST_CONTROLLER_CONTROL_TRANSFER              ControlTransfer;\r
+  PEI_USB2_HOST_CONTROLLER_BULK_TRANSFER                 BulkTransfer;\r
+  PEI_USB2_HOST_CONTROLLER_GET_ROOTHUB_PORT_NUMBER       GetRootHubPortNumber;\r
+  PEI_USB2_HOST_CONTROLLER_GET_ROOTHUB_PORT_STATUS       GetRootHubPortStatus;\r
+  PEI_USB2_HOST_CONTROLLER_SET_ROOTHUB_PORT_FEATURE      SetRootHubPortFeature;\r
+  PEI_USB2_HOST_CONTROLLER_CLEAR_ROOTHUB_PORT_FEATURE    ClearRootHubPortFeature;\r
 };\r
 \r
-extern EFI_GUID gPeiUsb2HostControllerPpiGuid;\r
+extern EFI_GUID  gPeiUsb2HostControllerPpiGuid;\r
 \r
 #endif\r
-\r