TianoCore EDK2 master
Loading...
Searching...
No Matches
Variable.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS Var_DelBootOption (VOID)
 
EFI_STATUS Var_DelDriverOption (VOID)
 
EFI_STATUS Var_UpdateConsoleOption (IN UINT16 *ConsoleName, IN BM_MENU_OPTION *ConsoleMenu, IN UINT16 UpdatePageId)
 
EFI_STATUS Var_UpdateConsoleInpOption (VOID)
 
EFI_STATUS Var_UpdateConsoleOutOption (VOID)
 
EFI_STATUS Var_UpdateErrorOutOption (VOID)
 
EFI_STATUS Var_UpdateDriverOption (IN BMM_CALLBACK_DATA *CallbackData, IN EFI_HII_HANDLE HiiHandle, IN UINT16 *DescriptionData, IN UINT16 *OptionalData, IN UINT8 ForceReconnect)
 
EFI_STATUS Var_UpdateBootOption (IN BMM_CALLBACK_DATA *CallbackData)
 
EFI_STATUS Var_UpdateBootNext (IN BMM_CALLBACK_DATA *CallbackData)
 
EFI_STATUS Var_UpdateBootOrder (IN BMM_CALLBACK_DATA *CallbackData)
 
EFI_STATUS Var_UpdateDriverOrder (IN BMM_CALLBACK_DATA *CallbackData)
 
EFI_STATUS Var_UpdateConMode (IN BMM_CALLBACK_DATA *CallbackData)
 

Detailed Description

Variable operation that will be used by bootmaint

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

Definition in file Variable.c.

Function Documentation

◆ Var_DelBootOption()

EFI_STATUS Var_DelBootOption ( VOID  )

Delete Boot Option that represent a Deleted state in BootOptionMenu.

Return values
EFI_SUCCESSIf all boot load option EFI Variables corresponding to BM_LOAD_CONTEXT marked for deletion is deleted.
EFI_NOT_FOUNDIf can not find the boot option want to be deleted.
Returns
Others If failed to update the "BootOrder" variable after deletion.

Definition at line 21 of file Variable.c.

◆ Var_DelDriverOption()

EFI_STATUS Var_DelDriverOption ( VOID  )

Delete Load Option that represent a Deleted state in DriverOptionMenu.

Return values
EFI_SUCCESSLoad Option is successfully updated.
EFI_NOT_FOUNDFail to find the driver option want to be deleted.
Returns
Other value than EFI_SUCCESS if failed to update "Driver Order" EFI Variable.

Definition at line 78 of file Variable.c.

◆ Var_UpdateBootNext()

EFI_STATUS Var_UpdateBootNext ( IN BMM_CALLBACK_DATA CallbackData)

This function update the "BootNext" EFI Variable. If there is no "BootNext" specified in BMM, this EFI Variable is deleted. It also update the BMM context data specified the "BootNext" vaule.

Parameters
CallbackDataThe BMM context data.
Return values
EFI_SUCCESSThe function complete successfully.
Returns
The EFI variable can be saved. See gRT->SetVariable for detail return information.

Definition at line 533 of file Variable.c.

◆ Var_UpdateBootOption()

EFI_STATUS Var_UpdateBootOption ( IN BMM_CALLBACK_DATA CallbackData)

This function create a currently loaded Boot Option from the BMM. It then appends this Boot Option to the end of the "BootOrder" list. It also append this Boot Opotion to the end of BootOptionMenu.

Parameters
CallbackDataThe BMM context data.
Return values
otherContain some errors when excuting this function. See function EfiBootManagerInitializeLoadOption/EfiBootManagerAddLoadOptionVariabl for detail return information.
EFI_SUCCESSIf function completes successfully.

Definition at line 414 of file Variable.c.

◆ Var_UpdateBootOrder()

EFI_STATUS Var_UpdateBootOrder ( IN BMM_CALLBACK_DATA CallbackData)

This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh BootOptionMenu with the new "BootOrder" list.

Parameters
CallbackDataThe BMM context data.
Return values
EFI_SUCCESSThe function complete successfully.
EFI_OUT_OF_RESOURCESNot enough memory to complete the function.
Returns
The EFI variable can not be saved. See gRT->SetVariable for detail return information.

Definition at line 590 of file Variable.c.

