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