]>
Commit | Line | Data |
---|---|---|
fb0b259e | 1 | /** @file\r |
2 | Header file for Console Platfrom DXE Driver.\r | |
95276127 | 3 | \r |
fb0b259e | 4 | Copyright (c) 2006 - 2007, Intel Corporation. <BR>\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 | |
95276127 | 9 | \r |
fb0b259e | 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 | |
95276127 | 12 | \r |
fb0b259e | 13 | **/\r |
95276127 | 14 | \r |
15 | #ifndef CON_MANAGE_H_\r | |
16 | #define CON_MANAGE_H_\r | |
17 | \r | |
859b72fa A |
18 | #include <Uefi.h>\r |
19 | #include <Protocol/SimpleTextOut.h>\r | |
20 | #include <Guid/GlobalVariable.h>\r | |
21 | #include <Guid/ConsoleInDevice.h>\r | |
fb0b259e | 22 | #include <Guid/StandardErrorDevice.h>\r |
23 | #include <Guid/ConsoleOutDevice.h>\r | |
859b72fa A |
24 | #include <Protocol/DevicePath.h>\r |
25 | #include <Protocol/SimpleTextIn.h>\r | |
26 | #include <Guid/HotPlugDevice.h>\r | |
fb0b259e | 27 | \r |
859b72fa A |
28 | #include <Library/DebugLib.h>\r |
29 | #include <Library/UefiDriverEntryPoint.h>\r | |
30 | #include <Library/UefiLib.h>\r | |
31 | #include <Library/BaseMemoryLib.h>\r | |
32 | #include <Library/UefiBootServicesTableLib.h>\r | |
33 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
34 | #include <Library/DevicePathLib.h>\r | |
35 | #include <Library/MemoryAllocationLib.h>\r | |
36 | \r | |
95276127 | 37 | //\r |
859b72fa | 38 | // Driver Binding Externs\r |
95276127 | 39 | //\r |
5bca971e | 40 | extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;\r |
41 | extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r | |
42 | extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;\r | |
43 | extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;\r | |
44 | extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r | |
45 | extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;\r | |
95276127 | 46 | \r |
95276127 | 47 | \r |
48 | typedef enum {\r | |
49 | CHECK,\r | |
50 | APPEND,\r | |
51 | DELETE\r | |
52 | } CONPLATFORM_VAR_OPERATION;\r | |
53 | \r | |
54 | EFI_STATUS\r | |
55 | ConPlatformDriverBindingSupported (\r | |
56 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
57 | IN EFI_HANDLE ControllerHandle,\r | |
58 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath,\r | |
59 | IN EFI_GUID *ProtocolGuid\r | |
60 | );\r | |
61 | \r | |
62 | EFI_STATUS\r | |
63 | EFIAPI\r | |
64 | ConPlatformTextInDriverBindingSupported (\r | |
65 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
66 | IN EFI_HANDLE Handle,\r | |
67 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
68 | );\r | |
69 | \r | |
70 | EFI_STATUS\r | |
71 | EFIAPI\r | |
72 | ConPlatformTextOutDriverBindingSupported (\r | |
73 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
74 | IN EFI_HANDLE Handle,\r | |
75 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
76 | );\r | |
77 | \r | |
78 | EFI_STATUS\r | |
79 | EFIAPI\r | |
80 | ConPlatformTextInDriverBindingStart (\r | |
81 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
82 | IN EFI_HANDLE Handle,\r | |
83 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
84 | );\r | |
85 | \r | |
86 | EFI_STATUS\r | |
87 | EFIAPI\r | |
88 | ConPlatformTextOutDriverBindingStart (\r | |
89 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
90 | IN EFI_HANDLE Handle,\r | |
91 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
92 | );\r | |
93 | \r | |
94 | EFI_STATUS\r | |
95 | EFIAPI\r | |
96 | ConPlatformTextInDriverBindingStop (\r | |
97 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
98 | IN EFI_HANDLE Handle,\r | |
99 | IN UINTN NumberOfChildren,\r | |
100 | IN EFI_HANDLE *ChildHandleBuffer\r | |
101 | );\r | |
102 | \r | |
103 | EFI_STATUS\r | |
104 | EFIAPI\r | |
105 | ConPlatformTextOutDriverBindingStop (\r | |
106 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
107 | IN EFI_HANDLE Handle,\r | |
108 | IN UINTN NumberOfChildren,\r | |
109 | IN EFI_HANDLE *ChildHandleBuffer\r | |
110 | );\r | |
111 | \r | |
112 | VOID\r | |
113 | ConPlatformUnInstallProtocol (\r | |
114 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
115 | IN EFI_HANDLE Handle,\r | |
116 | IN EFI_GUID *ProtocolGuid\r | |
117 | );\r | |
118 | \r | |
119 | VOID *\r | |
120 | ConPlatformGetVariable (\r | |
121 | IN CHAR16 *Name\r | |
122 | );\r | |
123 | \r | |
124 | EFI_STATUS\r | |
125 | ConPlatformMatchDevicePaths (\r | |
126 | IN EFI_DEVICE_PATH_PROTOCOL * Multi,\r | |
127 | IN EFI_DEVICE_PATH_PROTOCOL * Single,\r | |
128 | IN EFI_DEVICE_PATH_PROTOCOL **NewDevicePath OPTIONAL,\r | |
129 | IN BOOLEAN Delete\r | |
130 | );\r | |
131 | \r | |
132 | EFI_STATUS\r | |
133 | ConPlatformUpdateDeviceVariable (\r | |
134 | IN CHAR16 *VariableName,\r | |
135 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r | |
136 | IN CONPLATFORM_VAR_OPERATION Operation\r | |
137 | );\r | |
138 | \r | |
139 | BOOLEAN\r | |
140 | IsHotPlugDevice (\r | |
141 | EFI_HANDLE DriverBindingHandle,\r | |
142 | EFI_HANDLE ControllerHandle\r | |
143 | );\r | |
144 | \r | |
859b72fa A |
145 | //\r |
146 | // EFI Component Name Functions\r | |
147 | //\r | |
5bca971e | 148 | /**\r |
149 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
150 | \r | |
151 | This function retrieves the user readable name of a driver in the form of a\r | |
152 | Unicode string. If the driver specified by This has a user readable name in\r | |
153 | the language specified by Language, then a pointer to the driver name is\r | |
154 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
155 | by This does not support the language specified by Language,\r | |
156 | then EFI_UNSUPPORTED is returned.\r | |
157 | \r | |
158 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
159 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
160 | \r | |
161 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
162 | array indicating the language. This is the\r | |
163 | language of the driver name that the caller is\r | |
164 | requesting, and it must match one of the\r | |
165 | languages specified in SupportedLanguages. The\r | |
166 | number of languages supported by a driver is up\r | |
167 | to the driver writer. Language is specified\r | |
168 | in RFC 3066 or ISO 639-2 language code format.\r | |
169 | \r | |
170 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
171 | This Unicode string is the name of the\r | |
172 | driver specified by This in the language\r | |
173 | specified by Language.\r | |
174 | \r | |
175 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
176 | This and the language specified by Language was\r | |
177 | returned in DriverName.\r | |
178 | \r | |
179 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
180 | \r | |
181 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
182 | \r | |
183 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
184 | the language specified by Language.\r | |
185 | \r | |
186 | **/\r | |
859b72fa A |
187 | EFI_STATUS\r |
188 | EFIAPI\r | |
189 | ConPlatformComponentNameGetDriverName (\r | |
190 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
191 | IN CHAR8 *Language,\r | |
192 | OUT CHAR16 **DriverName\r | |
193 | );\r | |
194 | \r | |
5bca971e | 195 | \r |
196 | /**\r | |
197 | Retrieves a Unicode string that is the user readable name of the controller\r | |
198 | that is being managed by a driver.\r | |
199 | \r | |
200 | This function retrieves the user readable name of the controller specified by\r | |
201 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
202 | driver specified by This has a user readable name in the language specified by\r | |
203 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
204 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
205 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
206 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
207 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
208 | \r | |
209 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
210 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
211 | \r | |
212 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
213 | specified by This is managing. This handle\r | |
214 | specifies the controller whose name is to be\r | |
215 | returned.\r | |
216 | \r | |
217 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
218 | the name of. This is an optional parameter that\r | |
219 | may be NULL. It will be NULL for device\r | |
220 | drivers. It will also be NULL for a bus drivers\r | |
221 | that wish to retrieve the name of the bus\r | |
222 | controller. It will not be NULL for a bus\r | |
223 | driver that wishes to retrieve the name of a\r | |
224 | child controller.\r | |
225 | \r | |
226 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
227 | array indicating the language. This is the\r | |
228 | language of the driver name that the caller is\r | |
229 | requesting, and it must match one of the\r | |
230 | languages specified in SupportedLanguages. The\r | |
231 | number of languages supported by a driver is up\r | |
232 | to the driver writer. Language is specified in\r | |
233 | RFC 3066 or ISO 639-2 language code format.\r | |
234 | \r | |
235 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
236 | This Unicode string is the name of the\r | |
237 | controller specified by ControllerHandle and\r | |
238 | ChildHandle in the language specified by\r | |
239 | Language from the point of view of the driver\r | |
240 | specified by This.\r | |
241 | \r | |
242 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
243 | the language specified by Language for the\r | |
244 | driver specified by This was returned in\r | |
245 | DriverName.\r | |
246 | \r | |
247 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
248 | \r | |
249 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
250 | EFI_HANDLE.\r | |
251 | \r | |
252 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
253 | \r | |
254 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
255 | \r | |
256 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
257 | managing the controller specified by\r | |
258 | ControllerHandle and ChildHandle.\r | |
259 | \r | |
260 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
261 | the language specified by Language.\r | |
262 | \r | |
263 | **/\r | |
859b72fa A |
264 | EFI_STATUS\r |
265 | EFIAPI\r | |
266 | ConPlatformComponentNameGetControllerName (\r | |
267 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
268 | IN EFI_HANDLE ControllerHandle,\r | |
269 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
270 | IN CHAR8 *Language,\r | |
271 | OUT CHAR16 **ControllerName\r | |
272 | );\r | |
273 | \r | |
5bca971e | 274 | \r |
95276127 | 275 | #endif\r |