]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/DriverConfiguration2.h
Use doxygen comment style for document entity such as struct, enum, variable that...
[mirror_edk2.git] / MdePkg / Include / Protocol / DriverConfiguration2.h
CommitLineData
f22a5f43 1/** @file\r
4ca9b6c4 2 UEFI Driver Configuration2 Protocol\r
f22a5f43 3\r
4ca9b6c4 4 Copyright (c) 2006 - 2008, Intel Corporation \r
f22a5f43 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
99e8ed21 20///\r
21/// Global ID for the Driver Configuration Protocol defined in UEFI 2.0\r
22///\r
f22a5f43 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
4ca9b6c4 47 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
f22a5f43 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
4ca9b6c4
LG
55 @param Language A Null-terminated ASCII string that contains one or more RFC 3066\r
56 language codes. This is the list of language codes that this\r
57 protocol supports. The number of languages\r
f22a5f43 58 supported by a driver is up to the driver writer.\r
59 @param ActionRequired A pointer to the action that the calling agent is required\r
60 to perform when this function returns. See "Related\r
61 Definitions" for a list of the actions that the calling\r
62 agent is required to perform prior to accessing\r
63 ControllerHandle again.\r
64\r
65 @retval EFI_SUCCESS The driver specified by This successfully set the\r
66 configuration options for the controller specified\r
67 by ControllerHandle..\r
68 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
69 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
70 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r
71 @retval EFI_UNSUPPORTED The driver specified by This does not support setting\r
72 configuration options for the controller specified by\r
73 ControllerHandle and ChildHandle.\r
74 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
75 language specified by Language.\r
76 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the\r
77 configuration options for the controller specified\r
78 by ControllerHandle and ChildHandle.\r
79 @retval EFI_OUT_RESOURCES There are not enough resources available to set the\r
80 configuration options for the controller specified\r
81 by ControllerHandle and ChildHandle.\r
82\r
83**/\r
84typedef\r
85EFI_STATUS\r
8b13229b 86(EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS)(\r
f22a5f43 87 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,\r
88 IN EFI_HANDLE ControllerHandle,\r
89 IN EFI_HANDLE ChildHandle OPTIONAL,\r
90 IN CHAR8 *Language,\r
91 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r
92 );\r
93\r
94/**\r
95 Tests to see if a controller's current configuration options are valid.\r
96\r
4ca9b6c4 97 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
f22a5f43 98 @param ControllerHandle The handle of the controller to test if it's current\r
99 configuration options are valid.\r
100 @param ChildHandle The handle of the child controller to test if it's current\r
101 configuration options are valid. This is an optional\r
102 parameter that may be NULL. It will be NULL for device\r
103 drivers. It will also be NULL for a bus drivers that wish\r
104 to test the configuration options for the bus controller.\r
105 It will not be NULL for a bus driver that wishes to test\r
106 configuration options for one of its child controllers.\r
107\r
108 @retval EFI_SUCCESS The controller specified by ControllerHandle and\r
109 ChildHandle that is being managed by the driver\r
110 specified by This has a valid set of configuration\r
111 options.\r
112 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
113 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
114 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
115 managing the controller specified by ControllerHandle\r
116 and ChildHandle.\r
117 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and\r
118 ChildHandle that is being managed by the driver\r
119 specified by This has an invalid set of configuration\r
120 options.\r
121\r
122**/\r
123typedef\r
124EFI_STATUS\r
8b13229b 125(EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID)(\r
f22a5f43 126 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,\r
127 IN EFI_HANDLE ControllerHandle,\r
128 IN EFI_HANDLE ChildHandle OPTIONAL\r
129 );\r
130\r
131/**\r
132 Forces a driver to set the default configuration options for a controller.\r
133\r
4ca9b6c4 134 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
f22a5f43 135 @param ControllerHandle The handle of the controller to force default configuration options on.\r
136 @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
137 @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
138 @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
139\r
140 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.\r
141 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
142 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
143 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r
144 @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
145 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.\r
146 @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
147 @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
148\r
149**/\r
150typedef\r
151EFI_STATUS\r
8b13229b 152(EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS)(\r
e30e5a72 153 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,\r
f22a5f43 154 IN EFI_HANDLE ControllerHandle,\r
155 IN EFI_HANDLE ChildHandle OPTIONAL,\r
156 IN UINT32 DefaultType,\r
157 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r
158 );\r
159\r
f22a5f43 160/**\r
161 Interface structure for the Driver Configuration Protocol.\r
162\r
163 @par Protocol Description: \r
164 Used to set configuration options for a controller that an EFI Driver is managing.\r
165\r
166 @param SetOptions Allows the use to set drivers specific configuration \r
167 options for a controller that the driver is currently managing.\r
168 \r
169 @param OptionsValid Tests to see if a controller's current configuration \r
170 options are valid. \r
171 \r
172 @param ForceDefaults Forces a driver to set the default configuration options \r
173 for a controller.\r
174\r
4ca9b6c4
LG
175 @param SupportedLanguages A Null-terminated ASCII string that\r
176 contains one or more RFC 3066\r
177 language codes. This is the list\r
178 of language codes that this\r
179 protocol supports.\r
f22a5f43 180\r
181**/\r
4ca9b6c4
LG
182struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {\r
183 EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions;\r
184 EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid;\r
185 EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;\r
186 CHAR8 *SupportedLanguages;\r
187};\r
188\r
189\r
f22a5f43 190\r
191extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;\r
192\r
193#endif\r