TianoCore EDK2 master
|
#include "BootMaintenanceManager.h"
Go to the source code of this file.
Macros | |
#define | FRONT_PAGE_KEY_OFFSET 0x4000 |
Variables | |
UINT32 | mBmmBootHorizontalResolution = 0 |
UINT32 | mBmmBootVerticalResolution = 0 |
UINT32 | mBmmBootTextModeColumn = 0 |
UINT32 | mBmmBootTextModeRow = 0 |
UINT32 | mBmmSetupTextModeColumn = 0 |
UINT32 | mBmmSetupTextModeRow = 0 |
UINT32 | mBmmSetupHorizontalResolution = 0 |
UINT32 | mBmmSetupVerticalResolution = 0 |
BOOLEAN | mBmmModeInitialized = FALSE |
EFI_DEVICE_PATH_PROTOCOL | EndDevicePath [] |
HII_VENDOR_DEVICE_PATH | mBmmHiiVendorDevicePath |
EFI_GUID | mBootMaintGuid = BOOT_MAINT_FORMSET_GUID |
CHAR16 | mBootMaintStorageName [] = L"BmmData" |
BMM_CALLBACK_DATA | gBootMaintenancePrivate |
BMM_CALLBACK_DATA * | mBmmCallbackInfo = &gBootMaintenancePrivate |
BOOLEAN | mAllMenuInit = FALSE |
BOOLEAN | mFirstEnterBMMForm = FALSE |
The functions for Boot Maintainence Main menu.
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BootMaintenance.c.
#define FRONT_PAGE_KEY_OFFSET 0x4000 |
Definition at line 11 of file BootMaintenance.c.
CHAR16 * BmmExtractDevicePathFromHiiHandle | ( | IN EFI_HII_HANDLE | Handle | ) |
Extract device path for given HII handle and class guid.
Handle | The HII handle. |
NULL | Fail to get the device path string. |
Definition at line 422 of file BootMaintenance.c.
VOID BmmInitialBootModeInfo | ( | VOID | ) |
Initial the boot mode related parameters.
Definition at line 1602 of file BootMaintenance.c.
EFI_STATUS BmmSetConsoleMode | ( | BOOLEAN | IsSetupMode | ) |
This function will change video resolution and text mode according to defined setup mode or defined boot mode
IsSetupMode | Indicate mode is changed to setup mode or boot mode. |
EFI_SUCCESS | Mode is changed successfully. |
Others | Mode failed to be changed. |
Definition at line 125 of file BootMaintenance.c.
EFI_STATUS EFIAPI BootMaintCallback | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN EFI_BROWSER_ACTION | Action, | ||
IN EFI_QUESTION_ID | QuestionId, | ||
IN UINT8 | Type, | ||
IN EFI_IFR_TYPE_VALUE * | Value, | ||
OUT EFI_BROWSER_ACTION_REQUEST * | ActionRequest | ||
) |
This function processes the results of changes in configuration.
This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
Action | Specifies the type of action taken by the browser. |
QuestionId | A unique value which is sent to the original exporting driver so that it can identify the type of data to expect. |
Type | The type of value for the question. |
Value | A pointer to the data being sent to the original exporting driver. |
ActionRequest | On return, points to the action requested by the callback function. |
EFI_SUCCESS | The callback successfully handled the action. |
EFI_OUT_OF_RESOURCES | Not enough storage is available to hold the variable and its data. |
EFI_DEVICE_ERROR | The variable could not be saved. |
EFI_UNSUPPORTED | The specified Action is not supported by the callback. |
EFI_INVALID_PARAMETER | The parameter of Value or ActionRequest is invalid. |
Definition at line 1096 of file BootMaintenance.c.
EFI_STATUS EFIAPI BootMaintenanceManagerUiLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Install Boot Maintenance Manager Menu driver.
ImageHandle | The image handle. |
SystemTable | The system table. |
EFI_SUCEESS | Install Boot manager menu success. |
Other | Return error status. |
Definition at line 1681 of file BootMaintenance.c.
EFI_STATUS EFIAPI BootMaintenanceManagerUiLibDestructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Unloads the application and its installed protocol.
ImageHandle | Handle that identifies the image to be unloaded. |
SystemTable | The system table. |
EFI_SUCCESS | The image has been unloaded. |
Definition at line 1770 of file BootMaintenance.c.
EFI_STATUS EFIAPI BootMaintExtractConfig | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN CONST EFI_STRING | Request, | ||
OUT EFI_STRING * | Progress, | ||
OUT EFI_STRING * | Results | ||
) |
This function allows a caller to extract the current configuration for one or more named elements from the target driver.
This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
Request | A null-terminated Unicode string in <ConfigRequest> format. |
Progress | On return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent '&' before the first failing name/value pair (or the beginning of the string if the failure is in the first name/value pair) if the request was not successful. |
Results | A null-terminated Unicode string in <ConfigAltResp> format which has all values filled in for the names in the Request string. String to be allocated by the called function. |
EFI_SUCCESS | The Results is filled with the requested values. |
EFI_OUT_OF_RESOURCES | Not enough memory to store the results. |
EFI_INVALID_PARAMETER | Request is NULL, illegal syntax, or unknown name. |
EFI_NOT_FOUND | Routing data doesn't match any storage in this driver. |
Definition at line 661 of file BootMaintenance.c.
EFI_STATUS EFIAPI BootMaintRouteConfig | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN CONST EFI_STRING | Configuration, | ||
OUT EFI_STRING * | Progress | ||
) |
This function applies changes in a driver's configuration. Input is a Configuration, which has the routing data for this driver followed by name / value configuration pairs. The driver must apply those pairs to its configurable storage. If the driver's configuration is stored in a linear block of data and the driver's name / value pairs are in <BlockConfig> format, it may use the ConfigToBlock helper function (above) to simplify the job. Currently not implemented.
[in] | This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
[in] | Configuration | A null-terminated Unicode string in <ConfigString> format. |
[out] | Progress | A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the beginn ing of the string if the failure is in the first name / value pair) or the terminating NULL if all was successful. |
EFI_SUCCESS | The results have been distributed or are awaiting distribution. |
EFI_OUT_OF_RESOURCES | Not enough memory to store the parts of the results that must be stored awaiting possible future protocols. |
EFI_INVALID_PARAMETERS | Passing in a NULL for the Results parameter would result in this type of error. |
EFI_NOT_FOUND | Target for the specified routing data was not found. |
Definition at line 774 of file BootMaintenance.c.
VOID CleanUselessBeforeSubmit | ( | IN BMM_CALLBACK_DATA * | Private | ) |
This function is to clean some useless data before submit changes.
Private | The BMM context data. |
Definition at line 1410 of file BootMaintenance.c.
VOID CustomizeMenus | ( | VOID | ) |
Update the menus in the BMM page.
Definition at line 1441 of file BootMaintenance.c.
VOID DiscardChangeHandler | ( | IN BMM_CALLBACK_DATA * | Private, |
IN BMM_FAKE_NV_DATA * | CurrentFakeNVMap | ||
) |
Discard all changes done to the BMM pages such as Boot Order change, Driver order change.
Private | The BMM context data. |
CurrentFakeNVMap | The current Fack NV Map. |
Definition at line 1351 of file BootMaintenance.c.
CHAR16 * ExtractFileNameFromDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
Extract filename from device path. The returned buffer is allocated using AllocateCopyPool. The caller is responsible for freeing the allocated buffer using FreePool().
DevicePath | Device path. |
Definition at line 379 of file BootMaintenance.c.
VOID FreeAllMenu | ( | VOID | ) |
Free up all Menu Option list.
Definition at line 1582 of file BootMaintenance.c.
VOID HiiToLower | ( | IN EFI_STRING | ConfigString | ) |
Converts the unicode character of the string from uppercase to lowercase. This is a internal function.
ConfigString | String to be converted |
Definition at line 454 of file BootMaintenance.c.
VOID InitAllMenu | ( | IN BMM_CALLBACK_DATA * | CallbackData | ) |
Init all memu.
CallbackData | The BMM context data. |
Initialized all Menu Option List.
CallbackData | The BMM context data. |
Definition at line 1559 of file BootMaintenance.c.
VOID InitializeBmmConfig | ( | IN BMM_CALLBACK_DATA * | CallbackData | ) |
Create dynamic code for BMM and initialize all of BMM configuration data in BmmFakeNvData and BmmOldFakeNVData member in BMM context data.
CallbackData | The BMM context data. |
Definition at line 1499 of file BootMaintenance.c.
CHAR16 * UiDevicePathToStr | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevPath | ) |
This function converts an input device structure to a Unicode string.
DevPath | A pointer to the device path structure. |
Definition at line 342 of file BootMaintenance.c.
VOID UpdateConsoleContent | ( | IN CHAR16 * | ConsoleName, |
IN BMM_FAKE_NV_DATA * | BmmData | ||
) |
Update the console content in ConsoleMenu.
ConsoleName | The name for the console device type. |
BmmData | The BMM fake NV data. |
Definition at line 579 of file BootMaintenance.c.
Update the progress string through the offset value.
Offset | The offset value |
Configuration | Point to the configuration string. |
Definition at line 485 of file BootMaintenance.c.
VOID UpdateTerminalContent | ( | IN BMM_FAKE_NV_DATA * | BmmData | ) |
Update the terminal content in TerminalMenu.
BmmData | The BMM fake NV data. |
Definition at line 538 of file BootMaintenance.c.
EFI_DEVICE_PATH_PROTOCOL EndDevicePath[] |
Definition at line 29 of file BootMaintenance.c.
BMM_CALLBACK_DATA gBootMaintenancePrivate |
Definition at line 69 of file BootMaintenance.c.
BOOLEAN mAllMenuInit = FALSE |
Definition at line 81 of file BootMaintenance.c.
UINT32 mBmmBootHorizontalResolution = 0 |
Definition at line 15 of file BootMaintenance.c.
UINT32 mBmmBootTextModeColumn = 0 |
Definition at line 17 of file BootMaintenance.c.
UINT32 mBmmBootTextModeRow = 0 |
Definition at line 18 of file BootMaintenance.c.
UINT32 mBmmBootVerticalResolution = 0 |
Definition at line 16 of file BootMaintenance.c.
BMM_CALLBACK_DATA* mBmmCallbackInfo = &gBootMaintenancePrivate |
Definition at line 80 of file BootMaintenance.c.
HII_VENDOR_DEVICE_PATH mBmmHiiVendorDevicePath |
Definition at line 40 of file BootMaintenance.c.
BOOLEAN mBmmModeInitialized = FALSE |
Definition at line 27 of file BootMaintenance.c.
UINT32 mBmmSetupHorizontalResolution = 0 |
Definition at line 24 of file BootMaintenance.c.
UINT32 mBmmSetupTextModeColumn = 0 |
Definition at line 22 of file BootMaintenance.c.
UINT32 mBmmSetupTextModeRow = 0 |
Definition at line 23 of file BootMaintenance.c.
UINT32 mBmmSetupVerticalResolution = 0 |
Definition at line 25 of file BootMaintenance.c.
EFI_GUID mBootMaintGuid = BOOT_MAINT_FORMSET_GUID |
Definition at line 66 of file BootMaintenance.c.
CHAR16 mBootMaintStorageName[] = L"BmmData" |
Definition at line 68 of file BootMaintenance.c.
BOOLEAN mFirstEnterBMMForm = FALSE |
Definition at line 82 of file BootMaintenance.c.