]>
Commit | Line | Data |
---|---|---|
5c08e117 | 1 | /** @file\r |
2 | The platform device manager reference implement\r | |
3 | \r | |
180a5a35 HT |
4 | Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r |
5 | This program and the accompanying materials\r | |
5c08e117 | 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 _DEVICE_MANAGER_H_\r | |
16 | #define _DEVICE_MANAGER_H_\r | |
17 | \r | |
18 | #include "Bds.h"\r | |
19 | #include "FrontPage.h"\r | |
20 | \r | |
21 | //\r | |
22 | // These are defined as the same with vfr file\r | |
23 | //\r | |
24 | #define DEVICE_MANAGER_FORMSET_GUID \\r | |
25 | { \\r | |
26 | 0x3ebfa8e6, 0x511d, 0x4b5b, {0xa9, 0x5f, 0xfb, 0x38, 0x26, 0xf, 0x1c, 0x27} \\r | |
27 | }\r | |
28 | \r | |
ab4da126 | 29 | #define DRIVER_HEALTH_FORMSET_GUID \\r |
30 | { \\r | |
31 | 0xf76e0a70, 0xb5ed, 0x4c38, {0xac, 0x9a, 0xe5, 0xf5, 0x4b, 0xf1, 0x6e, 0x34} \\r | |
32 | }\r | |
33 | \r | |
75bf9d0e LG |
34 | #define LABEL_DEVICES_LIST 0x0080\r |
35 | #define LABEL_END 0xffff\r | |
36 | \r | |
ab4da126 | 37 | #define LABEL_DRIVER_HEALTH 0x2000\r |
38 | #define LABEL_DRIVER_HEALTH_END 0x2001\r | |
39 | \r | |
40 | #define LABEL_DRIVER_HEALTH_REAPIR_ALL 0x3000\r | |
41 | #define LABEL_DRIVER_HEALTH_REAPIR_ALL_END 0x3001\r | |
42 | \r | |
5c08e117 | 43 | #define LABEL_VBIOS 0x0040\r |
44 | \r | |
45 | #define DEVICE_MANAGER_FORM_ID 0x1000\r | |
ab4da126 | 46 | #define DRIVER_HEALTH_FORM_ID 0x1001\r |
5c08e117 | 47 | \r |
48 | #define DEVICE_KEY_OFFSET 0x1000\r | |
49 | #define DEVICE_MANAGER_KEY_VBIOS 0x2000\r | |
50 | \r | |
ab4da126 | 51 | #define DEVICE_MANAGER_KEY_DRIVER_HEALTH 0x1111\r |
52 | #define DRIVER_HEALTH_KEY_OFFSET 0x2000\r | |
53 | #define DRIVER_HEALTH_REPAIR_ALL_KEY 0x3000\r | |
54 | #define DRIVER_HEALTH_RETURN_KEY 0x4000\r | |
55 | \r | |
5c08e117 | 56 | //\r |
57 | // These are the VFR compiler generated data representing our VFR data.\r | |
58 | //\r | |
59 | extern UINT8 DeviceManagerVfrBin[];\r | |
ab4da126 | 60 | extern UINT8 DriverHealthVfrBin[];\r |
5c08e117 | 61 | \r |
62 | #define DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('D', 'M', 'C', 'B')\r | |
ab4da126 | 63 | #define DEVICE_MANAGER_DRIVER_HEALTH_INFO_SIGNATURE SIGNATURE_32 ('D', 'M', 'D', 'H')\r |
64 | \r | |
5c08e117 | 65 | \r |
66 | typedef struct {\r | |
67 | UINTN Signature;\r | |
68 | \r | |
69 | ///\r | |
ab4da126 | 70 | /// Device Manager HII relative handles\r |
5c08e117 | 71 | ///\r |
72 | EFI_HII_HANDLE HiiHandle;\r | |
ab4da126 | 73 | \r |
74 | ///\r | |
75 | /// Driver Health HII relative handles\r | |
76 | ///\r | |
77 | EFI_HII_HANDLE DriverHealthHiiHandle;\r | |
78 | \r | |
5c08e117 | 79 | EFI_HANDLE DriverHandle;\r |
ab4da126 | 80 | EFI_HANDLE DriverHealthHandle;\r |
5c08e117 | 81 | \r |
82 | ///\r | |
ab4da126 | 83 | /// Device Manager Produced protocols\r |
5c08e117 | 84 | ///\r |
85 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
86 | \r | |
ab4da126 | 87 | ///\r |
88 | /// Driver Health Produced protocols\r | |
89 | ///\r | |
90 | EFI_HII_CONFIG_ACCESS_PROTOCOL DriverHealthConfigAccess;\r | |
91 | \r | |
5c08e117 | 92 | ///\r |
93 | /// Configuration data\r | |
94 | ///\r | |
95 | UINT8 VideoBios;\r | |
96 | } DEVICE_MANAGER_CALLBACK_DATA;\r | |
97 | \r | |
ab4da126 | 98 | \r |
99 | typedef struct {\r | |
100 | UINTN Signature;\r | |
101 | LIST_ENTRY Link;\r | |
102 | \r | |
103 | ///\r | |
104 | /// HII relative handles\r | |
105 | ///\r | |
106 | EFI_HII_HANDLE HiiHandle;\r | |
107 | \r | |
108 | ///\r | |
109 | /// Driver relative handles\r | |
110 | ///\r | |
111 | EFI_HANDLE DriverHandle;\r | |
112 | EFI_HANDLE ControllerHandle;\r | |
113 | EFI_HANDLE ChildHandle;\r | |
114 | \r | |
115 | EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth;\r | |
116 | ///\r | |
117 | /// Driver health messages of the specify Driver \r | |
118 | ///\r | |
119 | EFI_DRIVER_HEALTH_HII_MESSAGE *MessageList;\r | |
120 | \r | |
121 | ///\r | |
122 | /// Driver Health status\r | |
123 | ///\r | |
124 | EFI_DRIVER_HEALTH_STATUS HealthStatus;\r | |
125 | } DRIVER_HEALTH_INFO;\r | |
126 | \r | |
127 | #define DEVICE_MANAGER_HEALTH_INFO_FROM_LINK(a) \\r | |
128 | CR (a, \\r | |
129 | DRIVER_HEALTH_INFO, \\r | |
130 | Link, \\r | |
131 | DEVICE_MANAGER_DRIVER_HEALTH_INFO_SIGNATURE \\r | |
132 | )\r | |
133 | \r | |
5c08e117 | 134 | #define DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS(a) \\r |
135 | CR (a, \\r | |
136 | DEVICE_MANAGER_CALLBACK_DATA, \\r | |
137 | ConfigAccess, \\r | |
138 | DEVICE_MANAGER_CALLBACK_DATA_SIGNATURE \\r | |
139 | )\r | |
140 | typedef struct {\r | |
141 | EFI_STRING_ID StringId;\r | |
142 | UINT16 Class;\r | |
143 | } DEVICE_MANAGER_MENU_ITEM;\r | |
144 | \r | |
145 | /**\r | |
ab4da126 | 146 | This function is invoked if user selected a interactive opcode from Device Manager's\r |
5c08e117 | 147 | Formset. The decision by user is saved to gCallbackKey for later processing. If\r |
148 | user set VBIOS, the new value is saved to EFI variable.\r | |
149 | \r | |
150 | \r | |
151 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
152 | @param Action Specifies the type of action taken by the browser.\r | |
153 | @param QuestionId A unique value which is sent to the original exporting driver\r | |
154 | so that it can identify the type of data to expect.\r | |
155 | @param Type The type of value for the question.\r | |
156 | @param Value A pointer to the data being sent to the original exporting driver.\r | |
157 | @param ActionRequest On return, points to the action requested by the callback function.\r | |
158 | \r | |
159 | @retval EFI_SUCCESS The callback successfully handled the action.\r | |
160 | @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r | |
161 | \r | |
162 | **/\r | |
163 | EFI_STATUS\r | |
164 | EFIAPI\r | |
165 | DeviceManagerCallback (\r | |
166 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
167 | IN EFI_BROWSER_ACTION Action,\r | |
168 | IN EFI_QUESTION_ID QuestionId,\r | |
169 | IN UINT8 Type,\r | |
170 | IN EFI_IFR_TYPE_VALUE *Value,\r | |
171 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r | |
172 | );\r | |
173 | \r | |
ab4da126 | 174 | /**\r |
175 | This function is invoked if user selected a interactive opcode from Driver Health's\r | |
176 | Formset. The decision by user is saved to gCallbackKey for later processing.\r | |
177 | \r | |
178 | \r | |
179 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
180 | @param Action Specifies the type of action taken by the browser.\r | |
181 | @param QuestionId A unique value which is sent to the original exporting driver\r | |
182 | so that it can identify the type of data to expect.\r | |
183 | @param Type The type of value for the question.\r | |
184 | @param Value A pointer to the data being sent to the original exporting driver.\r | |
185 | @param ActionRequest On return, points to the action requested by the callback function.\r | |
186 | \r | |
187 | @retval EFI_SUCCESS The callback successfully handled the action.\r | |
188 | @retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r | |
189 | \r | |
190 | **/\r | |
191 | EFI_STATUS\r | |
192 | EFIAPI\r | |
193 | DriverHealthCallback (\r | |
194 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
195 | IN EFI_BROWSER_ACTION Action,\r | |
196 | IN EFI_QUESTION_ID QuestionId,\r | |
197 | IN UINT8 Type,\r | |
198 | IN EFI_IFR_TYPE_VALUE *Value,\r | |
199 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r | |
200 | );\r | |
201 | \r | |
202 | \r | |
5c08e117 | 203 | /**\r |
204 | \r | |
205 | This function registers HII packages to HII database.\r | |
206 | \r | |
cb7d01c0 | 207 | @retval EFI_SUCCESS HII packages for the Device Manager were registered successfully.\r |
208 | @retval EFI_OUT_OF_RESOURCES HII packages for the Device Manager failed to be registered.\r | |
5c08e117 | 209 | \r |
210 | **/\r | |
211 | EFI_STATUS\r | |
212 | InitializeDeviceManager (\r | |
213 | VOID\r | |
214 | );\r | |
215 | \r | |
216 | /**\r | |
217 | \r | |
218 | Call the browser and display the device manager to allow user\r | |
219 | to configure the platform.\r | |
220 | \r | |
221 | This function create the dynamic content for device manager. It includes\r | |
222 | section header for all class of devices, one-of opcode to set VBIOS.\r | |
223 | \r | |
224 | @retval EFI_SUCCESS Operation is successful.\r | |
225 | @retval Other values if failed to clean up the dynamic content from HII\r | |
226 | database.\r | |
227 | \r | |
228 | **/\r | |
229 | EFI_STATUS\r | |
230 | CallDeviceManager (\r | |
231 | VOID\r | |
232 | );\r | |
233 | \r | |
ab4da126 | 234 | \r |
8e8ae2da | 235 | /**\r |
ab4da126 | 236 | Check the Driver Health status of a single controller and try to process it if not healthy.\r |
237 | \r | |
238 | This function called by CheckAllControllersHealthStatus () function in order to process a specify\r | |
239 | contoller's health state.\r | |
240 | \r | |
8e8ae2da | 241 | @param DriverHealthList A Pointer to the list contain all of the platform driver health information. \r |
242 | @param DriverHandle The handle of driver.\r | |
ab4da126 | 243 | @param ControllerHandle The class guid specifies which form set will be displayed.\r |
244 | @param ChildHandle The handle of the child controller to retrieve the health \r | |
8e8ae2da | 245 | status on. This is an optional parameter that may be NULL. \r |
246 | @param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r | |
ab4da126 | 247 | @param HealthStatus The health status of the controller.\r |
ab4da126 | 248 | \r |
249 | @retval EFI_INVALID_PARAMETER HealthStatus or DriverHealth is NULL.\r | |
250 | @retval HealthStatus The Health status of specify controller.\r | |
251 | @retval EFI_OUT_OF_RESOURCES The list of Driver Health Protocol handles can not be retrieved.\r | |
252 | @retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol.\r | |
253 | @retval EFI_SUCCESS The Health related operation has been taken successfully.\r | |
254 | \r | |
8e8ae2da | 255 | **/\r |
ab4da126 | 256 | EFI_STATUS\r |
257 | EFIAPI\r | |
258 | GetSingleControllerHealthStatus (\r | |
259 | IN OUT LIST_ENTRY *DriverHealthList,\r | |
260 | IN EFI_HANDLE DriverHandle,\r | |
261 | IN EFI_HANDLE ControllerHandle, OPTIONAL\r | |
262 | IN EFI_HANDLE ChildHandle, OPTIONAL\r | |
263 | IN EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth,\r | |
264 | IN EFI_DRIVER_HEALTH_STATUS *HealthStatus\r | |
265 | );\r | |
266 | \r | |
267 | /**\r | |
268 | Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database, \r | |
269 | and queries each EFI Driver Health Protocol to determine if one or more of the controllers \r | |
270 | managed by each EFI Driver Health Protocol instance are not healthy. \r | |
271 | \r | |
272 | @param DriverHealthList A Pointer to the list contain all of the platform driver health\r | |
273 | information.\r | |
274 | \r | |
275 | @retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol.\r | |
276 | @retval EFI_SUCCESS All the controllers in the platform are healthy.\r | |
277 | @retval EFI_OUT_OF_RESOURCES The list of Driver Health Protocol handles can not be retrieved.\r | |
278 | \r | |
279 | **/\r | |
280 | EFI_STATUS\r | |
281 | GetAllControllersHealthStatus (\r | |
282 | IN OUT LIST_ENTRY *DriverHealthList\r | |
283 | );\r | |
284 | \r | |
8e8ae2da | 285 | /**\r |
ab4da126 | 286 | Check the healthy status of the platform, this function will return immediately while found one driver \r |
287 | in the platform are not healthy.\r | |
288 | \r | |
289 | @retval FALSE at least one driver in the platform are not healthy.\r | |
290 | @retval TRUE No controller install Driver Health Protocol,\r | |
291 | or all controllers in the platform are in healthy status.\r | |
8e8ae2da | 292 | **/\r |
ab4da126 | 293 | BOOLEAN\r |
294 | PlaformHealthStatusCheck (\r | |
295 | VOID\r | |
296 | );\r | |
297 | \r | |
8e8ae2da | 298 | /**\r |
ab4da126 | 299 | Repair the whole platform.\r |
300 | \r | |
301 | This function is the main entry for user choose "Repair All" in the front page.\r | |
302 | It will try to do recovery job till all the driver health protocol installed modules \r | |
303 | reach a terminal state.\r | |
304 | \r | |
305 | @param DriverHealthList A Pointer to the list contain all of the platform driver health\r | |
306 | information.\r | |
307 | \r | |
8e8ae2da | 308 | **/\r |
ab4da126 | 309 | VOID\r |
310 | PlatformRepairAll (\r | |
311 | IN LIST_ENTRY *DriverHealthList\r | |
312 | );\r | |
313 | \r | |
314 | /**\r | |
315 | Processes a single controller using the EFI Driver Health Protocol associated with \r | |
316 | that controller. This algorithm continues to query the GetHealthStatus() service until\r | |
317 | one of the legal terminal states of the EFI Driver Health Protocol is reached. This may \r | |
318 | require the processing of HII Messages, HII Form, and invocation of repair operations.\r | |
319 | \r | |
320 | @param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance.\r | |
321 | @param ControllerHandle The class guid specifies which form set will be displayed.\r | |
322 | @param ChildHandle The handle of the child controller to retrieve the health \r | |
323 | status on. This is an optional parameter that may be NULL. \r | |
324 | @param HealthStatus The health status of the controller.\r | |
325 | @param MessageList An array of warning or error messages associated \r | |
326 | with the controller specified by ControllerHandle and \r | |
327 | ChildHandle. This is an optional parameter that may be NULL.\r | |
328 | @param FormHiiHandle The HII handle for an HII form associated with the \r | |
329 | controller specified by ControllerHandle and ChildHandle.\r | |
330 | \r | |
331 | **/\r | |
332 | VOID\r | |
333 | ProcessSingleControllerHealth (\r | |
334 | IN EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth,\r | |
335 | IN EFI_HANDLE ControllerHandle, OPTIONAL\r | |
336 | IN EFI_HANDLE ChildHandle, OPTIONAL\r | |
337 | IN EFI_DRIVER_HEALTH_STATUS HealthStatus,\r | |
338 | IN EFI_DRIVER_HEALTH_HII_MESSAGE **MessageList, OPTIONAL\r | |
339 | IN EFI_HII_HANDLE FormHiiHandle\r | |
340 | );\r | |
341 | \r | |
342 | /**\r | |
343 | Repair notification function, simply print the repair progress.\r | |
344 | \r | |
345 | @param Value The value of part has been repaired.\r | |
346 | @param Limit Total value need to be repaired.\r | |
347 | \r | |
348 | **/\r | |
349 | VOID\r | |
350 | RepairNotify (\r | |
351 | IN UINTN Value,\r | |
352 | IN UINTN Limit\r | |
353 | );\r | |
354 | \r | |
355 | /**\r | |
356 | Processes a set of messages returned by the GetHealthStatus ()\r | |
357 | service of the EFI Driver Health Protocol\r | |
358 | \r | |
359 | @param MessageList The MessageList point to messages need to processed. \r | |
360 | \r | |
361 | **/\r | |
362 | VOID\r | |
363 | ProcessMessages (\r | |
364 | IN EFI_DRIVER_HEALTH_HII_MESSAGE *MessageList\r | |
365 | );\r | |
366 | \r | |
367 | \r | |
368 | /**\r | |
369 | Collect and display the platform's driver health relative information, allow user to do interactive \r | |
370 | operation while the platform is unhealthy.\r | |
371 | \r | |
372 | This function display a form which divided into two parts. The one list all modules which has installed \r | |
373 | driver health protocol. The list usually contain driver name, controller name, and it's health info.\r | |
374 | While the driver name can't be retrieved, will use device path as backup. The other part of the form provide\r | |
375 | a choice to the user to repair all platform.\r | |
376 | \r | |
377 | **/\r | |
378 | VOID\r | |
379 | CallDriverHealth (\r | |
380 | VOID\r | |
381 | );\r | |
382 | \r | |
383 | /**\r | |
384 | \r | |
385 | Select the best matching language according to front page policy for best user experience. \r | |
386 | \r | |
387 | This function supports both ISO 639-2 and RFC 4646 language codes, but language \r | |
388 | code types may not be mixed in a single call to this function. \r | |
389 | \r | |
390 | @param SupportedLanguages A pointer to a Null-terminated ASCII string that\r | |
391 | contains a set of language codes in the format \r | |
392 | specified by Iso639Language.\r | |
393 | @param Iso639Language If TRUE, then all language codes are assumed to be\r | |
394 | in ISO 639-2 format. If FALSE, then all language\r | |
395 | codes are assumed to be in RFC 4646 language format.\r | |
396 | \r | |
397 | @retval NULL The best matching language could not be found in SupportedLanguages.\r | |
398 | @retval NULL There are not enough resources available to return the best matching \r | |
399 | language.\r | |
400 | @retval Other A pointer to a Null-terminated ASCII string that is the best matching \r | |
401 | language in SupportedLanguages.\r | |
402 | **/\r | |
403 | CHAR8 *\r | |
404 | DriverHealthSelectBestLanguage (\r | |
405 | IN CHAR8 *SupportedLanguages,\r | |
406 | IN BOOLEAN Iso639Language\r | |
407 | );\r | |
408 | \r | |
409 | /**\r | |
410 | \r | |
411 | This is an internal worker function to get the Component Name (2) protocol interface\r | |
412 | and the language it supports.\r | |
413 | \r | |
414 | @param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID.\r | |
415 | @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r | |
416 | @param ComponentName A pointer to the Component Name (2) protocol interface.\r | |
417 | @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the \r | |
418 | located Component Name (2) instance.\r | |
419 | \r | |
8e8ae2da | 420 | @retval EFI_SUCCESS The Component Name (2) protocol instance is successfully located and we find\r |
ab4da126 | 421 | the best matching language it support.\r |
8e8ae2da | 422 | @retval EFI_UNSUPPORTED The input Language is not supported by the Component Name (2) protocol.\r |
423 | @retval Other Some error occurs when locating Component Name (2) protocol instance or finding\r | |
ab4da126 | 424 | the supported language.\r |
425 | \r | |
426 | **/\r | |
427 | EFI_STATUS\r | |
428 | GetComponentNameWorker (\r | |
429 | IN EFI_GUID *ProtocolGuid,\r | |
430 | IN EFI_HANDLE DriverBindingHandle,\r | |
431 | OUT EFI_COMPONENT_NAME_PROTOCOL **ComponentName,\r | |
432 | OUT CHAR8 **SupportedLanguage\r | |
433 | );\r | |
434 | \r | |
435 | /**\r | |
436 | \r | |
437 | This is an internal worker function to get driver name from Component Name (2) protocol interface.\r | |
438 | \r | |
439 | \r | |
440 | @param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID.\r | |
441 | @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r | |
442 | @param DriverName A pointer to the Unicode string to return. This Unicode string is the name\r | |
443 | of the driver specified by This.\r | |
444 | \r | |
445 | @retval EFI_SUCCESS The driver name is successfully retrieved from Component Name (2) protocol\r | |
446 | interface.\r | |
447 | @retval Other The driver name cannot be retrieved from Component Name (2) protocol\r | |
448 | interface.\r | |
449 | \r | |
450 | **/\r | |
451 | EFI_STATUS\r | |
452 | GetDriverNameWorker (\r | |
453 | IN EFI_GUID *ProtocolGuid,\r | |
454 | IN EFI_HANDLE DriverBindingHandle,\r | |
455 | OUT CHAR16 **DriverName\r | |
456 | );\r | |
457 | \r | |
458 | /**\r | |
459 | \r | |
460 | This function gets driver name from Component Name 2 protocol interface and Component Name protocol interface\r | |
461 | in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the driver name.\r | |
462 | If the attempt fails, it then gets the driver name from EFI 1.1 Component Name protocol for backward\r | |
463 | compatibility support. \r | |
464 | \r | |
465 | @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r | |
466 | @param DriverName A pointer to the Unicode string to return. This Unicode string is the name\r | |
467 | of the driver specified by This.\r | |
468 | \r | |
469 | @retval EFI_SUCCESS The driver name is successfully retrieved from Component Name (2) protocol\r | |
470 | interface.\r | |
471 | @retval Other The driver name cannot be retrieved from Component Name (2) protocol\r | |
472 | interface.\r | |
473 | \r | |
474 | **/\r | |
475 | EFI_STATUS\r | |
476 | DriverHealthGetDriverName (\r | |
477 | IN EFI_HANDLE DriverBindingHandle,\r | |
478 | OUT CHAR16 **DriverName\r | |
479 | );\r | |
480 | \r | |
481 | /**\r | |
482 | This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface\r | |
483 | in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name.\r | |
484 | If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward\r | |
485 | compatibility support. \r | |
486 | \r | |
487 | @param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID.\r | |
488 | @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r | |
489 | @param ControllerHandle The handle of a controller that the driver specified by This is managing.\r | |
490 | This handle specifies the controller whose name is to be returned.\r | |
491 | @param ChildHandle The handle of the child controller to retrieve the name of. This is an\r | |
492 | optional parameter that may be NULL. It will be NULL for device drivers.\r | |
493 | It will also be NULL for bus drivers that attempt to retrieve the name\r | |
494 | of the bus controller. It will not be NULL for a bus driver that attempts\r | |
495 | to retrieve the name of a child controller.\r | |
496 | @param ControllerName A pointer to the Unicode string to return. This Unicode string\r | |
497 | is the name of the controller specified by ControllerHandle and ChildHandle.\r | |
498 | \r | |
499 | @retval EFI_SUCCESS The controller name is successfully retrieved from Component Name (2) protocol\r | |
500 | interface.\r | |
501 | @retval Other The controller name cannot be retrieved from Component Name (2) protocol.\r | |
502 | \r | |
503 | **/\r | |
ab4da126 | 504 | EFI_STATUS\r |
505 | GetControllerNameWorker (\r | |
506 | IN EFI_GUID *ProtocolGuid,\r | |
507 | IN EFI_HANDLE DriverBindingHandle,\r | |
508 | IN EFI_HANDLE ControllerHandle,\r | |
509 | IN EFI_HANDLE ChildHandle,\r | |
510 | OUT CHAR16 **ControllerName\r | |
511 | );\r | |
512 | \r | |
513 | /**\r | |
514 | This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface\r | |
515 | in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. \r | |
516 | If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward\r | |
517 | compatibility support. \r | |
518 | \r | |
519 | @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved.\r | |
520 | @param ControllerHandle The handle of a controller that the driver specified by This is managing.\r | |
521 | This handle specifies the controller whose name is to be returned.\r | |
522 | @param ChildHandle The handle of the child controller to retrieve the name of. This is an\r | |
523 | optional parameter that may be NULL. It will be NULL for device drivers.\r | |
524 | It will also be NULL for bus drivers that attempt to retrieve the name\r | |
525 | of the bus controller. It will not be NULL for a bus driver that attempts\r | |
526 | to retrieve the name of a child controller.\r | |
527 | @param ControllerName A pointer to the Unicode string to return. This Unicode string\r | |
528 | is the name of the controller specified by ControllerHandle and ChildHandle.\r | |
529 | \r | |
530 | @retval EFI_SUCCESS The controller name is successfully retrieved from Component Name (2) protocol\r | |
531 | interface.\r | |
532 | @retval Other The controller name cannot be retrieved from Component Name (2) protocol.\r | |
533 | \r | |
534 | **/\r | |
535 | EFI_STATUS\r | |
536 | DriverHealthGetControllerName (\r | |
537 | IN EFI_HANDLE DriverBindingHandle,\r | |
538 | IN EFI_HANDLE ControllerHandle,\r | |
539 | IN EFI_HANDLE ChildHandle,\r | |
540 | OUT CHAR16 **ControllerName\r | |
541 | );\r | |
542 | \r | |
5c08e117 | 543 | #endif\r |