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