◆ Var_UpdateConMode()

EFI_STATUS Var_UpdateConMode ( IN BMM_CALLBACK_DATA CallbackData)

Update the Text Mode of Console.

Parameters
CallbackDataThe context data for BMM.
Return values
EFI_SUCCSSIf the Text Mode of Console is updated.
Returns
Other value if the Text Mode of Console is not updated.

Definition at line 714 of file Variable.c.

◆ Var_UpdateConsoleInpOption()

EFI_STATUS Var_UpdateConsoleInpOption ( VOID  )

This function delete and build multi-instance device path ConIn console device.

Return values
EFI_SUCCESSThe function complete successfully.
Returns
The EFI variable can not be saved. See gRT->SetVariable for detail return information.

Definition at line 233 of file Variable.c.

◆ Var_UpdateConsoleOption()

EFI_STATUS Var_UpdateConsoleOption ( IN UINT16 *  ConsoleName,
IN BM_MENU_OPTION ConsoleMenu,
IN UINT16  UpdatePageId 
)

This function delete and build multi-instance device path for specified type of console device.

This function clear the EFI variable defined by ConsoleName and gEfiGlobalVariableGuid. It then build the multi-instance device path by appending the device path of the Console (In/Out/Err) instance in ConsoleMenu. Then it scan all corresponding console device by scanning Terminal (built from device supporting Serial I/O instances) devices in TerminalMenu. At last, it save a EFI variable specifed by ConsoleName and gEfiGlobalVariableGuid.

Parameters
ConsoleNameThe name for the console device type. They are usually "ConIn", "ConOut" and "ErrOut".
ConsoleMenuThe console memu which is a list of console devices.
UpdatePageIdThe flag specifying which type of console device to be processed.
Return values
EFI_SUCCESSThe function complete successfully.
Returns
The EFI variable can not be saved. See gRT->SetVariable for detail return information.

Definition at line 140 of file Variable.c.

◆ Var_UpdateConsoleOutOption()

EFI_STATUS Var_UpdateConsoleOutOption ( VOID  )

This function delete and build multi-instance device path ConOut console device.

Return values
EFI_SUCCESSThe function complete successfully.
Returns
The EFI variable can not be saved. See gRT->SetVariable for detail return information.

Definition at line 248 of file Variable.c.

◆ Var_UpdateDriverOption()

EFI_STATUS Var_UpdateDriverOption ( IN BMM_CALLBACK_DATA CallbackData,
IN EFI_HII_HANDLE  HiiHandle,
IN UINT16 *  DescriptionData,
IN UINT16 *  OptionalData,
IN UINT8  ForceReconnect 
)

This function create a currently loaded Drive Option from the BMM. It then appends this Driver Option to the end of the "DriverOrder" list. It append this Driver Opotion to the end of DriverOptionMenu.

Parameters
CallbackDataThe BMM context data.
HiiHandleThe HII handle associated with the BMM formset.
DescriptionDataThe description of this driver option.
OptionalDataThe optional load option.
ForceReconnectIf to force reconnect.
Return values
otherContain some errors when excuting this function.See function EfiBootManagerInitializeLoadOption/EfiBootManagerAddLoadOptionVariabl for detail return information.
EFI_SUCCESSIf function completes successfully.

Definition at line 289 of file Variable.c.

◆ Var_UpdateDriverOrder()

EFI_STATUS Var_UpdateDriverOrder ( IN BMM_CALLBACK_DATA CallbackData)

This function update the "DriverOrder" EFI Variable based on BMM Formset's NV map. It then refresh DriverOptionMenu with the new "DriverOrder" list.

Parameters
CallbackDataThe BMM context data.
Return values
EFI_SUCCESSThe function complete successfully.
EFI_OUT_OF_RESOURCESNot enough memory to complete the function.
Returns
The EFI variable can not be saved. See gRT->SetVariable for detail return information.

Definition at line 652 of file Variable.c.

◆ Var_UpdateErrorOutOption()

EFI_STATUS Var_UpdateErrorOutOption ( VOID  )

This function delete and build multi-instance device path ErrOut console device.

Return values
EFI_SUCCESSThe function complete successfully.
Returns
The EFI variable can not be saved. See gRT->SetVariable for detail return information.

Definition at line 263 of file Variable.c.