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