]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/DriverConfiguration2.h
Remove Smbus related macro, which are defined in MdePkg.
[mirror_edk2.git] / MdePkg / Include / Protocol / DriverConfiguration2.h
CommitLineData
f22a5f43 1/** @file\r
4ca9b6c4 2 UEFI Driver Configuration2 Protocol\r
f22a5f43 3\r
4ca9b6c4 4 Copyright (c) 2006 - 2008, Intel Corporation \r
f22a5f43 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
99e8ed21 18///\r
19/// Global ID for the Driver Configuration Protocol defined in UEFI 2.0\r
20///\r
f22a5f43 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
4ca9b6c4 45 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
f22a5f43 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
4ca9b6c4
LG
53 @param Language A Null-terminated ASCII string that contains one or more RFC 3066\r
54 language codes. This is the list of language codes that this\r
55 protocol supports. The number of languages\r
f22a5f43 56 supported by a driver is up to the driver writer.\r
57 @param ActionRequired A pointer to the action that the calling agent is required\r
58 to perform when this function returns. See "Related\r
59 Definitions" for a list of the actions that the calling\r
60 agent is required to perform prior to accessing\r
61 ControllerHandle again.\r
62\r
63 @retval EFI_SUCCESS The driver specified by This successfully set the\r
64 configuration options for the controller specified\r
65 by ControllerHandle..\r
66 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
67 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
68 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r
69 @retval EFI_UNSUPPORTED The driver specified by This does not support setting\r
70 configuration options for the controller specified by\r
71 ControllerHandle and ChildHandle.\r
72 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
73 language specified by Language.\r
74 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the\r
75 configuration options for the controller specified\r
76 by ControllerHandle and ChildHandle.\r
77 @retval EFI_OUT_RESOURCES There are not enough resources available to set the\r
78 configuration options for the controller specified\r
79 by ControllerHandle and ChildHandle.\r
80\r
81**/\r
82typedef\r
83EFI_STATUS\r
8b13229b 84(EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS)(\r
f22a5f43 85 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,\r
86 IN EFI_HANDLE ControllerHandle,\r
87 IN EFI_HANDLE ChildHandle OPTIONAL,\r
88 IN CHAR8 *Language,\r
89 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r
90 );\r
91\r
92/**\r
93 Tests to see if a controller's current configuration options are valid.\r
94\r
4ca9b6c4 95 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
f22a5f43 96 @param ControllerHandle The handle of the controller to test if it's current\r
97 configuration options are valid.\r
98 @param ChildHandle The handle of the child controller to test if it's current\r
99 configuration options are valid. This is an optional\r
100 parameter that may be NULL. It will be NULL for device\r
101 drivers. It will also be NULL for a bus drivers that wish\r
102 to test the configuration options for the bus controller.\r
103 It will not be NULL for a bus driver that wishes to test\r
104 configuration options for one of its child controllers.\r
105\r
106 @retval EFI_SUCCESS The controller specified by ControllerHandle and\r
107 ChildHandle that is being managed by the driver\r
108 specified by This has a valid set of configuration\r
109 options.\r
110 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
111 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
112 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
113 managing the controller specified by ControllerHandle\r
114 and ChildHandle.\r
115 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and\r
116 ChildHandle that is being managed by the driver\r
117 specified by This has an invalid set of configuration\r
118 options.\r
119\r
120**/\r
121typedef\r
122EFI_STATUS\r
8b13229b 123(EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID)(\r
f22a5f43 124 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,\r
125 IN EFI_HANDLE ControllerHandle,\r
126 IN EFI_HANDLE ChildHandle OPTIONAL\r
127 );\r
128\r
129/**\r
130 Forces a driver to set the default configuration options for a controller.\r
131\r
4ca9b6c4 132 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.\r
f22a5f43 133 @param ControllerHandle The handle of the controller to force default configuration options on.\r
134 @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
135 @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
136 @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
137\r
138 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.\r
139 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
140 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
141 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r
142 @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
143 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.\r
144 @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
145 @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
146\r
147**/\r
148typedef\r
149EFI_STATUS\r
8b13229b 150(EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS)(\r
e30e5a72 151 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,\r
f22a5f43 152 IN EFI_HANDLE ControllerHandle,\r
153 IN EFI_HANDLE ChildHandle OPTIONAL,\r
154 IN UINT32 DefaultType,\r
155 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r
156 );\r
157\r
f22a5f43 158/**\r
159 Interface structure for the Driver Configuration Protocol.\r
160\r
161 @par Protocol Description: \r
162 Used to set configuration options for a controller that an EFI Driver is managing.\r
f22a5f43 163**/\r
4ca9b6c4
LG
164struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {\r
165 EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions;\r
166 EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid;\r
167 EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;\r
3354353d 168 ///\r
169 /// A Null-terminated ASCII string that contains one or more RFC 3066\r
170 /// language codes. This is the list of language codes that this protocol supports. \r
171 ///\r
4ca9b6c4
LG
172 CHAR8 *SupportedLanguages;\r
173};\r
174\r
f22a5f43 175extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;\r
176\r
177#endif\r