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