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