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