TianoCore EDK2 master
Loading...
Searching...
No Matches
UefiBootManagerLib.h File Reference

Go to the source code of this file.

Data Structures

struct  EFI_BOOT_MANAGER_LOAD_OPTION
 
struct  EFI_BOOT_MANAGER_KEY_OPTION
 
struct  EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO
 

Macros

#define EFI_BOOT_MANAGER_SHIFT_PRESSED   0x00000001
 
#define EFI_BOOT_MANAGER_CONTROL_PRESSED   0x00000002
 
#define EFI_BOOT_MANAGER_ALT_PRESSED   0x00000004
 
#define EFI_BOOT_MANAGER_LOGO_PRESSED   0x00000008
 
#define EFI_BOOT_MANAGER_MENU_KEY_PRESSED   0x00000010
 
#define EFI_BOOT_MANAGER_SYS_REQ_PRESSED   0x00000020
 

Typedefs

typedef VOID(EFIAPI * EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION) (VOID)
 
typedef VOID(EFIAPI * EFI_BOOT_MANAGER_LEGACY_BOOT) (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
 
typedef CHAR16 *(EFIAPI * EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER) (IN EFI_HANDLE Handle, IN CONST CHAR16 *DefaultDescription)
 

Enumerations

enum  EFI_BOOT_MANAGER_LOAD_OPTION_TYPE {
  LoadOptionTypeDriver , LoadOptionTypeSysPrep , LoadOptionTypeBoot , LoadOptionTypePlatformRecovery ,
  LoadOptionTypeMax
}
 
enum  EFI_BOOT_MANAGER_LOAD_OPTION_NUMBER { LoadOptionNumberMax = 0x10000 , LoadOptionNumberUnassigned = LoadOptionNumberMax }
 
enum  CONSOLE_TYPE {
  ConIn , ConOut , ErrOut , ConInDev ,
  ConOutDev , ErrOutDev , ConsoleTypeMax
}
 

Functions

EFI_BOOT_MANAGER_LOAD_OPTION *EFIAPI EfiBootManagerGetLoadOptions (OUT UINTN *LoadOptionCount, IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE LoadOptionType)
 
EFI_STATUS EFIAPI EfiBootManagerFreeLoadOptions (IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOptions, IN UINTN LoadOptionCount)
 
EFI_STATUS EFIAPI EfiBootManagerInitializeLoadOption (IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option, IN UINTN OptionNumber, IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType, IN UINT32 Attributes, IN CHAR16 *Description, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN UINT8 *OptionalData, IN UINT32 OptionalDataSize)
 
EFI_STATUS EFIAPI EfiBootManagerFreeLoadOption (IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
 
EFI_STATUS EFIAPI EfiBootManagerVariableToLoadOption (IN CHAR16 *VariableName, IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
 
EFI_STATUS EFIAPI EfiBootManagerLoadOptionToVariable (IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
 
EFI_STATUS EFIAPI EfiBootManagerAddLoadOptionVariable (IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option, IN UINTN Position)
 
EFI_STATUS EFIAPI EfiBootManagerDeleteLoadOptionVariable (IN UINTN OptionNumber, IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType)
 
VOID EFIAPI EfiBootManagerSortLoadOptionVariable (IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType, IN SORT_COMPARE CompareFunction)
 
INTN EFIAPI EfiBootManagerFindLoadOption (IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Key, IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *Array, IN UINTN Count)
 
EFI_STATUS EFIAPI EfiBootManagerStartHotkeyService (IN EFI_EVENT *HotkeyTriggered)
 
EFI_STATUS EFIAPI EfiBootManagerAddKeyOptionVariable (OUT EFI_BOOT_MANAGER_KEY_OPTION *AddedOption OPTIONAL, IN UINT16 BootOptionNumber, IN UINT32 Modifier,...)
 
EFI_STATUS EFIAPI EfiBootManagerDeleteKeyOptionVariable (IN EFI_BOOT_MANAGER_KEY_OPTION *DeletedOption OPTIONAL, IN UINT32 Modifier,...)
 
EFI_STATUS EFIAPI EfiBootManagerRegisterContinueKeyOption (IN UINT32 Modifier,...)
 
VOID EFIAPI EfiBootManagerHotkeyBoot (VOID)
 
VOID EFIAPI EfiBootManagerRefreshAllBootOption (VOID)
 
VOID EFIAPI EfiBootManagerBoot (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
 
EFI_STATUS EFIAPI EfiBootManagerGetBootManagerMenu (EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
 
EFI_DEVICE_PATH_PROTOCOL *EFIAPI EfiBootManagerGetNextLoadOptionDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN EFI_DEVICE_PATH_PROTOCOL *FullPath)
 
VOID *EFIAPI EfiBootManagerGetLoadOptionBuffer (IN EFI_DEVICE_PATH_PROTOCOL *FilePath, OUT EFI_DEVICE_PATH_PROTOCOL **FullPath, OUT UINTN *FileSize)
 
VOID EFIAPI EfiBootManagerRegisterLegacyBootSupport (EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION RefreshLegacyBootOption, EFI_BOOT_MANAGER_LEGACY_BOOT LegacyBoot)
 
EFI_STATUS EFIAPI EfiBootManagerRegisterBootDescriptionHandler (IN EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER Handler)
 
VOID EFIAPI EfiBootManagerConnectAll (VOID)
 
EFI_STATUS EFIAPI EfiBootManagerConnectDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect, OUT EFI_HANDLE *MatchingHandle OPTIONAL)
 
VOID EFIAPI EfiBootManagerDisconnectAll (VOID)
 
EFI_STATUS EFIAPI EfiBootManagerConnectAllDefaultConsoles (VOID)
 
EFI_STATUS EFIAPI EfiBootManagerUpdateConsoleVariable (IN CONSOLE_TYPE ConsoleType, IN EFI_DEVICE_PATH_PROTOCOL *CustomizedConDevicePath, IN EFI_DEVICE_PATH_PROTOCOL *ExclusiveDevicePath)
 
EFI_STATUS EFIAPI EfiBootManagerConnectConsoleVariable (IN CONSOLE_TYPE ConsoleType)
 
EFI_DEVICE_PATH_PROTOCOL *EFIAPI EfiBootManagerGetGopDevicePath (IN EFI_HANDLE VideoController)
 
EFI_STATUS EFIAPI EfiBootManagerConnectVideoController (EFI_HANDLE VideoController OPTIONAL)
 
EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *EFIAPI EfiBootManagerGetDriverHealthInfo (UINTN *Count)
 
EFI_STATUS EFIAPI EfiBootManagerFreeDriverHealthInfo (EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *DriverHealthInfo, UINTN Count)
 
EFI_STATUS EFIAPI EfiBootManagerProcessLoadOption (EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
 
BOOLEAN EFIAPI EfiBootManagerIsValidLoadOptionVariableName (IN CHAR16 *VariableName, OUT EFI_BOOT_MANAGER_LOAD_OPTION_TYPE *OptionType OPTIONAL, OUT UINT16 *OptionNumber OPTIONAL)
 
EFI_STATUS EFIAPI EfiBootManagerDispatchDeferredImages (VOID)
 

Detailed Description

Provide Boot Manager related library APIs.

Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UefiBootManagerLib.h.

Macro Definition Documentation

◆ EFI_BOOT_MANAGER_ALT_PRESSED

#define EFI_BOOT_MANAGER_ALT_PRESSED   0x00000004

Definition at line 304 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_CONTROL_PRESSED

#define EFI_BOOT_MANAGER_CONTROL_PRESSED   0x00000002

Definition at line 303 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_LOGO_PRESSED

#define EFI_BOOT_MANAGER_LOGO_PRESSED   0x00000008

Definition at line 305 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_MENU_KEY_PRESSED

#define EFI_BOOT_MANAGER_MENU_KEY_PRESSED   0x00000010

Definition at line 306 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_SHIFT_PRESSED

#define EFI_BOOT_MANAGER_SHIFT_PRESSED   0x00000001

Definition at line 302 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_SYS_REQ_PRESSED

#define EFI_BOOT_MANAGER_SYS_REQ_PRESSED   0x00000020

Definition at line 307 of file UefiBootManagerLib.h.

Typedef Documentation

◆ EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER

typedef CHAR16 *(EFIAPI * EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER) (IN EFI_HANDLE Handle, IN CONST CHAR16 *DefaultDescription)

Return the platform provided boot option description for the controller.

Parameters
HandleController handle.
DefaultDescriptionDefault boot description provided by core.
Returns
The callee allocated description string or NULL if the handler wants to use DefaultDescription.

Definition at line 525 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_LEGACY_BOOT

typedef VOID(EFIAPI * EFI_BOOT_MANAGER_LEGACY_BOOT) (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)

The function boots a legacy boot option.

Definition at line 497 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION

typedef VOID(EFIAPI * EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION) (VOID)

The function enumerates all the legacy boot options, creates them and registers them in the BootOrder variable.

Definition at line 488 of file UefiBootManagerLib.h.

Enumeration Type Documentation

◆ CONSOLE_TYPE

enum CONSOLE_TYPE

Definition at line 604 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_LOAD_OPTION_NUMBER

enum EFI_BOOT_MANAGER_LOAD_OPTION_NUMBER

Definition at line 31 of file UefiBootManagerLib.h.

◆ EFI_BOOT_MANAGER_LOAD_OPTION_TYPE

enum EFI_BOOT_MANAGER_LOAD_OPTION_TYPE

Definition at line 23 of file UefiBootManagerLib.h.

Function Documentation

◆ EfiBootManagerAddKeyOptionVariable()

EFI_STATUS EFIAPI EfiBootManagerAddKeyOptionVariable ( OUT EFI_BOOT_MANAGER_KEY_OPTION *AddedOption  OPTIONAL,
IN UINT16  BootOptionNumber,
IN UINT32  Modifier,
  ... 
)

Add the key option. It adds the key option variable and the key option takes affect immediately.

Parameters
AddedOptionReturn the added key option.
BootOptionNumberThe boot option number for the key option.
ModifierKey shift state.
...Parameter list of pointer of EFI_INPUT_KEY.
Return values
EFI_SUCCESSThe key option is added.
EFI_ALREADY_STARTEDThe hot key is already used by certain key option.

Definition at line 972 of file BmHotkey.c.

◆ EfiBootManagerAddLoadOptionVariable()

EFI_STATUS EFIAPI EfiBootManagerAddLoadOptionVariable ( IN OUT EFI_BOOT_MANAGER_LOAD_OPTION Option,
IN UINTN  Position 
)

This function will register the new Boot####, Driver#### or SysPrep#### option. After the *#### is updated, the *Order will also be updated.

Parameters
OptionPointer to load option to add. If on input Option->OptionNumber is LoadOptionNumberUnassigned, then on output Option->OptionNumber is updated to the number of the new Boot####, Driver#### or SysPrep#### option.
PositionPosition of the new load option to put in the ****Order variable.
Return values
EFI_SUCCESSThe *#### have been successfully registered.
EFI_INVALID_PARAMETERThe option number exceeds 0xFFFF.
EFI_ALREADY_STARTEDThe option number of Option is being used already. Note: this API only adds new load option, no replacement support.
EFI_OUT_OF_RESOURCESThere is no free option number that can be used when the option number specified in the Option is LoadOptionNumberUnassigned.
Returns
Status codes of gRT->SetVariable ().

Definition at line 367 of file BmLoadOption.c.

◆ EfiBootManagerBoot()

VOID EFIAPI EfiBootManagerBoot ( IN EFI_BOOT_MANAGER_LOAD_OPTION BootOption)

Attempt to boot the EFI boot option. This routine sets L"BootCurent" and signals the EFI ready to boot event. If the device path for the option starts with a BBS device path a legacy boot is attempted. Short form device paths are also supported via this rountine. A device path starting with MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP, MSG_USB_CLASS_DP gets expaned out to find the first device that matches. If the BootOption Device Path fails the removable media boot algorithm is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type is tried per processor type)

Parameters
BootOptionBoot Option to try and boot. On return, BootOption->Status contains the boot status: EFI_SUCCESS BootOption was booted EFI_UNSUPPORTED BootOption isn't supported. EFI_NOT_FOUND The BootOption was not found on the system Others BootOption failed with this error status

Attempt to boot the EFI boot option. This routine sets L"BootCurent" and also signals the EFI ready to boot event. If the device path for the option starts with a BBS device path a legacy boot is attempted via the registered gLegacyBoot function. Short form device paths are also supported via this rountine. A device path starting with MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP, MSG_USB_CLASS_DP gets expaned out to find the first device that matches. If the BootOption Device Path fails the removable media boot algorithm is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type is tried per processor type)

Parameters
BootOptionBoot Option to try and boot. On return, BootOption->Status contains the boot status. EFI_SUCCESS BootOption was booted EFI_UNSUPPORTED A BBS device path was found with no valid callback registered via EfiBootManagerInitialize(). EFI_NOT_FOUND The BootOption was not found on the system !EFI_SUCCESS BootOption failed with this error status

Definition at line 1846 of file BmBoot.c.

◆ EfiBootManagerConnectAll()

VOID EFIAPI EfiBootManagerConnectAll ( VOID  )

This function will connect all the system driver to controller first, and then special connect the default console, this make sure all the system controller available and the platform default console connected.

Definition at line 67 of file BmConnect.c.

◆ EfiBootManagerConnectAllDefaultConsoles()

EFI_STATUS EFIAPI EfiBootManagerConnectAllDefaultConsoles ( VOID  )

This function will connect all the console devices base on the console device variable ConIn, ConOut and ErrOut.

Return values
EFI_DEVICE_ERRORAll the consoles were not connected due to an error.
EFI_SUCCESSSuccess connect any one instance of the console device path base on the variable ConVarName.

Definition at line 712 of file BmConsole.c.

◆ EfiBootManagerConnectConsoleVariable()

EFI_STATUS EFIAPI EfiBootManagerConnectConsoleVariable ( IN CONSOLE_TYPE  ConsoleType)

Connect the console device base on the variable ConVarName, if device path of the ConVarName is multi-instance device path, if anyone of the instances is connected success, then this function will return success.

Parameters
ConsoleTypeConIn, ConOut or ErrOut.
Return values
EFI_NOT_FOUNDThere is not any console devices connected success
EFI_SUCCESSSuccess connect any one instance of the console device path base on the variable ConVarName.

Connect the console device base on the variable ConsoleType.

Parameters
ConsoleTypeConIn, ConOut or ErrOut.
Return values
EFI_NOT_FOUNDThere is not any console devices connected success
EFI_SUCCESSSuccess connect any one instance of the console device path base on the variable ConVarName.

Definition at line 521 of file BmConsole.c.

◆ EfiBootManagerConnectDevicePath()

EFI_STATUS EFIAPI EfiBootManagerConnectDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathToConnect,
OUT EFI_HANDLE *MatchingHandle  OPTIONAL 
)

This function will create all handles associate with every device path node. If the handle associate with one device path node can not be created successfully, then still give chance to do the dispatch, which load the missing drivers if possible.

Parameters
DevicePathToConnectThe device path which will be connected, it can be a multi-instance device path
MatchingHandleReturn the controller handle closest to the DevicePathToConnect
Return values
EFI_SUCCESSAll handles associate with every device path node have been created.
EFI_OUT_OF_RESOURCESThere is no resource to create new handles.
EFI_NOT_FOUNDCreate the handle associate with one device path node failed.
EFI_SECURITY_VIOLATIONThe user has no permission to start UEFI device drivers on the DevicePath.

Definition at line 108 of file BmConnect.c.

◆ EfiBootManagerConnectVideoController()

EFI_STATUS EFIAPI EfiBootManagerConnectVideoController ( EFI_HANDLE VideoController  OPTIONAL)

Connect the platform active active video controller.

Parameters
VideoControllerPCI handle of video controller.
Return values
EFI_NOT_FOUNDThere is no active video controller.
EFI_SUCCESSThe video controller is connected.

Definition at line 232 of file BmConsole.c.

◆ EfiBootManagerDeleteKeyOptionVariable()

EFI_STATUS EFIAPI EfiBootManagerDeleteKeyOptionVariable ( IN EFI_BOOT_MANAGER_KEY_OPTION *DeletedOption  OPTIONAL,
IN UINT32  Modifier,
  ... 
)

Delete the Key Option variable and unregister the hot key

Parameters
DeletedOptionReturn the deleted key options.
ModifierKey shift state.
...Parameter list of pointer of EFI_INPUT_KEY.
Return values
EFI_SUCCESSThe key option is deleted.
EFI_NOT_FOUNDThe key option cannot be found.

Definition at line 1089 of file BmHotkey.c.

◆ EfiBootManagerDeleteLoadOptionVariable()

EFI_STATUS EFIAPI EfiBootManagerDeleteLoadOptionVariable ( IN UINTN  OptionNumber,
IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE  OptionType 
)

Delete the load option according to the OptionNumber and OptionType.

Only the BootOrder/DriverOrder is updated to remove the reference of the OptionNumber.

Parameters
OptionNumberOption number of the load option.
OptionTypeType of the load option.
Return values
EFI_NOT_FOUNDThe load option cannot be found.
EFI_SUCCESSThe load option was deleted.

Delete the load option.

Parameters
OptionNumberIndicate the option number of load option
OptionTypeIndicate the type of load option
Return values
EFI_INVALID_PARAMETEROptionType or OptionNumber is invalid.
EFI_NOT_FOUNDThe load option cannot be found
EFI_SUCCESSThe load option was deleted
othersStatus of RT->SetVariable()

Definition at line 584 of file BmLoadOption.c.

◆ EfiBootManagerDisconnectAll()

VOID EFIAPI EfiBootManagerDisconnectAll ( VOID  )

This function will disconnect all current system handles.

gBS->DisconnectController() is invoked for each handle exists in system handle buffer. If handle is a bus type handle, all childrens also are disconnected recursively by gBS->DisconnectController().

Definition at line 202 of file BmConnect.c.

◆ EfiBootManagerDispatchDeferredImages()

EFI_STATUS EFIAPI EfiBootManagerDispatchDeferredImages ( VOID  )

Dispatch the deferred images that are returned from all DeferredImageLoad instances.

Return values
EFI_SUCCESSAt least one deferred image is loaded successfully and started.
EFI_NOT_FOUNDThere is no deferred image.
EFI_ACCESS_DENIEDThere are deferred images but all of them are failed to load.

Definition at line 428 of file BmMisc.c.

◆ EfiBootManagerFindLoadOption()

INTN EFIAPI EfiBootManagerFindLoadOption ( IN CONST EFI_BOOT_MANAGER_LOAD_OPTION Key,
IN CONST EFI_BOOT_MANAGER_LOAD_OPTION Array,
IN UINTN  Count 
)

Return the index of the load option in the load option array.

The function consider two load options are equal when the OptionType, Attributes, Description, FilePath and OptionalData are equal.

Parameters
KeyPointer to the load option to be found.
ArrayPointer to the array of load options to be found.
CountNumber of entries in the Array.
Return values
-1Key wasn't found in the Array.
0~ Count-1 The index of the Key in the Array.

Definition at line 548 of file BmLoadOption.c.

◆ EfiBootManagerFreeDriverHealthInfo()

EFI_STATUS EFIAPI EfiBootManagerFreeDriverHealthInfo ( EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO DriverHealthInfo,
UINTN  Count 
)

Free the Driver Health information array.

Parameters
DriverHealthInfoPointer to array of the Driver Health information.
CountCount of the array.
Return values
EFI_SUCCESSThe array is freed.
EFI_INVALID_PARAMETERThe array is NULL.

Definition at line 406 of file BmDriverHealth.c.

◆ EfiBootManagerFreeLoadOption()

EFI_STATUS EFIAPI EfiBootManagerFreeLoadOption ( IN EFI_BOOT_MANAGER_LOAD_OPTION LoadOption)

Free a load option created by EfiBootManagerInitializeLoadOption() or EfiBootManagerVariableToLoadOption().

Parameters
LoadOptionPointer to the load option to free. CONCERN: Check Boot#### instead of BootOrder, optimize, spec clarify
Returns
EFI_SUCCESS LoadOption was freed.
EFI_INVALID_PARAMETER LoadOption is NULL.

Free an EFI_BOOT_MANGER_LOAD_OPTION entry that was allocate by the library.

Parameters
LoadOptionPointer to boot option to Free.
Returns
EFI_SUCCESS BootOption was freed
EFI_NOT_FOUND BootOption == NULL

Definition at line 1160 of file BmLoadOption.c.

◆ EfiBootManagerFreeLoadOptions()

EFI_STATUS EFIAPI EfiBootManagerFreeLoadOptions ( IN EFI_BOOT_MANAGER_LOAD_OPTION Option,
IN UINTN  OptionCount 
)

Free an array of load options returned from EfiBootManagerGetLoadOptions().

Parameters
LoadOptionsPointer to the array of load options to free.
LoadOptionCountNumber of array entries in LoadOptions.
Returns
EFI_SUCCESS LoadOptions was freed.
EFI_INVALID_PARAMETER LoadOptions is NULL.

Free an EFI_BOOT_MANGER_LOAD_OPTION array that was allocated by EfiBootManagerGetLoadOptions().

Parameters
OptionPointer to boot option array to free.
OptionCountNumber of array entries in BootOption
Returns
EFI_SUCCESS BootOption was freed
EFI_NOT_FOUND BootOption == NULL

Definition at line 1196 of file BmLoadOption.c.

◆ EfiBootManagerGetBootManagerMenu()

EFI_STATUS EFIAPI EfiBootManagerGetBootManagerMenu ( EFI_BOOT_MANAGER_LOAD_OPTION BootOption)

Return the boot option corresponding to the Boot Manager Menu. It may automatically create one if the boot option hasn't been created yet.

Parameters
BootOptionReturn the Boot Manager Menu.
Return values
EFI_SUCCESSThe Boot Manager Menu is successfully returned.
EFI_NOT_FOUNDThe Boot Manager Menu cannot be found.
othersReturn status of gRT->SetVariable (). BootOption still points to the Boot Manager Menu even the Status is not EFI_SUCCESS and EFI_NOT_FOUND.

Definition at line 2608 of file BmBoot.c.

◆ EfiBootManagerGetDriverHealthInfo()

EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO *EFIAPI EfiBootManagerGetDriverHealthInfo ( UINTN Count)

Return all the Driver Health information.

When the cumulative health status of all the controllers managed by the driver who produces the EFI_DRIVER_HEALTH_PROTOCOL is healthy, only one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry is created for such EFI_DRIVER_HEALTH_PROTOCOL instance. Otherwise, every controller creates one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry. Additionally every child controller creates one EFI_BOOT_MANAGER_DRIVER_HEALTH_INFO entry if the driver is a bus driver.

Parameters
CountReturn the count of the Driver Health information.
Return values
NULLNo Driver Health information is returned.
!NULLPointer to the Driver Health information array.

Definition at line 288 of file BmDriverHealth.c.

◆ EfiBootManagerGetGopDevicePath()

EFI_DEVICE_PATH_PROTOCOL *EFIAPI EfiBootManagerGetGopDevicePath ( IN EFI_HANDLE  VideoController)

Query all the children of VideoController and return the device paths of all the children that support GraphicsOutput protocol.

Parameters
VideoControllerPCI handle of video controller.
Returns
Device paths of all the children that support GraphicsOutput protocol.

Definition at line 117 of file BmConsole.c.

◆ EfiBootManagerGetLoadOptionBuffer()

VOID *EFIAPI EfiBootManagerGetLoadOptionBuffer ( IN EFI_DEVICE_PATH_PROTOCOL FilePath,
OUT EFI_DEVICE_PATH_PROTOCOL **  FullPath,
OUT UINTN FileSize 
)

Get the load option by its device path.

Parameters
FilePathThe device path pointing to a load option. It could be a short-form device path.
FullPathReturn the full device path of the load option after short-form device path expanding. Caller is responsible to free it.
FileSizeReturn the load option size.
Returns
The load option buffer. Caller is responsible to free the memory.

Definition at line 1607 of file BmBoot.c.

◆ EfiBootManagerGetLoadOptions()

EFI_BOOT_MANAGER_LOAD_OPTION *EFIAPI EfiBootManagerGetLoadOptions ( OUT UINTN OptionCount,
IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE  LoadOptionType 
)

Returns an array of load options based on the EFI variable L"BootOrder"/L"DriverOrder" and the L"Boot####"/L"Driver####" variables impled by it.

is the hex value of the UINT16 in each BootOrder/DriverOrder entry.

Parameters
LoadOptionCountReturns number of entries in the array.
LoadOptionTypeThe type of the load option.
Return values
NULLNo load options exist.
!NULLArray of load option entries.

Definition at line 1078 of file BmLoadOption.c.

◆ EfiBootManagerGetNextLoadOptionDevicePath()

EFI_DEVICE_PATH_PROTOCOL *EFIAPI EfiBootManagerGetNextLoadOptionDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL FilePath,
IN EFI_DEVICE_PATH_PROTOCOL FullPath 
)

Get the next possible full path pointing to the load option. The routine doesn't guarantee the returned full path points to an existing file, and it also doesn't guarantee the existing file is a valid load option. BmGetNextLoadOptionBuffer() guarantees.

Parameters
FilePathThe device path pointing to a load option. It could be a short-form device path.
FullPathThe full path returned by the routine in last call. Set to NULL in first call.
Returns
The next possible full path pointing to the load option. Caller is responsible to free the memory.

Definition at line 2664 of file BmBoot.c.

◆ EfiBootManagerHotkeyBoot()

VOID EFIAPI EfiBootManagerHotkeyBoot ( VOID  )

Try to boot the boot option triggered by hot key.

Definition at line 328 of file BmHotkey.c.

◆ EfiBootManagerInitializeLoadOption()

EFI_STATUS EFIAPI EfiBootManagerInitializeLoadOption ( IN OUT EFI_BOOT_MANAGER_LOAD_OPTION Option,
IN UINTN  OptionNumber,
IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE  OptionType,
IN UINT32  Attributes,
IN CHAR16 *  Description,
IN EFI_DEVICE_PATH_PROTOCOL FilePath,
IN UINT8 *  OptionalData,
IN UINT32  OptionalDataSize 
)

Initialize a load option.

Parameters
OptionPointer to the load option to be initialized.
OptionNumberOption number of the load option.
OptionTypeType of the load option.
AttributesAttributes of the load option.
DescriptionDescription of the load option.
FilePathDevice path of the load option.
OptionalDataOptional data of the load option.
OptionalDataSizeSize of the optional data of the load option.
Return values
EFI_SUCCESSThe load option was initialized successfully.
EFI_INVALID_PARAMETEROption, Description or FilePath is NULL.

◆ EfiBootManagerIsValidLoadOptionVariableName()

BOOLEAN EFIAPI EfiBootManagerIsValidLoadOptionVariableName ( IN CHAR16 *  VariableName,
OUT EFI_BOOT_MANAGER_LOAD_OPTION_TYPE *OptionType  OPTIONAL,
OUT UINT16 *OptionNumber  OPTIONAL 
)

Check whether the VariableName is a valid load option variable name and return the load option type and option number.

Parameters
VariableNameThe name of the load option variable.
OptionTypeReturn the load option type.
OptionNumberReturn the load option number.
Return values
TRUEThe variable name is valid; The load option type and load option number are returned.
FALSEThe variable name is NOT valid.

Check whether the VariableName is a valid load option variable name and return the load option type and option number.

Parameters
VariableNameThe name of the load option variable.
OptionTypeReturn the load option type.
OptionNumberReturn the load option number.
Return values
TRUEThe variable name is valid; The load option type and load option number is returned.
FALSEThe variable name is NOT valid.

Definition at line 808 of file BmLoadOption.c.

◆ EfiBootManagerLoadOptionToVariable()

EFI_STATUS EFIAPI EfiBootManagerLoadOptionToVariable ( IN CONST EFI_BOOT_MANAGER_LOAD_OPTION Option)

Create the Boot#### or Driver#### variable from the load option.

Parameters
LoadOptionPointer to the load option.
Return values
EFI_SUCCESSThe variable was created.
OthersError status returned by RT->SetVariable.

Create the Boot####, Driver####, SysPrep####, PlatformRecovery#### variable from the load option.

Parameters
LoadOptionPointer to the load option.
Return values
EFI_SUCCESSThe variable was created.
OthersError status returned by RT->SetVariable.

Definition at line 170 of file BmLoadOption.c.

◆ EfiBootManagerProcessLoadOption()

EFI_STATUS EFIAPI EfiBootManagerProcessLoadOption ( EFI_BOOT_MANAGER_LOAD_OPTION LoadOption)

Process (load and execute) the load option.

Parameters
LoadOptionPointer to the load option.
Return values
EFI_INVALID_PARAMETERThe load option type is invalid, or the load option file path doesn't point to a valid file.
EFI_UNSUPPORTEDThe load option type is of LoadOptionTypeBoot.
EFI_SUCCESSThe load option is inactive, or successfully loaded and executed.

◆ EfiBootManagerRefreshAllBootOption()

VOID EFIAPI EfiBootManagerRefreshAllBootOption ( VOID  )

The function creates boot options for all possible bootable medias in the following order:

  1. Removable BlockIo - The boot option only points to the removable media device, like USB key, DVD, Floppy etc.
  2. Fixed BlockIo - The boot option only points to a Fixed blockIo device, like HardDisk.
  3. Non-BlockIo SimpleFileSystem - The boot option points to a device supporting SimpleFileSystem Protocol, but not supporting BlockIo protocol.
  4. LoadFile - The boot option points to the media supporting LoadFile protocol. Reference: UEFI Spec chapter 3.3 Boot Option Variables Default Boot Behavior

The function won't delete the boot option not added by itself.

The function enumerates all boot options, creates them and registers them in the BootOrder variable.

Definition at line 2388 of file BmBoot.c.

◆ EfiBootManagerRegisterBootDescriptionHandler()

EFI_STATUS EFIAPI EfiBootManagerRegisterBootDescriptionHandler ( IN EFI_BOOT_MANAGER_BOOT_DESCRIPTION_HANDLER  Handler)

Register the platform provided boot description handler.

Parameters
HandlerThe platform provided boot description handler
Return values
EFI_SUCCESSThe handler was registered successfully.
EFI_ALREADY_STARTEDThe handler was already registered.
EFI_OUT_OF_RESOURCESThere is not enough resource to perform the registration.

Definition at line 987 of file BmBootDescription.c.

◆ EfiBootManagerRegisterContinueKeyOption()

EFI_STATUS EFIAPI EfiBootManagerRegisterContinueKeyOption ( IN UINT32  Modifier,
  ... 
)

Register the key option to exit the waiting of the Boot Manager timeout. Platform should ensure that the continue key option isn't conflict with other boot key options.

Parameters
ModifierKey shift state.
...Parameter list of pointer of EFI_INPUT_KEY.
Return values
EFI_SUCCESSSuccessfully register the continue key option.
EFI_ALREADY_STARTEDThe continue key option is already registered.

Definition at line 813 of file BmHotkey.c.

◆ EfiBootManagerRegisterLegacyBootSupport()

VOID EFIAPI EfiBootManagerRegisterLegacyBootSupport ( EFI_BOOT_MANAGER_REFRESH_LEGACY_BOOT_OPTION  RefreshLegacyBootOption,
EFI_BOOT_MANAGER_LEGACY_BOOT  LegacyBoot 
)

The function registers the legacy boot support capabilities.

Parameters
RefreshLegacyBootOptionThe function pointer to create all the legacy boot options.
LegacyBootThe function pointer to boot the legacy boot option.

Definition at line 60 of file BmBoot.c.

◆ EfiBootManagerSortLoadOptionVariable()

VOID EFIAPI EfiBootManagerSortLoadOptionVariable ( IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE  OptionType,
IN SORT_COMPARE  CompareFunction 
)

Sort the load options. The DriverOrder/BootOrder variables will be re-created to reflect the new order.

Parameters
OptionTypeThe type of the load option.
CompareFunctionThe comparator function pointer.

◆ EfiBootManagerStartHotkeyService()

EFI_STATUS EFIAPI EfiBootManagerStartHotkeyService ( IN EFI_EVENT HotkeyTriggered)

Start the hot key service so that the key press can trigger the boot option.

Parameters
HotkeyTriggeredReturn the waitable event and it will be signaled when a valid hot key is pressed.
Return values
EFI_SUCCESSThe hot key service is started.

Definition at line 882 of file BmHotkey.c.

◆ EfiBootManagerUpdateConsoleVariable()

EFI_STATUS EFIAPI EfiBootManagerUpdateConsoleVariable ( IN CONSOLE_TYPE  ConsoleType,
IN EFI_DEVICE_PATH_PROTOCOL CustomizedConDevicePath,
IN EFI_DEVICE_PATH_PROTOCOL ExclusiveDevicePath 
)

This function updates the console variable based on ConVarName. It can add or remove one specific console device path from the variable

Parameters
ConsoleTypeConIn, ConOut, ErrOut, ConInDev, ConOutDev or ErrOutDev.
CustomizedConDevicePathThe console device path to be added to the console variable. Cannot be multi-instance.
ExclusiveDevicePathThe console device path to be removed from the console variable. Cannot be multi-instance.
Return values
EFI_UNSUPPORTEDThe added device path is the same as a removed one.
EFI_SUCCESSSuccessfully added or removed the device path from the console variable.

This function updates the console variable based on ConVarName. It can add or remove one specific console device path from the variable

Parameters
ConsoleTypeConIn, ConOut, ErrOut, ConInDev, ConOutDev or ErrOutDev.
CustomizedConDevicePathThe console device path to be added to the console variable. Cannot be multi-instance.
ExclusiveDevicePathThe console device path to be removed from the console variable. Cannot be multi-instance.
Return values
EFI_UNSUPPORTEDThe added device path is the same as a removed one.
EFI_SUCCESSSuccessfully added or removed the device path from the console variable.
othersReturn status of RT->SetVariable().

Definition at line 418 of file BmConsole.c.

◆ EfiBootManagerVariableToLoadOption()

EFI_STATUS EFIAPI EfiBootManagerVariableToLoadOption ( IN CHAR16 *  VariableName,
IN OUT EFI_BOOT_MANAGER_LOAD_OPTION Option 
)

Initialize the load option from the VariableName.

Parameters
VariableNameEFI Variable name which could be Boot#### or Driver####
LoadOptionPointer to the load option to be initialized
Return values
EFI_SUCCESSThe option was created
EFI_INVALID_PARAMETERVariableName or LoadOption is NULL.
EFI_NOT_FOUNDThe variable specified by VariableName cannot be found.

Build the Boot#### or Driver#### option from the VariableName.

Parameters
VariableNameEFI Variable name indicate if it is Boot#### or Driver####
OptionReturn the Boot#### or Driver#### option.
Return values
EFI_SUCCESSGet the option just been created
EFI_NOT_FOUNDFailed to get the new option

Definition at line 998 of file BmLoadOption.c.