]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DriverConfiguration2.h
Use doxygen comment style for document entity such as struct, enum, variable that...
[mirror_edk2.git] / MdePkg / Include / Protocol / DriverConfiguration2.h
1 /** @file
2 UEFI Driver Configuration2 Protocol
3
4 Copyright (c) 2006 - 2008, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __EFI_DRIVER_CONFIGURATION2_H__
16 #define __EFI_DRIVER_CONFIGURATION2_H__
17
18 #include <PiDxe.h>
19
20 ///
21 /// Global ID for the Driver Configuration Protocol defined in UEFI 2.0
22 ///
23 #define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
24 { \
25 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \
26 }
27
28 typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL;
29
30 typedef enum {
31 EfiDriverConfigurationActionNone = 0,
32 EfiDriverConfigurationActionStopController = 1,
33 EfiDriverConfigurationActionRestartController = 2,
34 EfiDriverConfigurationActionRestartPlatform = 3,
35 EfiDriverConfigurationActionMaximum
36 } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
37
38 #define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
39 #define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
40 #define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
41 #define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
42
43 /**
44 Allows the user to set controller specific options for a controller that a
45 driver is currently managing.
46
47 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
48 @param ControllerHandle The handle of the controller to set options on.
49 @param ChildHandle The handle of the child controller to set options on. This
50 is an optional parameter that may be NULL. It will be NULL
51 for device drivers, and for a bus drivers that wish to set
52 options for the bus controller. It will not be NULL for a
53 bus driver that wishes to set options for one of its child
54 controllers.
55 @param Language A Null-terminated ASCII string that contains one or more RFC 3066
56 language codes. This is the list of language codes that this
57 protocol supports. The number of languages
58 supported by a driver is up to the driver writer.
59 @param ActionRequired A pointer to the action that the calling agent is required
60 to perform when this function returns. See "Related
61 Definitions" for a list of the actions that the calling
62 agent is required to perform prior to accessing
63 ControllerHandle again.
64
65 @retval EFI_SUCCESS The driver specified by This successfully set the
66 configuration options for the controller specified
67 by ControllerHandle..
68 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
69 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
70 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
71 @retval EFI_UNSUPPORTED The driver specified by This does not support setting
72 configuration options for the controller specified by
73 ControllerHandle and ChildHandle.
74 @retval EFI_UNSUPPORTED The driver specified by This does not support the
75 language specified by Language.
76 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the
77 configuration options for the controller specified
78 by ControllerHandle and ChildHandle.
79 @retval EFI_OUT_RESOURCES There are not enough resources available to set the
80 configuration options for the controller specified
81 by ControllerHandle and ChildHandle.
82
83 **/
84 typedef
85 EFI_STATUS
86 (EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS)(
87 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
88 IN EFI_HANDLE ControllerHandle,
89 IN EFI_HANDLE ChildHandle OPTIONAL,
90 IN CHAR8 *Language,
91 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
92 );
93
94 /**
95 Tests to see if a controller's current configuration options are valid.
96
97 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
98 @param ControllerHandle The handle of the controller to test if it's current
99 configuration options are valid.
100 @param ChildHandle The handle of the child controller to test if it's current
101 configuration options are valid. This is an optional
102 parameter that may be NULL. It will be NULL for device
103 drivers. It will also be NULL for a bus drivers that wish
104 to test the configuration options for the bus controller.
105 It will not be NULL for a bus driver that wishes to test
106 configuration options for one of its child controllers.
107
108 @retval EFI_SUCCESS The controller specified by ControllerHandle and
109 ChildHandle that is being managed by the driver
110 specified by This has a valid set of configuration
111 options.
112 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
113 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
114 @retval EFI_UNSUPPORTED The driver specified by This is not currently
115 managing the controller specified by ControllerHandle
116 and ChildHandle.
117 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
118 ChildHandle that is being managed by the driver
119 specified by This has an invalid set of configuration
120 options.
121
122 **/
123 typedef
124 EFI_STATUS
125 (EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID)(
126 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
127 IN EFI_HANDLE ControllerHandle,
128 IN EFI_HANDLE ChildHandle OPTIONAL
129 );
130
131 /**
132 Forces a driver to set the default configuration options for a controller.
133
134 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
135 @param ControllerHandle The handle of the controller to force default configuration options on.
136 @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.
137 @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.
138 @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.
139
140 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
141 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
142 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
143 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
144 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
145 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.
146 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
147 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
148
149 **/
150 typedef
151 EFI_STATUS
152 (EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS)(
153 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
154 IN EFI_HANDLE ControllerHandle,
155 IN EFI_HANDLE ChildHandle OPTIONAL,
156 IN UINT32 DefaultType,
157 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
158 );
159
160 /**
161 Interface structure for the Driver Configuration Protocol.
162
163 @par Protocol Description:
164 Used to set configuration options for a controller that an EFI Driver is managing.
165
166 @param SetOptions Allows the use to set drivers specific configuration
167 options for a controller that the driver is currently managing.
168
169 @param OptionsValid Tests to see if a controller's current configuration
170 options are valid.
171
172 @param ForceDefaults Forces a driver to set the default configuration options
173 for a controller.
174
175 @param SupportedLanguages A Null-terminated ASCII string that
176 contains one or more RFC 3066
177 language codes. This is the list
178 of language codes that this
179 protocol supports.
180
181 **/
182 struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {
183 EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions;
184 EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid;
185 EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;
186 CHAR8 *SupportedLanguages;
187 };
188
189
190
191 extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;
192
193 #endif