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