]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DriverConfiguration2.h
add a error macro to prevent this file from included for now #error "UEFI 2.1 HII...
[mirror_edk2.git] / MdePkg / Include / Protocol / DriverConfiguration2.h
1 /** @file
2 EFI Driver Configuration Protocol
3
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
9
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.
12
13 **/
14
15 #ifndef __EFI_DRIVER_CONFIGURATION2_H__
16 #define __EFI_DRIVER_CONFIGURATION2_H__
17
18 //
19 // Global ID for the Driver Configuration Protocol defined in UEFI 2.0
20 //
21 #define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
22 { \
23 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \
24 }
25
26 typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL;
27
28 typedef enum {
29 EfiDriverConfigurationActionNone = 0,
30 EfiDriverConfigurationActionStopController = 1,
31 EfiDriverConfigurationActionRestartController = 2,
32 EfiDriverConfigurationActionRestartPlatform = 3,
33 EfiDriverConfigurationActionMaximum
34 } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
35
36 #define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
37 #define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
38 #define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
39 #define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
40
41 /**
42 Allows the user to set controller specific options for a controller that a
43 driver is currently managing.
44
45 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
46 @param ControllerHandle The handle of the controller to set options on.
47 @param ChildHandle The handle of the child controller to set options on. This
48 is an optional parameter that may be NULL. It will be NULL
49 for device drivers, and for a bus drivers that wish to set
50 options for the bus controller. It will not be NULL for a
51 bus driver that wishes to set options for one of its child
52 controllers.
53 @param Language A pointer to a three character ISO 639-2 language identifier.
54 This is the language of the user interface that should be
55 presented to the user, and it must match one of the languages
56 specified in SupportedLanguages. The number of languages
57 supported by a driver is up to the driver writer.
58 @param ActionRequired A pointer to the action that the calling agent is required
59 to perform when this function returns. See "Related
60 Definitions" for a list of the actions that the calling
61 agent is required to perform prior to accessing
62 ControllerHandle again.
63
64 @retval EFI_SUCCESS The driver specified by This successfully set the
65 configuration options for the controller specified
66 by ControllerHandle..
67 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
68 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
69 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
70 @retval EFI_UNSUPPORTED The driver specified by This does not support setting
71 configuration options for the controller specified by
72 ControllerHandle and ChildHandle.
73 @retval EFI_UNSUPPORTED The driver specified by This does not support the
74 language specified by Language.
75 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the
76 configuration options for the controller specified
77 by ControllerHandle and ChildHandle.
78 @retval EFI_OUT_RESOURCES There are not enough resources available to set the
79 configuration options for the controller specified
80 by ControllerHandle and ChildHandle.
81
82 **/
83 typedef
84 EFI_STATUS
85 (EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS) (
86 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
87 IN EFI_HANDLE ControllerHandle,
88 IN EFI_HANDLE ChildHandle OPTIONAL,
89 IN CHAR8 *Language,
90 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
91 );
92
93 /**
94 Tests to see if a controller's current configuration options are valid.
95
96 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
97 @param ControllerHandle The handle of the controller to test if it's current
98 configuration options are valid.
99 @param ChildHandle The handle of the child controller to test if it's current
100 configuration options are valid. This is an optional
101 parameter that may be NULL. It will be NULL for device
102 drivers. It will also be NULL for a bus drivers that wish
103 to test the configuration options for the bus controller.
104 It will not be NULL for a bus driver that wishes to test
105 configuration options for one of its child controllers.
106
107 @retval EFI_SUCCESS The controller specified by ControllerHandle and
108 ChildHandle that is being managed by the driver
109 specified by This has a valid set of configuration
110 options.
111 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
112 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
113 @retval EFI_UNSUPPORTED The driver specified by This is not currently
114 managing the controller specified by ControllerHandle
115 and ChildHandle.
116 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
117 ChildHandle that is being managed by the driver
118 specified by This has an invalid set of configuration
119 options.
120
121 **/
122 typedef
123 EFI_STATUS
124 (EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID) (
125 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
126 IN EFI_HANDLE ControllerHandle,
127 IN EFI_HANDLE ChildHandle OPTIONAL
128 );
129
130 /**
131 Forces a driver to set the default configuration options for a controller.
132
133 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
134 @param ControllerHandle The handle of the controller to force default configuration options on.
135 @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.
136 @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.
137 @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.
138
139 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
140 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
141 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
142 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
143 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
144 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.
145 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
146 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
147
148 **/
149 typedef
150 EFI_STATUS
151 (EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS) (
152 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
153 IN EFI_HANDLE ControllerHandle,
154 IN EFI_HANDLE ChildHandle OPTIONAL,
155 IN UINT32 DefaultType,
156 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
157 );
158
159
160 //
161 //
162 struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {
163 EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions;
164 EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid;
165 EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;
166 CHAR8 *SupportedLanguages;
167 };
168
169 /**
170 Interface structure for the Driver Configuration Protocol.
171
172 @par Protocol Description:
173 Used to set configuration options for a controller that an EFI Driver is managing.
174
175 @param SetOptions Allows the use to set drivers specific configuration
176 options for a controller that the driver is currently managing.
177
178 @param OptionsValid Tests to see if a controller's current configuration
179 options are valid.
180
181 @param ForceDefaults Forces a driver to set the default configuration options
182 for a controller.
183
184 @param SupportedLanguages A Null-terminated ASCII string that contains one or more
185 ISO 639-2 language codes. This is the list of language
186 codes that this protocol supports.
187
188 **/
189
190 extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;
191
192 #endif