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