]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Ppi/UsbHostController.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / UsbHostController.h
index 107b7997d29311bdca8bb68f060d3c434034c38a..cf468f94789173be304057020a8ca100c3b5ad4e 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) 2006 - 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) 2006 - 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,35 +30,38 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 typedef struct _PEI_USB_HOST_CONTROLLER_PPI PEI_USB_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_USB_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
-  @param[out]    TransferResult        A pointer to the detailed result information \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[out]    TransferResult        A pointer to the detailed result information\r
                                        generated by this control transfer.\r
 \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_SUCCESS        The control transfer was completed successfully.\r
 \r
@@ -87,27 +83,30 @@ 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_USB_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]     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
-  @param[out]    TransferResult        A pointer to the detailed result information \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[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
@@ -134,12 +133,12 @@ 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_USB_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_DEVICE_ERROR      An error was encountered while attempting to retrieve \r
+  @retval EFI_DEVICE_ERROR      An error was encountered while attempting to retrieve\r
                                 the port number.\r
   @retval EFI_INVALID_PARAMETER PortNumber is NULL.\r
 \r
@@ -156,15 +155,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_USB_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
@@ -182,16 +181,16 @@ 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_USB_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
 \r
 **/\r
@@ -208,7 +207,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_USB_HOST_CONTROLLER_PPI.\r
   @param[in] PortNumber    Specifies the root hub port whose feature is\r
                            requested to be cleared.\r
@@ -233,19 +232,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_USB_HOST_CONTROLLER_PPI {\r
-  PEI_USB_HOST_CONTROLLER_CONTROL_TRANSFER            ControlTransfer;\r
-  PEI_USB_HOST_CONTROLLER_BULK_TRANSFER               BulkTransfer;\r
-  PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_NUMBER     GetRootHubPortNumber;\r
-  PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_STATUS     GetRootHubPortStatus;\r
-  PEI_USB_HOST_CONTROLLER_SET_ROOTHUB_PORT_FEATURE    SetRootHubPortFeature;\r
-  PEI_USB_HOST_CONTROLLER_CLEAR_ROOTHUB_PORT_FEATURE  ClearRootHubPortFeature;\r
+  PEI_USB_HOST_CONTROLLER_CONTROL_TRANSFER              ControlTransfer;\r
+  PEI_USB_HOST_CONTROLLER_BULK_TRANSFER                 BulkTransfer;\r
+  PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_NUMBER       GetRootHubPortNumber;\r
+  PEI_USB_HOST_CONTROLLER_GET_ROOTHUB_PORT_STATUS       GetRootHubPortStatus;\r
+  PEI_USB_HOST_CONTROLLER_SET_ROOTHUB_PORT_FEATURE      SetRootHubPortFeature;\r
+  PEI_USB_HOST_CONTROLLER_CLEAR_ROOTHUB_PORT_FEATURE    ClearRootHubPortFeature;\r
 };\r
 \r
-extern EFI_GUID gPeiUsbHostControllerPpiGuid;\r
+extern EFI_GUID  gPeiUsbHostControllerPpiGuid;\r
 \r
 #endif\r
-\r