]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DriverConfiguration2.h
Update comments for Protocol definitions to match UEFI spec.
[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 ///
19 /// Global ID for the Driver Configuration Protocol defined in UEFI 2.0
20 ///
21 #define EFI_DRIVER_CONFIGURATION2_PROTOCOL_GUID \
22 { \
23 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \
24 }
25
26 typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL;
27
28 typedef enum {
29 EfiDriverConfigurationActionNone = 0,
30 EfiDriverConfigurationActionStopController = 1,
31 EfiDriverConfigurationActionRestartController = 2,
32 EfiDriverConfigurationActionRestartPlatform = 3,
33 EfiDriverConfigurationActionMaximum
34 } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
35
36 #define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
37 #define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
38 #define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
39 #define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
40
41 /**
42 Allows the user to set controller specific options for a controller that a
43 driver is currently managing.
44
45 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
46 @param ControllerHandle The handle of the controller to set options on.
47 @param ChildHandle The handle of the child controller to set options on. This
48 is an optional parameter that may be NULL. It will be NULL
49 for device drivers, and for a bus drivers that wish to set
50 options for the bus controller. It will not be NULL for a
51 bus driver that wishes to set options for one of its child
52 controllers.
53 @param Language A Null-terminated ASCII string that contains one or more RFC 3066
54 language codes. This is the list of language codes that this
55 protocol supports. The number of languages
56 supported by a driver is up to the driver writer.
57 @param ActionRequired A pointer to the action that the calling agent is required
58 to perform when this function returns. See "Related
59 Definitions" for a list of the actions that the calling
60 agent is required to perform prior to accessing
61 ControllerHandle again.
62
63 @retval EFI_SUCCESS The driver specified by This successfully set the
64 configuration options for the controller specified
65 by ControllerHandle..
66 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
67 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
68 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
69 @retval EFI_UNSUPPORTED The driver specified by This does not support setting
70 configuration options for the controller specified by
71 ControllerHandle and ChildHandle.
72 @retval EFI_UNSUPPORTED The driver specified by This does not support the
73 language specified by Language.
74 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the
75 configuration options for the controller specified
76 by ControllerHandle and ChildHandle.
77 @retval EFI_OUT_RESOURCES There are not enough resources available to set the
78 configuration options for the controller specified
79 by ControllerHandle and ChildHandle.
80
81 **/
82 typedef
83 EFI_STATUS
84 (EFIAPI *EFI_DRIVER_CONFIGURATION2_SET_OPTIONS)(
85 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
86 IN EFI_HANDLE ControllerHandle,
87 IN EFI_HANDLE ChildHandle OPTIONAL,
88 IN CHAR8 *Language,
89 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
90 );
91
92 /**
93 Tests to see if a controller's current configuration options are valid.
94
95 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
96 @param ControllerHandle The handle of the controller to test if it's current
97 configuration options are valid.
98 @param ChildHandle The handle of the child controller to test if it's current
99 configuration options are valid. This is an optional
100 parameter that may be NULL. It will be NULL for device
101 drivers. It will also be NULL for a bus drivers that wish
102 to test the configuration options for the bus controller.
103 It will not be NULL for a bus driver that wishes to test
104 configuration options for one of its child controllers.
105
106 @retval EFI_SUCCESS The controller specified by ControllerHandle and
107 ChildHandle that is being managed by the driver
108 specified by This has a valid set of configuration
109 options.
110 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
111 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
112 @retval EFI_UNSUPPORTED The driver specified by This is not currently
113 managing the controller specified by ControllerHandle
114 and ChildHandle.
115 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
116 ChildHandle that is being managed by the driver
117 specified by This has an invalid set of configuration
118 options.
119
120 **/
121 typedef
122 EFI_STATUS
123 (EFIAPI *EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID)(
124 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
125 IN EFI_HANDLE ControllerHandle,
126 IN EFI_HANDLE ChildHandle OPTIONAL
127 );
128
129 /**
130 Forces a driver to set the default configuration options for a controller.
131
132 @param This A pointer to the EFI_DRIVER_CONFIGURATION2_PROTOCOL instance.
133 @param ControllerHandle The handle of the controller to force default configuration options on.
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.
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.
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.
137
138 @retval EFI_SUCCESS The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
139 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
140 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
141 @retval EFI_INVALID_PARAMETER ActionRequired is NULL.
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.
143 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type specified by DefaultType.
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.
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.
146
147 **/
148 typedef
149 EFI_STATUS
150 (EFIAPI *EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS)(
151 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL *This,
152 IN EFI_HANDLE ControllerHandle,
153 IN EFI_HANDLE ChildHandle OPTIONAL,
154 IN UINT32 DefaultType,
155 OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
156 );
157
158 ///
159 /// Used to set configuration options for a controller that an EFI Driver is managing.
160 ///
161 struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL {
162 EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions;
163 EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid;
164 EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults;
165 ///
166 /// A Null-terminated ASCII string that contains one or more RFC 3066
167 /// language codes. This is the list of language codes that this protocol supports.
168 ///
169 CHAR8 *SupportedLanguages;
170 };
171
172 extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid;
173
174 #endif