TianoCore EDK2 master
Loading...
Searching...
No Matches
BootManagerMenu.c File Reference
#include "BootManagerMenu.h"

Go to the source code of this file.

Functions

UINTN PrintStringAt (IN UINTN Column, IN UINTN Row, IN CHAR16 *String)
 
UINTN PrintCharAt (IN UINTN Column, IN UINTN Row, CHAR16 Character)
 
UINTN GetLineWidth (IN EFI_STRING_ID StringId)
 
EFI_STATUS InitializeBootMenuScreen (IN OUT BOOT_MENU_POPUP_DATA *BootMenuData)
 
BOOLEAN IsBootManagerMenu (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
 
BOOLEAN IgnoreBootOption (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption)
 
EFI_STATUS InitializeBootMenuData (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOption, IN UINTN BootOptionCount, OUT BOOT_MENU_POPUP_DATA *BootMenuData)
 
EFI_STATUS BootMenuSelectItem (IN UINTN WantSelectItem, IN OUT BOOT_MENU_POPUP_DATA *BootMenuData)
 
EFI_STATUS DrawBootPopupMenu (IN BOOT_MENU_POPUP_DATA *BootMenuData)
 
VOID BootFromSelectOption (IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions, IN UINTN BootOptionCount, IN UINTN SelectItem)
 
EFI_STATUS EFIAPI BdsSetConsoleMode (BOOLEAN IsSetupMode)
 
EFI_STATUS EFIAPI BootManagerMenuEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_HII_HANDLE gStringPackHandle
 
BOOLEAN mModeInitialized = FALSE
 
UINT32 mBootHorizontalResolution = 0
 
UINT32 mBootVerticalResolution = 0
 
UINT32 mBootTextModeColumn = 0
 
UINT32 mBootTextModeRow = 0
 
UINT32 mSetupTextModeColumn = 0
 
UINT32 mSetupTextModeRow = 0
 
UINT32 mSetupHorizontalResolution = 0
 
UINT32 mSetupVerticalResolution = 0
 

Detailed Description

The application to show the Boot Manager Menu.

Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file BootManagerMenu.c.

Function Documentation

◆ BdsSetConsoleMode()

EFI_STATUS EFIAPI BdsSetConsoleMode ( BOOLEAN  IsSetupMode)

This function will change video resolution and text mode according to defined setup mode or defined boot mode

Parameters
IsSetupModeIndicate mode is changed to setup mode or boot mode.
Return values
EFI_SUCCESSMode is changed successfully.
OthersMode failed to be changed.

Definition at line 771 of file BootManagerMenu.c.

◆ BootFromSelectOption()

VOID BootFromSelectOption ( IN EFI_BOOT_MANAGER_LOAD_OPTION BootOptions,
IN UINTN  BootOptionCount,
IN UINTN  SelectItem 
)

This function uses to boot from selected item

Parameters
BootOptionsPointer to EFI_BOOT_MANAGER_LOAD_OPTION array.
BootOptionCountNumber of boot option.
SelectItemCurrent selected item.

Definition at line 736 of file BootManagerMenu.c.

◆ BootManagerMenuEntry()

EFI_STATUS EFIAPI BootManagerMenuEntry ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Display the boot popup menu and allow user select boot item.

Parameters
ImageHandleThe image handle.
SystemTableThe system table.
Return values
EFI_SUCCESSBoot from selected boot option, and return success from boot option
EFI_NOT_FOUNDUser select to enter setup or can not find boot option

Definition at line 991 of file BootManagerMenu.c.

◆ BootMenuSelectItem()

EFI_STATUS BootMenuSelectItem ( IN UINTN  WantSelectItem,
IN OUT BOOT_MENU_POPUP_DATA BootMenuData 
)

This function uses input select item to highlight selected item and set current selected item in BootMenuData

Parameters
WantSelectItemThe user wants to select item.
BootMenuDataThe boot menu data to be processed
Returns
EFI_SUCCESS Highlight selected item and update current selected item successful
Return values
EFI_INVALID_PARAMETERInput parameter is invalid

Definition at line 423 of file BootManagerMenu.c.

◆ DrawBootPopupMenu()

EFI_STATUS DrawBootPopupMenu ( IN BOOT_MENU_POPUP_DATA BootMenuData)

This function uses to draw boot popup menu

Parameters
BootMenuDataThe Input BootMenuData to be processed.
Return values
EFI_SUCCESSDraw boot popup menu successful.

Definition at line 574 of file BootManagerMenu.c.

◆ GetLineWidth()

UINTN GetLineWidth ( IN EFI_STRING_ID  StringId)

Count the storage space of a Unicode string which uses current language to get from input string ID.

Parameters
StringIdThe input string to be counted.
Returns
Storage space for the input string.

Definition at line 147 of file BootManagerMenu.c.

◆ IgnoreBootOption()

BOOLEAN IgnoreBootOption ( IN EFI_BOOT_MANAGER_LOAD_OPTION BootOption)

Return whether to ignore the boot option.

Parameters
BootOptionPointer to EFI_BOOT_MANAGER_LOAD_OPTION to check.
Return values
TRUEIgnore the boot option.
FALSEDo not ignore the boot option.

Definition at line 323 of file BootManagerMenu.c.

◆ InitializeBootMenuData()

EFI_STATUS InitializeBootMenuData ( IN EFI_BOOT_MANAGER_LOAD_OPTION BootOption,
IN UINTN  BootOptionCount,
OUT BOOT_MENU_POPUP_DATA BootMenuData 
)

This function uses to initialize boot menu data

Parameters
BootOptionPointer to EFI_BOOT_MANAGER_LOAD_OPTION array.
BootOptionCountNumber of boot option.
BootMenuDataThe Input BootMenuData to be initialized.
Return values
EFI_SUCCESSInitialize boot menu data successful.
EFI_INVALID_PARAMETERInput parameter is invalid.

Definition at line 368 of file BootManagerMenu.c.

◆ InitializeBootMenuScreen()

EFI_STATUS InitializeBootMenuScreen ( IN OUT BOOT_MENU_POPUP_DATA BootMenuData)

This function uses calculate the boot menu location, size and scroll bar information.

Parameters
BootMenuDataThe boot menu data to be processed.
Returns
EFI_SUCCESS calculate boot menu information successful.
Return values
EFI_INVALID_PARAMETERInput parameter is invalid

Definition at line 216 of file BootManagerMenu.c.

◆ IsBootManagerMenu()

BOOLEAN IsBootManagerMenu ( IN EFI_BOOT_MANAGER_LOAD_OPTION BootOption)

This function uses check boot option is wheher setup application or no

Parameters
BootOptionPointer to EFI_BOOT_MANAGER_LOAD_OPTION array.
Return values
TRUEThis boot option is setup application.
FALSEThis boot options isn't setup application

Definition at line 299 of file BootManagerMenu.c.

◆ PrintCharAt()

UINTN PrintCharAt ( IN UINTN  Column,
IN UINTN  Row,
CHAR16  Character 
)

Prints a character to the default console, at the supplied cursor position, using L"%c" format.

Parameters
ColumnThe cursor position to print the string at.
RowThe cursor position to print the string at.
CharacterCharacter to print.
Returns
Length of string printed to the console.

Definition at line 112 of file BootManagerMenu.c.

◆ PrintStringAt()

UINTN PrintStringAt ( IN UINTN  Column,
IN UINTN  Row,
IN CHAR16 *  String 
)

Prints a unicode string to the default console, at the supplied cursor position, using L"%s" format.

Parameters
ColumnThe cursor position to print the string at.
RowThe cursor position to print the string at
StringString pointer.
Returns
Length of string printed to the console

Definition at line 42 of file BootManagerMenu.c.

Variable Documentation

◆ gStringPackHandle

EFI_HII_HANDLE gStringPackHandle

Definition at line 11 of file BootManagerMenu.c.

◆ mBootHorizontalResolution

UINT32 mBootHorizontalResolution = 0

Definition at line 18 of file BootManagerMenu.c.

◆ mBootTextModeColumn

UINT32 mBootTextModeColumn = 0

Definition at line 20 of file BootManagerMenu.c.

◆ mBootTextModeRow

UINT32 mBootTextModeRow = 0

Definition at line 21 of file BootManagerMenu.c.

◆ mBootVerticalResolution

UINT32 mBootVerticalResolution = 0

Definition at line 19 of file BootManagerMenu.c.

◆ mModeInitialized

BOOLEAN mModeInitialized = FALSE

Definition at line 13 of file BootManagerMenu.c.

◆ mSetupHorizontalResolution

UINT32 mSetupHorizontalResolution = 0

Definition at line 27 of file BootManagerMenu.c.

◆ mSetupTextModeColumn

UINT32 mSetupTextModeColumn = 0

Definition at line 25 of file BootManagerMenu.c.

◆ mSetupTextModeRow

UINT32 mSetupTextModeRow = 0

Definition at line 26 of file BootManagerMenu.c.

◆ mSetupVerticalResolution

UINT32 mSetupVerticalResolution = 0

Definition at line 28 of file BootManagerMenu.c.