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