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