2 EFI Driver Configuration Protocol
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 Module Name: DriverConfiguration.h
17 #ifndef __EFI_DRIVER_CONFIGURATION2_H__
18 #define __EFI_DRIVER_CONFIGURATION2_H__
21 // Global ID for the Driver Configuration Protocol defined in UEFI 2.0
23 #define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
25 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \
28 typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL
;
31 EfiDriverConfigurationActionNone
= 0,
32 EfiDriverConfigurationActionStopController
= 1,
33 EfiDriverConfigurationActionRestartController
= 2,
34 EfiDriverConfigurationActionRestartPlatform
= 3,
35 EfiDriverConfigurationActionMaximum
36 } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED
;
38 #define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
39 #define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
40 #define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
41 #define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
44 Allows the user to set controller specific options for a controller that a
45 driver is currently managing.
47 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
48 @param ControllerHandle The handle of the controller to set options on.
49 @param ChildHandle The handle of the child controller to set options on. This
50 is an optional parameter that may be NULL. It will be NULL
51 for device drivers, and for a bus drivers that wish to set
52 options for the bus controller. It will not be NULL for a
53 bus driver that wishes to set options for one of its child
55 @param Language A pointer to a three character ISO 639-2 language identifier.
56 This is the language of the user interface that should be
57 presented to the user, and it must match one of the languages
58 specified in SupportedLanguages. The number of languages
59 supported by a driver is up to the driver writer.
60 @param ActionRequired A pointer to the action that the calling agent is required
61 to perform when this function returns. See "Related
62 Definitions" for a list of the actions that the calling
63 agent is required to perform prior to accessing
64 ControllerHandle again.
66 @retval EFI_SUCCESS The driver specified by This successfully set the
67 configuration options for the controller specified
69 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
70 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
71 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
72 @retval EFI_UNSUPPORTED The driver specified by This does not support setting
73 configuration options for the controller specified by
74 ControllerHandle and ChildHandle.
75 @retval EFI_UNSUPPORTED The driver specified by This does not support the
76 language specified by Language.
77 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the
78 configuration options for the controller specified
79 by ControllerHandle and ChildHandle.
80 @retval EFI_OUT_RESOURCES There are not enough resources available to set the
81 configuration options for the controller specified
82 by ControllerHandle and ChildHandle.
87 (EFIAPI
*EFI_DRIVER_CONFIGURATION2_SET_OPTIONS
) (
88 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL
*This
,
89 IN EFI_HANDLE ControllerHandle
,
90 IN EFI_HANDLE ChildHandle OPTIONAL
,
92 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED
*ActionRequired
96 Tests to see if a controller's current configuration options are valid.
98 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
99 @param ControllerHandle The handle of the controller to test if it's current
100 configuration options are valid.
101 @param ChildHandle The handle of the child controller to test if it's current
102 configuration options are valid. This is an optional
103 parameter that may be NULL. It will be NULL for device
104 drivers. It will also be NULL for a bus drivers that wish
105 to test the configuration options for the bus controller.
106 It will not be NULL for a bus driver that wishes to test
107 configuration options for one of its child controllers.
109 @retval EFI_SUCCESS The controller specified by ControllerHandle and
110 ChildHandle that is being managed by the driver
111 specified by This has a valid set of configuration
113 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
114 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
115 @retval EFI_UNSUPPORTED The driver specified by This is not currently
116 managing the controller specified by ControllerHandle
118 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
119 ChildHandle that is being managed by the driver
120 specified by This has an invalid set of configuration
126 (EFIAPI
*EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID
) (
127 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL
*This
,
128 IN EFI_HANDLE ControllerHandle
,
129 IN EFI_HANDLE ChildHandle OPTIONAL
133 Forces a driver to set the default configuration options for a controller.
135 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
136 @param ControllerHandle The handle of the controller to force default configuration options on.
137 @param ChildHandle The handle of the child controller to force default configuration options on This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller. It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.
138 @param DefaultType The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle. See Table 9-1 for legal values. A DefaultType of 0x00000000 must be supported by this protocol.
139 @param ActionRequired A pointer to the action that the calling agent is required to perform when this function returns. See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.
141 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
142 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
143 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
144 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
145 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
146 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.
147 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
148 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
153 (EFIAPI
*EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS
) (
154 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL
*This
,
155 IN EFI_HANDLE ControllerHandle
,
156 IN EFI_HANDLE ChildHandle OPTIONAL
,
157 IN UINT32 DefaultType
,
158 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED
*ActionRequired
164 struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL
{
165 EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions
;
166 EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid
;
167 EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults
;
168 CHAR8
*SupportedLanguages
;
172 Interface structure for the Driver Configuration Protocol.
174 @par Protocol Description:
175 Used to set configuration options for a controller that an EFI Driver is managing.
177 @param SetOptions Allows the use to set drivers specific configuration
178 options for a controller that the driver is currently managing.
180 @param OptionsValid Tests to see if a controller's current configuration
183 @param ForceDefaults Forces a driver to set the default configuration options
186 @param SupportedLanguages A Null-terminated ASCII string that contains one or more
187 ISO 639-2 language codes. This is the list of language
188 codes that this protocol supports.
192 extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid
;