]> git.proxmox.com Git - mirror_edk2.git/blame - OldMdePkg/Include/Protocol/DriverConfiguration.h
Adding top-level Conf directory for next generation of EDK II build infrastructure...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / DriverConfiguration.h
CommitLineData
878ddf1f 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
13 Module Name: DriverConfiguration.h\r
14\r
15**/\r
16\r
17#ifndef __EFI_DRIVER_CONFIGURATION_H__\r
18#define __EFI_DRIVER_CONFIGURATION_H__\r
19\r
20//\r
21// Global ID for the Driver Configuration Protocol defined in EFI 1.10\r
22//\r
23#define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \\r
24 { \\r
25 0x107a772b, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
26 }\r
27\r
28//\r
29// Global ID for the Driver Configuration Protocol defined in UEFI 2.0\r
30//\r
31#define UEFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \\r
32 { \\r
33 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \\r
34 }\r
35 \r
36typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL EFI_DRIVER_CONFIGURATION_PROTOCOL;\r
37\r
38typedef enum {\r
39 EfiDriverConfigurationActionNone = 0,\r
40 EfiDriverConfigurationActionStopController = 1,\r
41 EfiDriverConfigurationActionRestartController = 2,\r
42 EfiDriverConfigurationActionRestartPlatform = 3,\r
43 EfiDriverConfigurationActionMaximum\r
44} EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;\r
45\r
46#define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000\r
47#define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001\r
48#define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002\r
49#define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003\r
50\r
51/**\r
52 Allows the user to set controller specific options for a controller that a \r
53 driver is currently managing.\r
54\r
55 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.\r
56 @param ControllerHandle The handle of the controller to set options on.\r
57 @param ChildHandle The handle of the child controller to set options on. This\r
58 is an optional parameter that may be NULL. It will be NULL\r
59 for device drivers, and for a bus drivers that wish to set\r
60 options for the bus controller. It will not be NULL for a\r
61 bus driver that wishes to set options for one of its child\r
62 controllers.\r
63 @param Language A pointer to a three character ISO 639-2 language identifier.\r
64 This is the language of the user interface that should be\r
65 presented to the user, and it must match one of the languages\r
66 specified in SupportedLanguages. The number of languages\r
67 supported by a driver is up to the driver writer.\r
68 @param ActionRequired A pointer to the action that the calling agent is required\r
69 to perform when this function returns. See "Related\r
70 Definitions" for a list of the actions that the calling\r
71 agent is required to perform prior to accessing\r
72 ControllerHandle again.\r
73\r
74 @retval EFI_SUCCESS The driver specified by This successfully set the\r
75 configuration options for the controller specified\r
76 by ControllerHandle..\r
77 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
78 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
79 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r
80 @retval EFI_UNSUPPORTED The driver specified by This does not support setting\r
81 configuration options for the controller specified by\r
82 ControllerHandle and ChildHandle.\r
83 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
84 language specified by Language.\r
85 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the\r
86 configuration options for the controller specified\r
87 by ControllerHandle and ChildHandle.\r
88 @retval EFI_OUT_RESOURCES There are not enough resources available to set the\r
89 configuration options for the controller specified\r
90 by ControllerHandle and ChildHandle.\r
91\r
92**/\r
93typedef\r
94EFI_STATUS\r
95(EFIAPI *EFI_DRIVER_CONFIGURATION_SET_OPTIONS) (\r
96 IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,\r
97 IN EFI_HANDLE ControllerHandle,\r
98 IN EFI_HANDLE ChildHandle OPTIONAL,\r
99 IN CHAR8 *Language,\r
100 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r
101 );\r
102\r
103/**\r
104 Tests to see if a controller's current configuration options are valid.\r
105\r
106 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.\r
107 @param ControllerHandle The handle of the controller to test if it's current\r
108 configuration options are valid.\r
109 @param ChildHandle The handle of the child controller to test if it's current\r
110 configuration options are valid. This is an optional\r
111 parameter that may be NULL. It will be NULL for device\r
112 drivers. It will also be NULL for a bus drivers that wish\r
113 to test the configuration options for the bus controller.\r
114 It will not be NULL for a bus driver that wishes to test\r
115 configuration options for one of its child controllers.\r
116\r
117 @retval EFI_SUCCESS The controller specified by ControllerHandle and\r
118 ChildHandle that is being managed by the driver\r
119 specified by This has a valid set of configuration\r
120 options.\r
121 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
122 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
123 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
124 managing the controller specified by ControllerHandle\r
125 and ChildHandle.\r
126 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and\r
127 ChildHandle that is being managed by the driver\r
128 specified by This has an invalid set of configuration\r
129 options.\r
130\r
131**/\r
132typedef\r
133EFI_STATUS\r
134(EFIAPI *EFI_DRIVER_CONFIGURATION_OPTIONS_VALID) (\r
135 IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,\r
136 IN EFI_HANDLE ControllerHandle,\r
137 IN EFI_HANDLE ChildHandle OPTIONAL\r
138 );\r
139\r
140/**\r
141 Forces a driver to set the default configuration options for a controller.\r
142\r
143 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.\r
144 @param ControllerHandle The handle of the controller to force default configuration options on.\r
145 @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
146 @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
147 @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
148\r
149 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.\r
150 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
151 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
152 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r
153 @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
154 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.\r
155 @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
156 @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
157\r
158**/\r
159typedef\r
160EFI_STATUS\r
161(EFIAPI *EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS) (\r
162 IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,\r
163 IN EFI_HANDLE ControllerHandle,\r
164 IN EFI_HANDLE ChildHandle OPTIONAL,\r
165 IN UINT32 DefaultType,\r
166 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r
167 );\r
168\r
169\r
170//\r
171//\r
172struct _EFI_DRIVER_CONFIGURATION_PROTOCOL {\r
173 EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions;\r
174 EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid;\r
175 EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults;\r
176 CHAR8 *SupportedLanguages;\r
177};\r
178\r
179/**\r
180 Interface structure for the Driver Configuration Protocol.\r
181\r
182 @par Protocol Description: \r
183 Used to set configuration options for a controller that an EFI Driver is managing.\r
184\r
185 @param SetOptions Allows the use to set drivers specific configuration \r
186 options for a controller that the driver is currently managing.\r
187 \r
188 @param OptionsValid Tests to see if a controller's current configuration \r
189 options are valid. \r
190 \r
191 @param ForceDefaults Forces a driver to set the default configuration options \r
192 for a controller.\r
193\r
194 @param SupportedLanguages A Null-terminated ASCII string that contains one or more \r
195 ISO 639-2 language codes. This is the list of language \r
196 codes that this protocol supports.\r
197\r
198**/\r
199\r
200extern EFI_GUID gEfiDriverConfigurationProtocolGuid;\r
201extern EFI_GUID gUefiDriverConfigurationProtocolGuid;\r
202\r
203#endif\r