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