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