X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FPlatformToDriverConfiguration.h;h=4756af45160011d88c154730f55a46a4455cb044;hb=bd5ef82698e5e5931ae46e763187a472ce76b661;hp=fff7688875782317dce982ffd7e19567283eac7c;hpb=764f4d534b0c0697419caa5b32a00749f9cad21a;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h b/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h index fff7688875..4756af4516 100644 --- a/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h +++ b/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h @@ -5,8 +5,8 @@ by a UEFI Driver in its Start() function. This protocol allows the driver to receive configuration information as part of being started. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -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. Information returned from Query may lead to the drivers Start() function failing. - If the UEFI driver is a bus driver and producing a ChildHandle + If the UEFI driver is a bus driver and producing a ChildHandle, the driver must call Query after the child handle has been created and an EFI_DEVICE_PATH_PROTOCOL has been placed on that handle, but before any time consuming operation is performed. If information @@ -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 arguments returned from Query. The Instance value passed into Response must be the same value passed into the corresponding - call to Query. + call to Query. The UEFI driver must continuously call Query and + Response until EFI_NOT_FOUND is returned by Query. + If the UEFI driver does not recognize the ParameterTypeGuid, it + calls Response with a ConfigurationAction of + EfiPlatformConfigurationActionUnsupportedGuid. The UEFI driver + must then continue calling Query and Response until EFI_NOT_FOUND + is returned by Query. This gives the platform an opportunity to + pass additional configuration settings using a different + ParameterTypeGuid that may be supported by the driver. An Instance value of zero means return the first ParameterBlock in the set of unprocessed parameter blocks. The driver should increment the Instance value by one for each successive call to Query. @@ -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 return information on. This is an optional parameter that may be NULL. It will be - NULL for device drivers, and for bus + NULL for device drivers and for bus drivers that attempt to get options for the bus controller. It will not be NULL for a bus driver that attempts to get @@ -84,7 +92,7 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR may be different for different protocols. UEFI driver decodes this structure and its contents based on - ProtocolGuid. ParameterBlock is + ParameterTypeGuid. ParameterBlock is allocated by the platform and the platform is responsible for freeing the ParameterBlock after Result is @@ -99,8 +107,7 @@ typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DR @retval EFI_NOT_FOUND No more unread Instance exists. - @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid - EFI_HANDLE. + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. @retval EFI_INVALID_PARAMETER Instance is NULL. @@ -132,9 +139,9 @@ EFI_STATUS typedef enum { /// /// The controller specified by ControllerHandle is still - /// in a usable state, it's configuration has been updated + /// in a usable state, and its configuration has been updated /// via parsing the ParameterBlock. If required by the - /// parameter block and the module supports an NVRAM store + /// parameter block, and the module supports an NVRAM store, /// the configuration information from PB was successfully /// saved to the NVRAM. No actions are required before /// this controller can be used again with the updated @@ -144,7 +151,7 @@ typedef enum { /// /// The driver has detected that the controller specified - /// by ControllerHandle is not in a usable state, and it + /// by ControllerHandle is not in a usable state and /// needs to be stopped. The calling agent can use the /// DisconnectControservice to perform this operation, and /// it should be performed as soon as possible. @@ -156,8 +163,8 @@ typedef enum { /// be stopped and restarted before it can be used again. /// The calling agent can use the DisconnectController() /// and ConnectController() services to perform this - /// operation. The restart operation can be delayed until - /// all of the configuratiooptions have been set. + /// operation. The restart operation can be delayed until + /// all of the configuration options have been set. /// EfiPlatformConfigurationActionRestartController = 2, @@ -184,6 +191,20 @@ typedef enum { /// after ControllerHandle is stopped. /// EfiPlatformConfigurationActionNvramFailed = 4, + + /// + /// The controller specified by ControllerHandle is still + /// in a usable state; its configuration has not been updated + /// via parsing the ParameterBlock. The driver did not support + /// the ParameterBlock format identified by ParameterTypeGuid. + /// No actions are required before this controller can be used + /// again. On additional Query calls from this ControllerHandle, + /// the platform should stop returning a ParameterBlock + /// qualified by this same ParameterTypeGuid. If no other + /// ParameterTypeGuid is supported by the platform, Query + /// should return EFI_NOT_FOUND. + /// + EfiPlatformConfigurationActionUnsupportedGuid = 5, EfiPlatformConfigurationActionMaximum } EFI_PLATFORM_CONFIGURATION_ACTION; @@ -199,35 +220,35 @@ typedef enum { ParameterBlock, and ParameterBlockSize. The UEFI driver may update values in ParameterBlock based on rules defined by ParameterTypeGuid. The platform is responsible for freeing - ParameterBlock and the UEFI driver must not try to free it + ParameterBlock and the UEFI driver must not try to free it. - @param This A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance. + @param This A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance. - @param ControllerHandle The handle the driver is returning - configuration information about. + @param ControllerHandle The handle the driver is returning + configuration information about. - @param ChildHandle The handle of the child controller to - return information on. This is an optional - parameter that may be NULL. It will be - NULL for device drivers, and for bus - drivers that attempt to get options for - the bus controller. It will not be NULL - for a bus driver that attempts to get - options for one of its child controllers. - Instance Instance data returned from - Query(). + @param ChildHandle The handle of the child controller to + return information on. This is an optional + parameter that may be NULL. It will be + NULL for device drivers, and for bus + drivers that attempt to get options for + the bus controller. It will not be NULL + for a bus driver that attempts to get + options for one of its child controllers. + Instance Instance data returned from + Query(). - @param Instance Instance data passed to Query(). + @param Instance Instance data passed to Query(). - @param ParameterTypeGuid ParameterTypeGuid returned from Query. + @param ParameterTypeGuid ParameterTypeGuid returned from Query. - @param ParameterBlock ParameterBlock returned from Query. + @param ParameterBlock ParameterBlock returned from Query. - @param ParameterBlockSize The ParameterBlock size returned from Query. + @param ParameterBlockSize The ParameterBlock size returned from Query. - @param Configuration ActionThe driver tells the platform what - action is required for ParameterBlock to - take effect. + @param ConfigurationAction The driver tells the platform what + action is required for ParameterBlock to + take effect. @retval EFI_SUCCESS The platform return parameter information @@ -235,7 +256,7 @@ typedef enum { @retval EFI_NOT_FOUND Instance was not found. - @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. @retval EFI_INVALID_PARAMETER Instance is zero. @@ -285,21 +306,19 @@ struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL { EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL is platform firmware and the consumer is the UEFI driver. Note: if future versions of the DMTF SM CLP Specification require changes to the - parameter block definition, newer ParameterTypeGuid will be + parameter block definition, a newer ParameterTypeGuid will be used. **/ typedef struct { - CHAR8 *CLPCommand; ///< A pointer to the DMTF SM CLP command line null-terminated string that the - ///< driver is required to parse and process when this EFI_SUCCESS The platform - ///< return parameter information for ControllerHandle. EFI_NOT_FOUND Instance - ///< was not found. EFI_INVALID_PARAMETER ControllerHandle is not a valid - ///< EFI_HANDLE. EFI_INVALID_PARAMETER Instance is zero. function is called. + CHAR8 *CLPCommand; ///< A pointer to the null-terminated UTF-8 string that specifies the DMTF SM CLP command + ///< line that the driver is required to parse and process when this function is called. ///< See the DMTF SM CLP Specification 1.0 Final Standard for details on the ///< format and syntax of the CLP command line string. CLPCommand buffer ///< is allocated by the producer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOOL. UINT32 CLPCommandLength; ///< The length of the CLP Command in bytes. - CHAR8 *CLPReturnString; ///< A pointer to the CLP return status string that the driver is required to - ///< provide to the calling agent. The calling agent may parse and/ or pass + CHAR8 *CLPReturnString; ///< A pointer to the null-terminated UTF-8 string that indicates the CLP return status + ///< that the driver is required to provide to the calling agent. + ///< The calling agent may parse and/ or pass ///< this for processing and user feedback. The SM CLP Command Response string ///< buffer is filled in by the UEFI driver in the "keyword=value" format ///< described in the SM CLP Specification, unless otherwise requested via the SM