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