3 Copyright (c) 2004, 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.
18 EFI Driver Configuration Protocol
24 #ifndef _EFI_DRIVER_CONFIGURATION_H_
25 #define _EFI_DRIVER_CONFIGURATION_H_
28 // Global ID for the Driver Configuration Protocol
30 #define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
32 0x107a772b, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \
35 EFI_FORWARD_DECLARATION (EFI_DRIVER_CONFIGURATION_PROTOCOL
);
38 EfiDriverConfigurationActionNone
= 0,
39 EfiDriverConfigurationActionStopController
= 1,
40 EfiDriverConfigurationActionRestartController
= 2,
41 EfiDriverConfigurationActionRestartPlatform
= 3,
42 EfiDriverConfigurationActionMaximum
43 } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED
;
45 #define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
46 #define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
47 #define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
48 #define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
52 (EFIAPI
*EFI_DRIVER_CONFIGURATION_SET_OPTIONS
) (
53 IN EFI_DRIVER_CONFIGURATION_PROTOCOL
* This
,
54 IN EFI_HANDLE ControllerHandle
,
55 IN EFI_HANDLE ChildHandle OPTIONAL
,
57 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED
* ActionRequired
63 Allows the user to set controller specific options for a controller that a
64 driver is currently managing.
67 This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
68 ControllerHandle - The handle of the controller to set options on.
69 ChildHandle - The handle of the child controller to set options on. This
70 is an optional parameter that may be NULL. It will be NULL
71 for device drivers, and for a bus drivers that wish to set
72 options for the bus controller. It will not be NULL for a
73 bus driver that wishes to set options for one of its child
75 Language - A pointer to a three character ISO 639-2 language identifier.
76 This is the language of the user interface that should be
77 presented to the user, and it must match one of the languages
78 specified in SupportedLanguages. The number of languages
79 supported by a driver is up to the driver writer.
80 ActionRequired - A pointer to the action that the calling agent is required
81 to perform when this function returns. See "Related
82 Definitions" for a list of the actions that the calling
83 agent is required to perform prior to accessing
84 ControllerHandle again.
87 EFI_SUCCESS - The driver specified by This successfully set the
88 configuration options for the controller specified
90 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
91 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
92 EFI_INVALID_PARAMETER - ActionRequired is NULL.
93 EFI_UNSUPPORTED - The driver specified by This does not support setting
94 configuration options for the controller specified by
95 ControllerHandle and ChildHandle.
96 EFI_UNSUPPORTED - The driver specified by This does not support the
97 language specified by Language.
98 EFI_DEVICE_ERROR - A device error occurred while attempt to set the
99 configuration options for the controller specified
100 by ControllerHandle and ChildHandle.
101 EFI_OUT_RESOURCES - There are not enough resources available to set the
102 configuration options for the controller specified
103 by ControllerHandle and ChildHandle.
108 (EFIAPI
*EFI_DRIVER_CONFIGURATION_OPTIONS_VALID
) (
109 IN EFI_DRIVER_CONFIGURATION_PROTOCOL
* This
,
110 IN EFI_HANDLE ControllerHandle
,
111 IN EFI_HANDLE ChildHandle OPTIONAL
117 Tests to see if a controller's current configuration options are valid.
120 This - A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
121 ControllerHandle - The handle of the controller to test if it's current
122 configuration options are valid.
123 ChildHandle - The handle of the child controller to test if it's current
124 configuration options are valid. This is an optional
125 parameter that may be NULL. It will be NULL for device
126 drivers. It will also be NULL for a bus drivers that wish
127 to test the configuration options for the bus controller.
128 It will not be NULL for a bus driver that wishes to test
129 configuration options for one of its child controllers.
132 EFI_SUCCESS - The controller specified by ControllerHandle and
133 ChildHandle that is being managed by the driver
134 specified by This has a valid set of configuration
136 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
137 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
138 EFI_UNSUPPORTED - The driver specified by This is not currently
139 managing the controller specified by ControllerHandle
141 EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
142 ChildHandle that is being managed by the driver
143 specified by This has an invalid set of configuration
149 (EFIAPI
*EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS
) (
150 IN EFI_DRIVER_CONFIGURATION_PROTOCOL
* This
,
151 IN EFI_HANDLE ControllerHandle
,
152 IN EFI_HANDLE ChildHandle OPTIONAL
,
153 IN UINT32 DefaultType
,
154 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED
* ActionRequired
160 Forces a driver to set the default configuration options for a controller.
163 This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
164 ControllerHandle - The handle of the controller to force default configuration options on.
165 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.
166 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.
167 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.
170 EFI_SUCCESS - The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
171 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
172 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
173 EFI_INVALID_PARAMETER - ActionRequired is NULL.
174 EFI_UNSUPPORTED - The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
175 EFI_UNSUPPORTED - The driver specified by This does not support the configuration type specified by DefaultType.
176 EFI_DEVICE_ERROR - A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
177 EFI_OUT_RESOURCES - There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
182 // Interface structure for the Driver Configuration Protocol
184 struct _EFI_DRIVER_CONFIGURATION_PROTOCOL
{
185 EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions
;
186 EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid
;
187 EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults
;
188 CHAR8
*SupportedLanguages
;
193 Protocol Description:
194 Used to set configuration options for a controller that an EFI Driver is managing.
197 SetOptions - Allows the use to set drivers specific configuration
198 options for a controller that the driver is currently
200 OptionsValid - Tests to see if a controller's current configuration
202 ForceDefaults - Forces a driver to set the default configuration options
204 SupportedLanguages - A Null-terminated ASCII string that contains one or more
205 ISO 639-2 language codes. This is the list of language
206 codes that this protocol supports.
209 extern EFI_GUID gEfiDriverConfigurationProtocolGuid
;