]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/PlatformToDriverConfiguration.h
MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE
[mirror_edk2.git] / MdePkg / Include / Protocol / PlatformToDriverConfiguration.h
index fff7688875782317dce982ffd7e19567283eac7c..4756af45160011d88c154730f55a46a4455cb044 100644 (file)
@@ -5,8 +5,8 @@
   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 - 2008, Intel Corporation \r
-  All rights reserved. This program and the accompanying materials                          \r
+  Copyright (c) 2006 - 2016, 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
@@ -33,7 +33,7 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR
   the platform about the ControllerHandle that is being started.\r
   Information returned from Query may lead to the drivers Start()\r
   function failing.\r
-  If the UEFI driver is a bus driver and producing a ChildHandle\r
+  If the UEFI driver is a bus driver and producing a ChildHandle,\r
   the driver must call Query after the child handle has been created\r
   and an EFI_DEVICE_PATH_PROTOCOL has been placed on that handle,\r
   but before any time consuming operation is performed. If information\r
@@ -44,7 +44,15 @@ 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
@@ -57,7 +65,7 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR
   @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
-                              NULL for device drivers, and for bus\r
+                              NULL for device drivers and for bus\r
                               drivers that attempt to get options for\r
                               the bus controller. It will not be NULL\r
                               for a bus driver that attempts to get\r
@@ -84,7 +92,7 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR
                               may be different for different\r
                               protocols. UEFI driver decodes this\r
                               structure and its contents based on\r
-                              ProtocolGuid. ParameterBlock is\r
+                              ParameterTypeGuid. ParameterBlock is\r
                               allocated by the platform and the\r
                               platform is responsible for freeing\r
                               the ParameterBlock after Result is\r
@@ -99,8 +107,7 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR
 \r
   @retval EFI_NOT_FOUND         No more unread Instance exists.\r
 \r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r
-                                EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
 \r
   @retval EFI_INVALID_PARAMETER Instance is NULL.\r
 \r
@@ -132,9 +139,9 @@ EFI_STATUS
 typedef enum {\r
   ///\r
   ///  The controller specified by ControllerHandle is still\r
-  ///  in a usable state, it's configuration has been updated\r
+  ///  in a usable state, and its configuration has been updated\r
   ///  via parsing the ParameterBlock. If required by the\r
-  ///  parameter block and the module supports an NVRAM store\r
+  ///  parameter block, and the module supports an NVRAM store,\r
   ///  the configuration information from PB was successfully\r
   ///  saved to the NVRAM. No actions are required before\r
   ///  this controller can be used again with the updated\r
@@ -144,7 +151,7 @@ typedef enum {
   \r
   ///\r
   ///  The driver has detected that the controller specified\r
-  ///  by ControllerHandle  is not in a usable state, and it\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
@@ -156,8 +163,8 @@ typedef enum {
   ///  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 configuratiooptions have been set.  \r
+  ///  operation. The restart operation can be delayed until\r
+  ///  all of the configuratiooptions have been set.  \r
   ///\r
   EfiPlatformConfigurationActionRestartController = 2,\r
   \r
@@ -184,6 +191,20 @@ typedef enum {
   ///  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
@@ -199,35 +220,35 @@ typedef enum {
   ParameterBlock, and ParameterBlockSize. The UEFI driver may\r
   update values in ParameterBlock based on rules defined by\r
   ParameterTypeGuid. The platform is responsible for freeing\r
-  ParameterBlock and the UEFI driver must not try to free it\r
+  ParameterBlock and the UEFI driver must not try to free it.\r
 \r
-  @param This               A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.\r
+  @param This                A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.\r
 \r
-  @param ControllerHandle   The handle the driver is returning\r
-                            configuration information about.\r
+  @param ControllerHandle    The handle the driver is returning\r
+                             configuration information about.\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
-                            NULL for device drivers, and for bus\r
-                            drivers that attempt to get options for\r
-                            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
-                            Instance Instance data returned from\r
-                            Query().\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
+                             NULL for device drivers, and for bus\r
+                             drivers that attempt to get options for\r
+                             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
+                             Instance Instance data returned from\r
+                             Query().\r
 \r
-  @param Instance           Instance data passed to Query().\r
+  @param Instance            Instance data passed to Query().\r
 \r
-  @param ParameterTypeGuid  ParameterTypeGuid returned from Query.\r
+  @param ParameterTypeGuid   ParameterTypeGuid returned from Query.\r
 \r
-  @param ParameterBlock     ParameterBlock returned from Query.\r
+  @param ParameterBlock      ParameterBlock returned from Query.\r
 \r
-  @param ParameterBlockSize The ParameterBlock size returned from Query.\r
+  @param ParameterBlockSize  The ParameterBlock size returned from Query.\r
 \r
-  @param Configuration      ActionThe driver tells the platform what\r
-                            action is required for ParameterBlock to\r
-                            take effect.\r
+  @param ConfigurationAction The driver tells the platform what\r
+                             action is required for ParameterBlock to\r
+                             take effect.\r
   \r
   \r
   @retval EFI_SUCCESS           The platform return parameter information\r
@@ -235,7 +256,7 @@ typedef enum {
   \r
   @retval EFI_NOT_FOUND         Instance was not found.\r
   \r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
  \r
   @retval EFI_INVALID_PARAMETER Instance is zero.\r
   \r
@@ -285,21 +306,19 @@ struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL {
   EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL is platform\r
   firmware and the consumer is the UEFI driver. Note: if future\r
   versions of the DMTF SM CLP Specification require changes to the\r
-  parameter block definition, newer ParameterTypeGuid will be\r
+  parameter block definition, newer ParameterTypeGuid will be\r
   used.\r
 **/\r
 typedef struct {\r
-  CHAR8   *CLPCommand;        ///<  A pointer to the DMTF SM CLP command line null-terminated string that the \r
-                              ///<  driver is required to parse and process when this EFI_SUCCESS The platform \r
-                              ///<  return parameter information for ControllerHandle. EFI_NOT_FOUND Instance \r
-                              ///<  was not found. EFI_INVALID_PARAMETER ControllerHandle is not a valid \r
-                              ///<  EFI_HANDLE. EFI_INVALID_PARAMETER Instance is zero. function is called. \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 CLP return status string that the driver is required to\r
-                              ///<  provide to the calling agent. The calling agent may parse and/ or pass\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