]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/PlatformToDriverConfiguration.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Protocol / PlatformToDriverConfiguration.h
index ee10dc74f7af38ac87f6c26166f4f2f3b4cf65e8..48b83893fe712fc6780123555ee710603ed8fe90 100644 (file)
@@ -1,18 +1,12 @@
 /** @file\r
   UEFI Platform to Driver Configuration Protocol is defined in UEFI specification.\r
-  \r
-  This is a protocol that is optionally produced by the platform and optionally consumed \r
-  by a UEFI Driver in its Start() function. This protocol allows the driver to receive \r
-  configuration information as part of being started.\r
 \r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  This is a protocol that is optionally produced by the platform and optionally consumed\r
+  by a UEFI Driver in its Start() function. This protocol allows the driver to receive\r
+  configuration information as part of being started.\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
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID  \\r
   { 0x642cd590, 0x8059, 0x4c0a, { 0xa9, 0x58, 0xc5, 0xec, 0x7, 0xd2, 0x3c, 0x4b } }\r
 \r
-\r
 typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL;\r
 \r
-\r
 /**\r
   The UEFI driver must call Query early in the Start() function\r
   before any time consuming operations are performed. If\r
@@ -44,16 +36,24 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR
   returned by the platform, and calls Response passing in the\r
   arguments returned from Query. The Instance value passed into\r
   Response must be the same value passed into the corresponding\r
-  call to Query.\r
+  call to Query. The UEFI driver must continuously call Query and\r
+  Response until EFI_NOT_FOUND is returned by Query.\r
+  If the UEFI driver does not recognize the ParameterTypeGuid, it\r
+  calls Response with a ConfigurationAction of\r
+  EfiPlatformConfigurationActionUnsupportedGuid. The UEFI driver\r
+  must then continue calling Query and Response until EFI_NOT_FOUND\r
+  is returned by Query. This gives the platform an opportunity to\r
+  pass additional configuration settings using a different\r
+  ParameterTypeGuid that may be supported by the driver.\r
   An Instance value of zero means return the first ParameterBlock\r
   in the set of unprocessed parameter blocks. The driver should\r
   increment the Instance value by one for each successive call to Query.\r
 \r
   @param This                 A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.\r
-  \r
+\r
   @param ControllerHandle     The handle the platform will return\r
                               configuration information about.\r
-  \r
+\r
   @param ChildHandle          The handle of the child controller to\r
                               return information on. This is an optional\r
                               parameter that may be NULL. It will be\r
@@ -62,8 +62,8 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR
                               the bus controller. It will not be NULL\r
                               for a bus driver that attempts to get\r
                               options for one of its child controllers.\r
-  \r
-  \r
+\r
+\r
   @param Instance             Pointer to the Instance value. Zero means\r
                               return the first query data. The caller should\r
                               increment this value by one each time to retrieve\r
@@ -126,7 +126,7 @@ EFI_STATUS
   OUT       EFI_GUID    **ParameterTypeGuid,\r
   OUT       VOID        **ParameterBlock,\r
   OUT       UINTN       *ParameterBlockSize\r
-);\r
+  );\r
 \r
 typedef enum {\r
   ///\r
@@ -139,27 +139,27 @@ typedef enum {
   ///  this controller can be used again with the updated\r
   ///  configuration settings.\r
   ///\r
-  EfiPlatformConfigurationActionNone              = 0,\r
-  \r
+  EfiPlatformConfigurationActionNone = 0,\r
+\r
   ///\r
   ///  The driver has detected that the controller specified\r
-  ///  by ControllerHandle is not in a usable state and \r
+  ///  by ControllerHandle is not in a usable state and\r
   ///  needs to be stopped. The calling agent can use the\r
   ///  DisconnectControservice to perform this operation, and\r
-  ///  it should be performed as soon as possible.  \r
+  ///  it should be performed as soon as possible.\r
   ///\r
-  EfiPlatformConfigurationActionStopController    = 1,\r
-  \r
+  EfiPlatformConfigurationActionStopController = 1,\r
+\r
   ///\r
   ///  This controller specified by ControllerHandle needs to\r
   ///  be stopped and restarted before it can be used again.\r
   ///  The calling agent can use the DisconnectController()\r
   ///  and ConnectController() services to perform this\r
   ///  operation. The restart operation can be delayed until\r
-  ///  all of the configuration options have been set.  \r
+  ///  all of the configuration options have been set.\r
   ///\r
   EfiPlatformConfigurationActionRestartController = 2,\r
-  \r
+\r
   ///\r
   ///  A configuration change has been made that requires the\r
   ///  platform to be restarted before the controller\r
@@ -167,9 +167,9 @@ typedef enum {
   ///  calling agent can use the ResetSystem() services to\r
   ///  perform this operation. The restart operation can be\r
   ///  delayed until all of the configuration options have\r
-  ///  been set.  \r
+  ///  been set.\r
   ///\r
-  EfiPlatformConfigurationActionRestartPlatform   = 3,\r
+  EfiPlatformConfigurationActionRestartPlatform = 3,\r
 \r
   ///\r
   ///  The controller specified by ControllerHandle is still\r
@@ -180,13 +180,26 @@ typedef enum {
   ///  are required before this controller can be used again\r
   ///  with the updated configuration settings, but these\r
   ///  configuration settings are not guaranteed to persist\r
-  ///  after ControllerHandle is stopped. \r
-  /// \r
-  EfiPlatformConfigurationActionNvramFailed       = 4,\r
+  ///  after ControllerHandle is stopped.\r
+  ///\r
+  EfiPlatformConfigurationActionNvramFailed = 4,\r
+\r
+  ///\r
+  /// The controller specified by ControllerHandle is still\r
+  /// in a usable state; its configuration has not been updated\r
+  /// via parsing the ParameterBlock. The driver did not support\r
+  /// the ParameterBlock format identified by ParameterTypeGuid.\r
+  /// No actions are required before this controller can be used\r
+  /// again. On additional Query calls from this ControllerHandle,\r
+  /// the platform should stop returning a ParameterBlock\r
+  /// qualified by this same ParameterTypeGuid. If no other\r
+  /// ParameterTypeGuid is supported by the platform, Query\r
+  /// should return EFI_NOT_FOUND.\r
+  ///\r
+  EfiPlatformConfigurationActionUnsupportedGuid = 5,\r
   EfiPlatformConfigurationActionMaximum\r
 } EFI_PLATFORM_CONFIGURATION_ACTION;\r
 \r
-\r
 /**\r
   The UEFI driver repeatedly calls Query, processes the\r
   information returned by the platform, and calls Response passing\r
@@ -227,17 +240,17 @@ typedef enum {
   @param ConfigurationAction The driver tells the platform what\r
                              action is required for ParameterBlock to\r
                              take effect.\r
-  \r
-  \r
+\r
+\r
   @retval EFI_SUCCESS           The platform return parameter information\r
                                 for ControllerHandle.\r
-  \r
+\r
   @retval EFI_NOT_FOUND         Instance was not found.\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
\r
+\r
   @retval EFI_INVALID_PARAMETER Instance is zero.\r
-  \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -248,10 +261,9 @@ EFI_STATUS
   IN CONST  UINTN       *Instance,\r
   IN CONST  EFI_GUID    *ParameterTypeGuid,\r
   IN CONST  VOID        *ParameterBlock,\r
-  IN CONST  UINTN       ParameterBlockSize ,\r
+  IN CONST  UINTN       ParameterBlockSize,\r
   IN CONST  EFI_PLATFORM_CONFIGURATION_ACTION ConfigurationAction\r
-);\r
-\r
+  );\r
 \r
 ///\r
 /// The EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL is used by the\r
@@ -266,17 +278,15 @@ EFI_STATUS
 /// taken.\r
 ///\r
 struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL {\r
-  EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY    Query;\r
-  EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response;\r
+  EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY       Query;\r
+  EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE    Response;\r
 };\r
 \r
-\r
-\r
 #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID   \\r
   {0x345ecc0e, 0xcb6, 0x4b75, { 0xbb, 0x57, 0x1b, 0x12, 0x9c, 0x47, 0x33,0x3e } }\r
 \r
 /**\r
-   \r
+\r
   ParameterTypeGuid provides the support for parameters\r
   communicated through the DMTF SM CLP Specification 1.0 Final\r
   Standard to be used to configure the UEFI driver. In this\r
@@ -288,46 +298,43 @@ struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL {
   used.\r
 **/\r
 typedef struct {\r
-  CHAR8   *CLPCommand;        ///<  A pointer to the null-terminated UTF-8 string that specifies the DMTF SM CLP command\r
-                              ///<  line that the driver is required to parse and process when this function is called. \r
-                              ///<  See the DMTF SM CLP Specification 1.0 Final Standard for details on the \r
-                              ///<  format and syntax of the CLP command line string. CLPCommand buffer\r
-                              ///<  is allocated by the producer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOOL.\r
-  UINT32  CLPCommandLength;   ///< The length of the CLP Command in bytes.\r
-  CHAR8   *CLPReturnString;   ///<  A pointer to the null-terminated UTF-8 string that indicates the CLP return status\r
-                              ///<  that the driver is required to provide to the calling agent.\r
-                              ///<  The calling agent may parse and/ or pass\r
-                              ///<  this for processing and user feedback. The SM CLP Command Response string\r
-                              ///<  buffer is filled in by the UEFI driver in the "keyword=value" format\r
-                              ///<  described in the SM CLP Specification, unless otherwise requested via the SM\r
-                              ///<  CLP Coutput option in the Command Line string buffer. UEFI driver's support\r
-                              ///<  for this default "keyword=value" output format is required if the UEFI\r
-                              ///<  driver supports this protocol, while support for other SM CLP output\r
-                              ///<  formats is optional (the UEFI Driver should return an EFI_UNSUPPORTED if\r
-                              ///<  the SM CLP Coutput option requested by the caller is not supported by the\r
-                              ///<  UEFI Driver). CLPReturnString buffer is allocated by the consumer of the\r
-                              ///<  EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to\r
-                              ///<  Response().  \r
-  UINT32  CLPReturnStringLength; ///< The length of the CLP return status string in bytes.\r
-  UINT8   CLPCmdStatus;       ///<  SM CLP Command Status (see DMTF SM CLP Specification 1.0 Final Standard -\r
-                              ///<  Table 4) CLPErrorValue SM CLP Processing Error Value (see DMTF SM\r
-                              ///<  CLP Specification 1.0 Final Standard - Table 6). This field is filled in by\r
-                              ///<  the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC \r
-                              ///<  OL and undefined prior to the call to Response().  \r
-  UINT8   CLPErrorValue;      ///<  SM CLP Processing Error Value (see DMTF SM CLP Specification 1.0 Final Standard - Table 6).\r
-                              ///<  This field is filled in by the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL and undefined prior to the call to Response().                              \r
-  UINT16  CLPMsgCode;         ///<  Bit 15: OEM Message Code Flag 0 = Message Code is an SM CLP Probable\r
-                              ///<  Cause Value. (see SM CLP Specification Table 11) 1 = Message Code is OEM\r
-                              ///<  Specific Bits 14-0: Message Code This field is filled in by the consumer of\r
-                              ///<  the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to\r
-                              ///<  Response(). \r
-\r
+  CHAR8     *CLPCommand;           ///<  A pointer to the null-terminated UTF-8 string that specifies the DMTF SM CLP command\r
+                                   ///<  line that the driver is required to parse and process when this function is called.\r
+                                   ///<  See the DMTF SM CLP Specification 1.0 Final Standard for details on the\r
+                                   ///<  format and syntax of the CLP command line string. CLPCommand buffer\r
+                                   ///<  is allocated by the producer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOOL.\r
+  UINT32    CLPCommandLength;      ///< The length of the CLP Command in bytes.\r
+  CHAR8     *CLPReturnString;      ///<  A pointer to the null-terminated UTF-8 string that indicates the CLP return status\r
+                                   ///<  that the driver is required to provide to the calling agent.\r
+                                   ///<  The calling agent may parse and/ or pass\r
+                                   ///<  this for processing and user feedback. The SM CLP Command Response string\r
+                                   ///<  buffer is filled in by the UEFI driver in the "keyword=value" format\r
+                                   ///<  described in the SM CLP Specification, unless otherwise requested via the SM\r
+                                   ///<  CLP Coutput option in the Command Line string buffer. UEFI driver's support\r
+                                   ///<  for this default "keyword=value" output format is required if the UEFI\r
+                                   ///<  driver supports this protocol, while support for other SM CLP output\r
+                                   ///<  formats is optional (the UEFI Driver should return an EFI_UNSUPPORTED if\r
+                                   ///<  the SM CLP Coutput option requested by the caller is not supported by the\r
+                                   ///<  UEFI Driver). CLPReturnString buffer is allocated by the consumer of the\r
+                                   ///<  EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to\r
+                                   ///<  Response().\r
+  UINT32    CLPReturnStringLength; ///< The length of the CLP return status string in bytes.\r
+  UINT8     CLPCmdStatus;          ///<  SM CLP Command Status (see DMTF SM CLP Specification 1.0 Final Standard -\r
+                                   ///<  Table 4) CLPErrorValue SM CLP Processing Error Value (see DMTF SM\r
+                                   ///<  CLP Specification 1.0 Final Standard - Table 6). This field is filled in by\r
+                                   ///<  the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC\r
+                                   ///<  OL and undefined prior to the call to Response().\r
+  UINT8     CLPErrorValue;         ///<  SM CLP Processing Error Value (see DMTF SM CLP Specification 1.0 Final Standard - Table 6).\r
+                                   ///<  This field is filled in by the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL and undefined prior to the call to Response().\r
+  UINT16    CLPMsgCode;            ///<  Bit 15: OEM Message Code Flag 0 = Message Code is an SM CLP Probable\r
+                                   ///<  Cause Value. (see SM CLP Specification Table 11) 1 = Message Code is OEM\r
+                                   ///<  Specific Bits 14-0: Message Code This field is filled in by the consumer of\r
+                                   ///<  the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to\r
+                                   ///<  Response().\r
 } EFI_CONFIGURE_CLP_PARAMETER_BLK;\r
 \r
+extern EFI_GUID  gEfiPlatformToDriverConfigurationClpGuid;\r
 \r
-\r
-extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid;\r
-\r
-extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid;\r
+extern EFI_GUID  gEfiPlatformToDriverConfigurationProtocolGuid;\r
 \r
 #endif\r