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