]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/UefiBootManagerLib.h
MdeModulePkg: Make the BmFindLoadOption function public
[mirror_edk2.git] / MdeModulePkg / Include / Library / UefiBootManagerLib.h
1 /** @file
2 Provide Boot Manager related library APIs.
3
4 Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16
17 #ifndef _UEFI_BOOT_MANAGER_LIB_H_
18 #define _UEFI_BOOT_MANAGER_LIB_H_
19
20 #include <Protocol/DriverHealth.h>
21 #include <Library/SortLib.h>
22
23 //
24 // Boot Manager load option library functions.
25 //
26
27 //
28 // Load Option Type
29 //
30 typedef enum {
31 LoadOptionTypeDriver,
32 LoadOptionTypeSysPrep,
33 LoadOptionTypeBoot,
34 LoadOptionTypeMax
35 } EFI_BOOT_MANAGER_LOAD_OPTION_TYPE;
36
37 typedef enum {
38 LoadOptionNumberMax = 0x10000,
39 LoadOptionNumberUnassigned = LoadOptionNumberMax
40 } EFI_BOOT_MANAGER_LOAD_OPTION_NUMBER;
41
42 //
43 // Common structure definition for DriverOption and BootOption
44 //
45 typedef struct {
46 //
47 // Data read from UEFI NV variables
48 //
49 UINTN OptionNumber; // #### numerical value, could be LoadOptionNumberUnassigned
50 EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType; // LoadOptionTypeBoot or LoadOptionTypeDriver
51 UINT32 Attributes; // Load Option Attributes
52 CHAR16 *Description; // Load Option Description
53 EFI_DEVICE_PATH_PROTOCOL *FilePath; // Load Option Device Path
54 UINT8 *OptionalData; // Load Option optional data to pass into image
55 UINT32 OptionalDataSize; // Load Option size of OptionalData
56 EFI_GUID VendorGuid;
57
58 //
59 // Used at runtime
60 //
61 EFI_STATUS Status; // Status returned from boot attempt gBS->StartImage ()
62 CHAR16 *ExitData; // Exit data returned from gBS->StartImage ()
63 UINTN ExitDataSize; // Size of ExitData
64 } EFI_BOOT_MANAGER_LOAD_OPTION;
65
66 /**
67 Returns an array of load options based on the EFI variable
68 L"BootOrder"/L"DriverOrder" and the L"Boot####"/L"Driver####" variables impled by it.
69 #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry.
70
71 @param LoadOptionCount Returns number of entries in the array.
72 @param LoadOptionType The type of the load option.
73
74 @retval NULL No load options exist.
75 @retval !NULL Array of load option entries.
76
77 **/
78 EFI_BOOT_MANAGER_LOAD_OPTION *
79 EFIAPI
80 EfiBootManagerGetLoadOptions (
81 OUT UINTN *LoadOptionCount,
82 IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE LoadOptionType
83 );
84
85 /**
86 Free an array of load options returned from EfiBootManagerGetLoadOptions().
87
88 @param LoadOptions Pointer to the array of load options to free.
89 @param LoadOptionCount Number of array entries in LoadOptions.
90
91 @return EFI_SUCCESS LoadOptions was freed.
92 @return EFI_INVALID_PARAMETER LoadOptions is NULL.
93 **/
94 EFI_STATUS
95 EFIAPI
96 EfiBootManagerFreeLoadOptions (
97 IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOptions,
98 IN UINTN LoadOptionCount
99 );
100
101 /**
102 Initialize a load option.
103
104 @param Option Pointer to the load option to be initialized.
105 @param OptionNumber Option number of the load option.
106 @param OptionType Type of the load option.
107 @param Attributes Attributes of the load option.
108 @param Description Description of the load option.
109 @param FilePath Device path of the load option.
110 @param OptionalData Optional data of the load option.
111 @param OptionalDataSize Size of the optional data of the load option.
112
113 @retval EFI_SUCCESS The load option was initialized successfully.
114 @retval EFI_INVALID_PARAMETER Option, Description or FilePath is NULL.
115 **/
116 EFI_STATUS
117 EFIAPI
118 EfiBootManagerInitializeLoadOption (
119 IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option,
120 IN UINTN OptionNumber,
121 IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType,
122 IN UINT32 Attributes,
123 IN CHAR16 *Description,
124 IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
125 IN UINT8 *OptionalData,
126 IN UINT32 OptionalDataSize
127 );
128
129 /**
130 Free a load option created by EfiBootManagerInitializeLoadOption()
131 or EfiBootManagerVariableToLoadOption().
132
133 @param LoadOption Pointer to the load option to free.
134 CONCERN: Check Boot#### instead of BootOrder, optimize, spec clarify
135 @return EFI_SUCCESS LoadOption was freed.
136 @return EFI_INVALID_PARAMETER LoadOption is NULL.
137
138 **/
139 EFI_STATUS
140 EFIAPI
141 EfiBootManagerFreeLoadOption (
142 IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption
143 );
144
145 /**
146 Initialize the load option from the VariableName.
147
148 @param VariableName EFI Variable name which could be Boot#### or
149 Driver####
150 @param LoadOption Pointer to the load option to be initialized
151
152 @retval EFI_SUCCESS The option was created
153 @retval EFI_INVALID_PARAMETER VariableName or LoadOption is NULL.
154 @retval EFI_NOT_FOUND The variable specified by VariableName cannot be found.
155 **/
156 EFI_STATUS
157 EFIAPI
158 EfiBootManagerVariableToLoadOption (
159 IN CHAR16 *VariableName,
160 IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption
161 );
162
163 /**
164 Create the Boot#### or Driver#### variable from the load option.
165
166 @param LoadOption Pointer to the load option.
167
168 @retval EFI_SUCCESS The variable was created.
169 @retval Others Error status returned by RT->SetVariable.
170 **/
171 EFI_STATUS
172 EFIAPI
173 EfiBootManagerLoadOptionToVariable (
174 IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption
175 );
176
177 /**
178 This function will update the Boot####/Driver####/SysPrep#### and the
179 BootOrder/DriverOrder/SysPrepOrder to add a new load option.
180
181 @param Option Pointer to load option to add.
182 @param Position Position of the new load option to put in the BootOrder/DriverOrder/SysPrepOrder.
183
184 @retval EFI_SUCCESS The load option has been successfully added.
185 @retval Others Error status returned by RT->SetVariable.
186 **/
187 EFI_STATUS
188 EFIAPI
189 EfiBootManagerAddLoadOptionVariable (
190 IN EFI_BOOT_MANAGER_LOAD_OPTION *Option,
191 IN UINTN Position
192 );
193
194 /**
195 Delete the load option according to the OptionNumber and OptionType.
196
197 Only the BootOrder/DriverOrder is updated to remove the reference of the OptionNumber.
198
199 @param OptionNumber Option number of the load option.
200 @param OptionType Type of the load option.
201
202 @retval EFI_NOT_FOUND The load option cannot be found.
203 @retval EFI_SUCCESS The load option was deleted.
204 **/
205 EFI_STATUS
206 EFIAPI
207 EfiBootManagerDeleteLoadOptionVariable (
208 IN UINTN OptionNumber,
209 IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType
210 );
211
212 /**
213 Sort the load options. The DriverOrder/BootOrder variables will be re-created to
214 reflect the new order.
215
216 @param OptionType The type of the load option.
217 @param CompareFunction The comparator function pointer.
218 **/
219 VOID
220 EFIAPI
221 EfiBootManagerSortLoadOptionVariable (
222 IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType,
223 IN SORT_COMPARE CompareFunction
224 );
225
226 /**
227 Return the index of the load option in the load option array.
228
229 The function consider two load options are equal when the
230 OptionType, Attributes, Description, FilePath and OptionalData are equal.
231
232 @param Key Pointer to the load option to be found.
233 @param Array Pointer to the array of load options to be found.
234 @param Count Number of entries in the Array.
235
236 @retval -1 Key wasn't found in the Array.
237 @retval 0 ~ Count-1 The index of the Key in the Array.
238 **/
239 INTN
240 EFIAPI
241 EfiBootManagerFindLoadOption (
242 IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Key,
243 IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Array,
244 IN UINTN Count
245 );
246
247 //
248 // Boot Manager hot key library functions.
249 //
250
251 #pragma pack(1)
252 ///
253 /// EFI Key Option.
254 ///
255 typedef struct {
256 ///
257 /// Specifies options about how the key will be processed.
258 ///
259 EFI_BOOT_KEY_DATA KeyData;
260 ///
261 /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to
262 /// which BootOption refers. If the CRC-32s do not match this value, then this key
263 /// option is ignored.
264 ///
265 UINT32 BootOptionCrc;
266 ///
267 /// The Boot#### option which will be invoked if this key is pressed and the boot option
268 /// is active (LOAD_OPTION_ACTIVE is set).
269 ///
270 UINT16 BootOption;
271 ///
272 /// The key codes to compare against those returned by the
273 /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols.
274 /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions.
275 ///
276 EFI_INPUT_KEY Keys[3];
277 UINT16 OptionNumber;
278 } EFI_BOOT_MANAGER_KEY_OPTION;
279 #pragma pack()
280
281 /**
282 Start the hot key service so that the key press can trigger the boot option.
283
284 @param HotkeyTriggered Return the waitable event and it will be signaled
285 when a valid hot key is pressed.
286
287 @retval EFI_SUCCESS The hot key service is started.
288 **/
289 EFI_STATUS
290 EFIAPI
291 EfiBootManagerStartHotkeyService (
292 IN EFI_EVENT *HotkeyTriggered
293 );
294
295 //
296 // Modifier for EfiBootManagerAddKeyOptionVariable and EfiBootManagerDeleteKeyOptionVariable
297 //
298 #define EFI_BOOT_MANAGER_SHIFT_PRESSED 0x00000001
299 #define EFI_BOOT_MANAGER_CONTROL_PRESSED 0x00000002
300 #define EFI_BOOT_MANAGER_ALT_PRESSED 0x00000004
301 #define EFI_BOOT_MANAGER_LOGO_PRESSED 0x00000008
302 #define EFI_BOOT_MANAGER_MENU_KEY_PRESSED 0x00000010
303 #define EFI_BOOT_MANAGER_SYS_REQ_PRESSED 0x00000020
304
305 /**
306 Add the key option.
307 It adds the key option variable and the key option takes affect immediately.
308
309 @param AddedOption Return the added key option.
310 @param BootOptionNumber The boot option number for the key option.
311 @param Modifier Key shift state.
312 @param ... Parameter list of pointer of EFI_INPUT_KEY.
313
314 @retval EFI_SUCCESS The key option is added.
315 @retval EFI_ALREADY_STARTED The hot key is already used by certain key option.
316 **/
317 EFI_STATUS
318 EFIAPI
319 EfiBootManagerAddKeyOptionVariable (
320 OUT EFI_BOOT_MANAGER_KEY_OPTION *AddedOption, OPTIONAL
321 IN UINT16 BootOptionNumber,
322 IN UINT32 Modifier,
323 ...
324 );
325
326 /**
327 Delete the Key Option variable and unregister the hot key
328
329 @param DeletedOption Return the deleted key options.
330 @param Modifier Key shift state.
331 @param ... Parameter list of pointer of EFI_INPUT_KEY.
332
333 @retval EFI_SUCCESS The key option is deleted.
334 @retval EFI_NOT_FOUND The key option cannot be found.
335 **/
336 EFI_STATUS
337 EFIAPI
338 EfiBootManagerDeleteKeyOptionVariable (
339 IN EFI_BOOT_MANAGER_KEY_OPTION *DeletedOption, OPTIONAL
340 IN UINT32 Modifier,
341 ...
342 );
343
344 /**
345 Register the key option to exit the waiting of the Boot Manager timeout.
346 Platform should ensure that the continue key option isn't conflict with
347 other boot key options.
348
349 @param Modifier Key shift state.
350 @param ... Parameter list of pointer of EFI_INPUT_KEY.
351
352 @retval EFI_SUCCESS Successfully register the continue key option.
353 @retval EFI_ALREADY_STARTED The continue key option is already registered.
354 **/
355 EFI_STATUS
356 EFIAPI
357 EfiBootManagerRegisterContinueKeyOption (
358 IN UINT32 Modifier,
359 ...
360 );
361
362 /**
363 Try to boot the boot option triggered by hot key.
364 **/
365 VOID
366 EFIAPI
367 EfiBootManagerHotkeyBoot (
368 VOID
369 );
370 //
371 // Boot Manager boot library functions.
372 //
373
374 /**
375 The function creates boot options for all possible bootable medias in the following order:
376 1. Removable BlockIo - The boot option only points to the removable media
377 device, like USB key, DVD, Floppy etc.
378 2. Fixed BlockIo - The boot option only points to a Fixed blockIo device,
379 like HardDisk.
380 3. Non-BlockIo SimpleFileSystem - The boot option points to a device supporting
381 SimpleFileSystem Protocol, but not supporting BlockIo
382 protocol.
383 4. LoadFile - The boot option points to the media supporting
384 LoadFile protocol.
385 Reference: UEFI Spec chapter 3.3 Boot Option Variables Default Boot Behavior
386
387 The function won't delete the boot option not added by itself.
388 **/
389 VOID
390 EFIAPI
391 EfiBootManagerRefreshAllBootOption (
392 VOID
393 );
394
395 /**
396 Attempt to boot the EFI boot option. This routine sets L"BootCurent" and
397 signals the EFI ready to boot event. If the device path for the option starts
398 with a BBS device path a legacy boot is attempted. Short form device paths are
399 also supported via this rountine. A device path starting with
400 MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP, MSG_USB_CLASS_DP gets expaned out
401 to find the first device that matches. If the BootOption Device Path
402 fails the removable media boot algorithm is attempted (\EFI\BOOTIA32.EFI,
403 \EFI\BOOTX64.EFI,... only one file type is tried per processor type)
404
405 @param BootOption Boot Option to try and boot.
406 On return, BootOption->Status contains the boot status:
407 EFI_SUCCESS BootOption was booted
408 EFI_UNSUPPORTED BootOption isn't supported.
409 EFI_NOT_FOUND The BootOption was not found on the system
410 Others BootOption failed with this error status
411
412 **/
413 VOID
414 EFIAPI
415 EfiBootManagerBoot (
416 IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption
417 );
418
419 /**
420 Return the Boot Manager Menu.
421
422 @param BootOption Return the Boot Manager Menu.
423
424 @retval EFI_SUCCESS The Boot Manager Menu is successfully returned.
425 @retval EFI_NOT_FOUND The Boot Manager Menu is not found.
426 **/
427 EFI_STATUS
428 EFIAPI
429 EfiBootManagerGetBootManagerMenu (
430 EFI_BOOT_MANAGER_LOAD_OPTION *BootOption
431 );
432
433 /**
434 The function enumerates all the legacy boot options, creates them and
435 registers them in the BootOrder variable.
436 **/
437 typedef
438 VOID
439 (EFIAPI *EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION) (
440 VOID
441 );
442
443 /**
444 The function boots a legacy boot option.
445 **/
446 typedef
447 VOID
448 (EFIAPI *EFI_BOOT_MANAGER_LEGACY_BOOT) (
449 IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption
450 );
451
452 /**
453 The function registers the legacy boot support capabilities.
454
455 @param RefreshLegacyBootOption The function pointer to create all the legacy boot options.
456 @param LegacyBoot The function pointer to boot the legacy boot option.
457 **/
458 VOID
459 EFIAPI
460 EfiBootManagerRegisterLegacyBootSupport (
461 EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION RefreshLegacyBootOption,
462 EFI_BOOT_MANAGER_LEGACY_BOOT LegacyBoot
463 );
464
465 /**
466 Return the platform provided boot option description for the controller.
467
468 @param Handle Controller handle.
469 @param DefaultDescription Default boot description provided by core.
470
471 @return The callee allocated description string
472 or NULL if the handler wants to use DefaultDescription.
473 **/
474 typedef
475 CHAR16 *
476 (EFIAPI *EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER) (
477 IN EFI_HANDLE Handle,
478 IN CONST CHAR16 *DefaultDescription
479 );
480
481 /**
482 Register the platform provided boot description handler.
483
484 @param Handler The platform provided boot description handler
485
486 @retval EFI_SUCCESS The handler was registered successfully.
487 @retval EFI_ALREADY_STARTED The handler was already registered.
488 @retval EFI_OUT_OF_RESOURCES There is not enough resource to perform the registration.
489 **/
490 EFI_STATUS
491 EFIAPI
492 EfiBootManagerRegisterBootDescriptionHandler (
493 IN EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER Handler
494 );
495
496 //
497 // Boot Manager connect and disconnect library functions
498 //
499
500 /**
501 This function will connect all the system driver to controller
502 first, and then special connect the default console, this make
503 sure all the system controller available and the platform default
504 console connected.
505 **/
506 VOID
507 EFIAPI
508 EfiBootManagerConnectAll (
509 VOID
510 );
511
512 /**
513 This function will create all handles associate with every device
514 path node. If the handle associate with one device path node can not
515 be created successfully, then still give chance to do the dispatch,
516 which load the missing drivers if possible.
517
518 @param DevicePathToConnect The device path which will be connected, it can be
519 a multi-instance device path
520 @param MatchingHandle Return the controller handle closest to the DevicePathToConnect
521
522 @retval EFI_SUCCESS All handles associate with every device path node
523 have been created.
524 @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles.
525 @retval EFI_NOT_FOUND Create the handle associate with one device path
526 node failed.
527 @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device
528 drivers on the DevicePath.
529 **/
530 EFI_STATUS
531 EFIAPI
532 EfiBootManagerConnectDevicePath (
533 IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect,
534 OUT EFI_HANDLE *MatchingHandle OPTIONAL
535 );
536
537 /**
538 This function will disconnect all current system handles.
539
540 gBS->DisconnectController() is invoked for each handle exists in system handle buffer.
541 If handle is a bus type handle, all childrens also are disconnected recursively by
542 gBS->DisconnectController().
543 **/
544 VOID
545 EFIAPI
546 EfiBootManagerDisconnectAll (
547 VOID
548 );
549
550
551 //
552 // Boot Manager console library functions
553 //
554
555 typedef enum {
556 ConIn,
557 ConOut,
558 ErrOut,
559 ConInDev,
560 ConOutDev,
561 ErrOutDev,
562 ConsoleTypeMax
563 } CONSOLE_TYPE;
564
565 /**
566 This function will connect all the console devices base on the console
567 device variable ConIn, ConOut and ErrOut.
568
569 @retval EFI_DEVICE_ERROR All the consoles were not connected due to an error.
570 @retval EFI_SUCCESS Success connect any one instance of the console
571 device path base on the variable ConVarName.
572 **/
573 EFI_STATUS
574 EFIAPI
575 EfiBootManagerConnectAllDefaultConsoles (
576 VOID
577 );
578
579 /**
580 This function updates the console variable based on ConVarName. It can
581 add or remove one specific console device path from the variable
582
583 @param ConsoleType ConIn, ConOut, ErrOut, ConInDev, ConOutDev or ErrOutDev.
584 @param CustomizedConDevicePath The console device path to be added to
585 the console variable. Cannot be multi-instance.
586 @param ExclusiveDevicePath The console device path to be removed
587 from the console variable. Cannot be multi-instance.
588
589 @retval EFI_UNSUPPORTED The added device path is the same as a removed one.
590 @retval EFI_SUCCESS Successfully added or removed the device path from the
591 console variable.
592
593 **/
594 EFI_STATUS
595 EFIAPI
596 EfiBootManagerUpdateConsoleVariable (
597 IN CONSOLE_TYPE ConsoleType,
598 IN EFI_DEVICE_PATH_PROTOCOL *CustomizedConDevicePath,
599 IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath
600 );
601
602 /**
603 Connect the console device base on the variable ConVarName, if
604 device path of the ConVarName is multi-instance device path, if
605 anyone of the instances is connected success, then this function
606 will return success.
607
608 @param ConsoleType ConIn, ConOut or ErrOut.
609
610 @retval EFI_NOT_FOUND There is not any console devices connected
611 success
612 @retval EFI_SUCCESS Success connect any one instance of the console
613 device path base on the variable ConVarName.
614
615 **/
616 EFI_STATUS
617 EFIAPI
618 EfiBootManagerConnectConsoleVariable (
619 IN CONSOLE_TYPE ConsoleType
620 );
621
622 /**
623 Query all the children of VideoController and return the device paths of all the
624 children that support GraphicsOutput protocol.
625
626 @param VideoController PCI handle of video controller.
627
628 @return Device paths of all the children that support GraphicsOutput protocol.
629 **/
630 EFI_DEVICE_PATH_PROTOCOL *
631 EFIAPI
632 EfiBootManagerGetGopDevicePath (
633 IN EFI_HANDLE VideoController
634 );
635
636 /**
637 Connect the platform active active video controller.
638
639 @param VideoController PCI handle of video controller.
640
641 @retval EFI_NOT_FOUND There is no active video controller.
642 @retval EFI_SUCCESS The video controller is connected.
643 **/
644 EFI_STATUS
645 EFIAPI
646 EfiBootManagerConnectVideoController (
647 EFI_HANDLE VideoController OPTIONAL
648 );
649
650 //
651 // Boot Manager driver health library functions.
652 //
653
654 typedef struct {
655 EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth;
656
657 ///
658 /// Driver relative handles
659 ///
660 EFI_HANDLE DriverHealthHandle;
661 EFI_HANDLE ControllerHandle;
662 EFI_HANDLE ChildHandle;
663
664 ///
665 /// Driver health messages of the specify Driver
666 ///
667 EFI_DRIVER_HEALTH_HII_MESSAGE *MessageList;
668
669 ///
670 /// HII relative handles
671 ///
672 EFI_HII_HANDLE HiiHandle;
673
674 ///
675 /// Driver Health status
676 ///
677 EFI_DRIVER_HEALTH_STATUS HealthStatus;
678 } EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO;
679
680 /**
681 Return all the Driver Health information.
682
683 When the cumulative health status of all the controllers managed by the
684 driver who produces the EFI_DRIVER_HEALTH_PROTOCOL is healthy, only one
685 EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry is created for such
686 EFI_DRIVER_HEALTH_PROTOCOL instance.
687 Otherwise, every controller creates one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO
688 entry. Additionally every child controller creates one
689 EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry if the driver is a bus driver.
690
691 @param Count Return the count of the Driver Health information.
692
693 @retval NULL No Driver Health information is returned.
694 @retval !NULL Pointer to the Driver Health information array.
695 **/
696 EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *
697 EFIAPI
698 EfiBootManagerGetDriverHealthInfo (
699 UINTN *Count
700 );
701
702 /**
703 Free the Driver Health information array.
704
705 @param DriverHealthInfo Pointer to array of the Driver Health information.
706 @param Count Count of the array.
707
708 @retval EFI_SUCCESS The array is freed.
709 @retval EFI_INVALID_PARAMETER The array is NULL.
710 **/
711 EFI_STATUS
712 EFIAPI
713 EfiBootManagerFreeDriverHealthInfo (
714 EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo,
715 UINTN Count
716 );
717
718 /**
719 Process (load and execute) the load option.
720
721 @param LoadOption Pointer to the load option.
722
723 @retval EFI_INVALID_PARAMETER The load option type is invalid,
724 or the load option file path doesn't point to a valid file.
725 @retval EFI_UNSUPPORTED The load option type is of LoadOptionTypeBoot.
726 @retval EFI_SUCCESS The load option is inactive, or successfully loaded and executed.
727 **/
728 EFI_STATUS
729 EFIAPI
730 EfiBootManagerProcessLoadOption (
731 EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption
732 );
733 #endif