3 Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 PlatformToDriverConfiguration.h
18 UEFI Platform to Driver Configuration Protocol
24 #ifndef _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_
25 #define _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_H_
28 // Global ID for the Platform to Driver Configuration Protocol
30 #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID \
32 0x642cd590, 0x8059, 0x4c0a, {0xa9, 0x58, 0xc5, 0xec, 0x07, 0xd2, 0x3c, 0x4b} \
35 #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID \
37 0x345ecc0e, 0x0cb6, 0x4b75, {0xbb, 0x57, 0x1b, 0x12, 0x9c, 0x47, 0x33, 0x3e} \
40 EFI_FORWARD_DECLARATION (EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL
);
43 EfiPlatformConfigurationActionNone
= 0,
44 EfiPlatformConfigurationActionStopController
= 1,
45 EfiPlatformConfigurationActionRestartController
= 2,
46 EfiPlatformConfigurationActionRestartPlatform
= 3,
47 EfiPlatformConfigurationActionNvramFailed
= 4,
48 EfiPlatformConfigurationActionMaximum
49 } EFI_PLATFORM_CONFIGURATION_ACTION
;
53 UINT32 CLPCommandLength
;
54 CHAR8
*CLPReturnString
;
55 UINT32 CLPReturnStringLength
;
59 } EFI_CONFIGURE_CLP_PARAMETER_BLK
;
63 (EFIAPI
*EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY
) (
64 IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL
*This
,
65 IN EFI_HANDLE ControllerHandle
,
66 IN EFI_HANDLE ChildHandle
, OPTIONAL
68 OUT EFI_GUID
**ParameterTypeGuid
,
69 OUT VOID
**ParameterBlock
,
70 OUT UINTN
*ParameterBlockSize
75 Allows the UEFI driver to query the platform for configuration information
76 needed to complete the drivers Start() operation.
79 This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.
80 ControllerHandle - The handle the platform will return configuration
82 ChildHandle - The handle of the child controller to set options on.
83 This is an optional parameter that may be NULL. It will
84 be NULL for device drivers, and for a bus drivers that
85 wish to set options for the bus controller. It will not
86 be NULL for a bus driver that wishes to set options for
87 one of its child controllers.
88 Instance - Pointer to the Instance value. Zero means return the first
89 query data. The caller should increment this value by one
90 each time to retrieve successive data.
91 ParameterTypeGuid - An EFI_GUID that defines the contents of ParameterBlock.
92 UEFI drivers must use the ParameterTypeGuid to determine
93 how to parse the ParameterBlock. The caller should not
94 attempt to free ParameterTypeGuid.
95 ParameterBlock - The platform returns a pointer to the ParameterBlock
96 structure which contains details about the configuration
97 parameters specific to the ParameterTypeGuid. This structure
98 is defined based on the protocol and may be different for
99 different protocols. UEFI driver decodes this structure
100 and its contents based on ProtocolGuid. ParameterBlock
101 is allocated by the platform and the platform is responsible
102 for freeing the ParameterBlock after Response is called.
103 ParameterBlockSize - The platform returns the size of the ParameterBlock in bytes.
106 EFI_SUCCESS - The platform return parameter information for ControllerHandle.
107 EFI_NOT_FOUND - No more unread Instance exists.
108 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
109 EFI_INVALID_PARAMETER - Instance is NULL.
110 EFI_DEVICE_ERROR - A device error occurred while attempting to return
111 parameter block information for the controller specified
112 by ControllerHandle and ChildHandle.
113 EFI_OUT_RESOURCES - There are not enough resources available to set the
114 configuration options for the controller specified
115 by ControllerHandle and ChildHandle.
121 (EFIAPI
*EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE
) (
122 IN EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL
*This
,
123 IN EFI_HANDLE ControllerHandle
,
124 IN EFI_HANDLE ChildHandle OPTIONAL
,
126 IN EFI_GUID
*ParameterTypeGuid
,
127 IN VOID
*ParameterBlock
,
128 IN UINTN ParameterBlockSize
,
129 IN EFI_PLATFORM_CONFIGURATION_ACTION ConfigurationAction
134 Tell the platform what actions where taken by the driver after processing
135 the data returned from Query.
138 This - A pointer to the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL instance.
139 ControllerHandle - The handle the platform will return configuration
141 ChildHandle - The handle of the child controller to set options on.
142 This is an optional parameter that may be NULL. It will
143 be NULL for device drivers, and for a bus drivers that
144 wish to set options for the bus controller. It will not
145 be NULL for a bus driver that wishes to set options for
146 one of its child controllers.
147 Instance - Instance data returned from Query.
148 ParameterTypeGuid - ParameterTypeGuid returned from Query.
149 ParameterBlock - ParameterBlock returned from Query.
150 ParameterBlockSize - The ParameterBlock size returned from Query.
151 ConfigurationAction- The driver tells the platform what action is required
152 for ParameterBlock to take effect.
155 EFI_SUCCESS - The platform return parameter information for ControllerHandle.
156 EFI_NOT_FOUND - Instance was not found.
157 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
158 EFI_INVALID_PARAMETER - Instance is zero.
163 // Interface structure for the Platform to Driver Configuration Protocol
165 struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL
{
166 EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY Query
;
167 EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response
;
170 extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid
;
171 extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid
;