summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf5
-rw-r--r--MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c49
-rw-r--r--MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h5
-rw-r--r--MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c4
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c570
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h29
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c6
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.c5
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c106
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c207
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.h5
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.c4
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c33
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf5
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.unibin2070 -> 2588 bytes
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c19
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf5
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.unibin2508 -> 3018 bytes
18 files changed, 670 insertions, 387 deletions
diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
index 2eba9d4263..c761f609b9 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
@@ -64,10 +64,12 @@
DebugAgentLib
LockBoxLib
CpuExceptionHandlerLib
+ DevicePathLib
[Guids]
gEfiBootScriptExecutorVariableGuid ## PRODUCES ## UNDEFINED # SaveLockBox
gEfiBootScriptExecutorContextGuid ## PRODUCES ## UNDEFINED # SaveLockBox
+ gEdkiiMemoryProfileGuid ## SOMETIMES_CONSUMES ## GUID # Locate protocol
[Protocols]
## NOTIFY
@@ -78,7 +80,8 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode ## CONSUMES
[Pcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## SOMETIMES_CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ## SOMETIMES_CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMemoryProfilePropertyMask ## CONSUMES
[Depex]
gEfiLockBoxProtocolGuid
diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
index 6c1c304a15..3fbdf5cd83 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c
@@ -209,6 +209,47 @@ S3BootScriptExecutorEntryFunction (
}
/**
+ Register image to memory profile.
+
+ @param FileName File name of the image.
+ @param ImageBase Image base address.
+ @param ImageSize Image size.
+ @param FileType File type of the image.
+
+**/
+VOID
+RegisterMemoryProfileImage (
+ IN EFI_GUID *FileName,
+ IN PHYSICAL_ADDRESS ImageBase,
+ IN UINT64 ImageSize,
+ IN EFI_FV_FILETYPE FileType
+ )
+{
+ EFI_STATUS Status;
+ EDKII_MEMORY_PROFILE_PROTOCOL *ProfileProtocol;
+ MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FilePath;
+ UINT8 TempBuffer[sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH) + sizeof (EFI_DEVICE_PATH_PROTOCOL)];
+
+ if ((PcdGet8 (PcdMemoryProfilePropertyMask) & BIT0) != 0) {
+
+ FilePath = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)TempBuffer;
+ Status = gBS->LocateProtocol (&gEdkiiMemoryProfileGuid, NULL, (VOID **) &ProfileProtocol);
+ if (!EFI_ERROR (Status)) {
+ EfiInitializeFwVolDevicepathNode (FilePath, FileName);
+ SetDevicePathEndNode (FilePath + 1);
+
+ Status = ProfileProtocol->RegisterImage (
+ ProfileProtocol,
+ (EFI_DEVICE_PATH_PROTOCOL *) FilePath,
+ ImageBase,
+ ImageSize,
+ FileType
+ );
+ }
+ }
+}
+
+/**
This is the Event notification function to reload BootScriptExecutor image
to RESERVED mem and save it to LockBox.
@@ -302,6 +343,14 @@ ReadyToLockEventNotify (
// Flush the instruction cache so the image data is written before we execute it
//
InvalidateInstructionCacheRange ((VOID *)(UINTN)ImageContext.ImageAddress, (UINTN)ImageContext.ImageSize);
+
+ RegisterMemoryProfileImage (
+ &gEfiCallerIdGuid,
+ ImageContext.ImageAddress,
+ ImageContext.ImageSize,
+ EFI_FV_FILETYPE_DRIVER
+ );
+
Status = ((EFI_IMAGE_ENTRY_POINT)(UINTN)(ImageContext.EntryPoint)) (NewImageHandle, gST);
ASSERT_EFI_ERROR (Status);
diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h
index a3522905a8..772347a57e 100644
--- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h
+++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h
@@ -4,7 +4,7 @@
This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory
in the entry point. The functionality is to interpret and restore the S3 boot script
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -36,9 +36,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DebugAgentLib.h>
#include <Library/LockBoxLib.h>
#include <Library/CpuExceptionHandlerLib.h>
+#include <Library/DevicePathLib.h>
#include <Guid/AcpiS3Context.h>
#include <Guid/BootScriptExecutorVariable.h>
+#include <Guid/MemoryProfile.h>
+
#include <Protocol/DxeSmmReadyToLock.h>
#include <IndustryStandard/Acpi.h>
/**
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
index a35b4f2d0d..4b0159c4fa 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
@@ -11,6 +11,7 @@
always on the first sector of a media. The first sector also contains
the legacy boot strap code.
+Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -74,6 +75,9 @@ PartitionValidMbr (
// return FALSE since no block devices on a system are implemented
// with INT 13h
//
+
+ DEBUG((EFI_D_INFO, "PartitionValidMbr: Bad MBR partition size EndingLBA(%1x) > LastLBA(%1x)\n", EndingLBA, LastLba));
+
return FALSE;
}
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
index 4be8a96464..cdfd383a47 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c
@@ -98,8 +98,7 @@ EFI_GUID gDisplayEngineGuid = {
0xE38C1029, 0xE38F, 0x45b9, {0x8F, 0x0D, 0xE2, 0xE6, 0x0B, 0xC9, 0xB2, 0x62}
};
-FORM_ENTRY_INFO gFormEntryInfo;
-UINTN gSequence;
+BOOLEAN gMisMatch;
EFI_SCREEN_DESCRIPTOR gStatementDimensions;
BOOLEAN mStatementLayoutIsChanged = TRUE;
USER_INPUT *gUserInput;
@@ -1475,6 +1474,238 @@ FindTopOfScreenMenu (
}
/**
+ Get the index info for this opcode.
+
+ @param OpCode The input opcode for the statement.
+
+ @retval The index of this statement.
+
+**/
+UINTN
+GetIndexInfoForOpcode (
+ IN EFI_IFR_OP_HEADER *OpCode
+ )
+{
+ LIST_ENTRY *NewPos;
+ UI_MENU_OPTION *MenuOption;
+ UINTN Index;
+
+ NewPos = gMenuOption.ForwardLink;
+ Index = 0;
+
+ for (NewPos = gMenuOption.ForwardLink; NewPos != &gMenuOption; NewPos = NewPos->ForwardLink){
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+
+ if (CompareMem (MenuOption->ThisTag->OpCode, OpCode, OpCode->Length) == 0) {
+ if (MenuOption->ThisTag->OpCode == OpCode) {
+ return Index;
+ }
+
+ Index ++;
+ }
+ }
+
+ return Index;
+}
+
+/**
+ Is this the saved highlight statement.
+
+ @param HighLightedStatement The input highlight statement.
+
+ @retval TRUE This is the highlight statement.
+ @retval FALSE This is not the highlight statement.
+
+**/
+BOOLEAN
+IsSavedHighlightStatement (
+ IN FORM_DISPLAY_ENGINE_STATEMENT *HighLightedStatement
+ )
+{
+ if ((gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle) &&
+ (gFormData->FormId == gHighligthMenuInfo.FormId)) {
+ if (gHighligthMenuInfo.HLTQuestionId != 0) {
+ return (BOOLEAN) (gHighligthMenuInfo.HLTQuestionId == GetQuestionIdInfo (HighLightedStatement->OpCode));
+ } else {
+ if (CompareMem (gHighligthMenuInfo.HLTOpCode, HighLightedStatement->OpCode, gHighligthMenuInfo.HLTOpCode->Length) == 0) {
+ if (gHighligthMenuInfo.HLTIndex == 0 || gHighligthMenuInfo.HLTIndex == GetIndexInfoForOpcode(HighLightedStatement->OpCode)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+/**
+ Is this the highlight menu.
+
+ @param MenuOption The input Menu option.
+
+ @retval TRUE This is the highlight menu option.
+ @retval FALSE This is not the highlight menu option.
+
+**/
+BOOLEAN
+IsHighLightMenuOption (
+ IN UI_MENU_OPTION *MenuOption
+ )
+{
+ if (gHighligthMenuInfo.HLTQuestionId != 0) {
+ if (GetQuestionIdInfo(MenuOption->ThisTag->OpCode) == gHighligthMenuInfo.HLTQuestionId) {
+ return (BOOLEAN) (MenuOption->Sequence == gHighligthMenuInfo.HLTSequence);
+ }
+ } else {
+ if(CompareMem (gHighligthMenuInfo.HLTOpCode, MenuOption->ThisTag->OpCode, gHighligthMenuInfo.HLTOpCode->Length) == 0) {
+ if (gHighligthMenuInfo.HLTIndex == 0 || gHighligthMenuInfo.HLTIndex == GetIndexInfoForOpcode(MenuOption->ThisTag->OpCode)) {
+ return (BOOLEAN) (MenuOption->Sequence == gHighligthMenuInfo.HLTSequence);
+ } else {
+ return FALSE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+/**
+ Find the highlight menu.
+
+ If the input is NULL, base on the record highlight info in
+ gHighligthMenuInfo to find the last highlight menu.
+
+ @param HighLightedStatement The input highlight statement.
+
+ @retval The highlight menu index.
+
+**/
+LIST_ENTRY *
+FindHighLightMenuOption (
+ IN FORM_DISPLAY_ENGINE_STATEMENT *HighLightedStatement
+ )
+{
+ LIST_ENTRY *NewPos;
+ UI_MENU_OPTION *MenuOption;
+
+ NewPos = gMenuOption.ForwardLink;
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+
+ if (HighLightedStatement != NULL) {
+ while (MenuOption->ThisTag != HighLightedStatement) {
+ NewPos = NewPos->ForwardLink;
+ if (NewPos == &gMenuOption) {
+ //
+ // Not Found it, break
+ //
+ break;
+ }
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ }
+
+ //
+ // Must find the highlight statement.
+ //
+ ASSERT (NewPos != &gMenuOption);
+
+ } else {
+ while (!IsHighLightMenuOption (MenuOption)) {
+ NewPos = NewPos->ForwardLink;
+ if (NewPos == &gMenuOption) {
+ //
+ // Not Found it, break
+ //
+ break;
+ }
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ }
+
+ //
+ // Highlight statement has disappear (suppressed/disableed)
+ //
+ if (NewPos == &gMenuOption) {
+ NewPos = NULL;
+ }
+ }
+
+ return NewPos;
+}
+
+/**
+ Is this the Top of screen menu.
+
+ @param MenuOption The input Menu option.
+
+ @retval TRUE This is the Top of screen menu option.
+ @retval FALSE This is not the Top of screen menu option.
+
+**/
+BOOLEAN
+IsTopOfScreeMenuOption (
+ IN UI_MENU_OPTION *MenuOption
+ )
+{
+ if (gHighligthMenuInfo.TOSQuestionId != 0) {
+ return (BOOLEAN) (GetQuestionIdInfo(MenuOption->ThisTag->OpCode) == gHighligthMenuInfo.TOSQuestionId);
+ }
+
+ if(CompareMem (gHighligthMenuInfo.TOSOpCode, MenuOption->ThisTag->OpCode, gHighligthMenuInfo.TOSOpCode->Length) == 0) {
+ if (gHighligthMenuInfo.TOSIndex == 0 || gHighligthMenuInfo.TOSIndex == GetIndexInfoForOpcode(MenuOption->ThisTag->OpCode)) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+ }
+
+ return FALSE;
+}
+
+/**
+ Find the Top of screen menu.
+
+ If the input is NULL, base on the record highlight info in
+ gHighligthMenuInfo to find the last highlight menu.
+
+ @param HighLightedStatement The input highlight statement.
+
+ @retval The highlight menu index.
+
+**/
+LIST_ENTRY *
+FindTopOfScreenMenuOption (
+ VOID
+ )
+{
+ LIST_ENTRY *NewPos;
+ UI_MENU_OPTION *MenuOption;
+
+ NewPos = gMenuOption.ForwardLink;
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+
+ while (!IsTopOfScreeMenuOption(MenuOption)) {
+ NewPos = NewPos->ForwardLink;
+ if (NewPos == &gMenuOption) {
+ //
+ // Not Found it, break
+ //
+ break;
+ }
+ MenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ }
+
+ //
+ // Last time top of screen menu has disappeared.
+ //
+ if (NewPos == &gMenuOption) {
+ NewPos = NULL;
+ }
+
+ return NewPos;
+}
+
+/**
Find the first menu which will be show at the top.
@param FormData The data info for this form.
@@ -1491,160 +1722,223 @@ FindTopMenu (
OUT UINTN *SkipValue
)
{
- LIST_ENTRY *NewPos;
UINTN TopRow;
UINTN BottomRow;
- UI_MENU_OPTION *SavedMenuOption;
+ UI_MENU_OPTION *MenuOption;
UINTN TmpValue;
- TmpValue = 0;
TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT;
BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT;
- //
- // If not has input highlight statement, just return the first one in this form.
- //
- if (FormData->HighLightedStatement == NULL) {
- *TopOfScreen = gMenuOption.ForwardLink;
- *HighlightMenu = gMenuOption.ForwardLink;
- if (!IsListEmpty (&gMenuOption)) {
- MoveToNextStatement (FALSE, HighlightMenu, BottomRow - TopRow, TRUE);
- }
- *SkipValue = 0;
- return;
- }
-
- //
- // Now base on the input highlight menu to find the top menu in this page.
- // Will base on the highlight menu show at the bottom to find the top menu.
- //
- NewPos = gMenuOption.ForwardLink;
- SavedMenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ if (gMisMatch) {
+ //
+ // Reenter caused by option mismatch or auto exit caused by refresh form(refresh interval/guid),
+ // base on the record highlight info to find the highlight menu.
+ //
+ ASSERT (gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle &&
+ gFormData->FormId == gHighligthMenuInfo.FormId);
- while ((SavedMenuOption->ThisTag != FormData->HighLightedStatement) ||
- (SavedMenuOption->Sequence != gSequence)) {
- NewPos = NewPos->ForwardLink;
- if (NewPos == &gMenuOption) {
+ *HighlightMenu = FindHighLightMenuOption(NULL);
+ if (*HighlightMenu != NULL) {
//
- // Not Found it, break
+ // Update skip info for this highlight menu.
//
- break;
- }
- SavedMenuOption = MENU_OPTION_FROM_LINK (NewPos);
- }
- ASSERT (SavedMenuOption->ThisTag == FormData->HighLightedStatement);
+ MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu);
+ UpdateOptionSkipLines (MenuOption);
- *HighlightMenu = NewPos;
-
- AdjustDateAndTimePosition(FALSE, &NewPos);
- SavedMenuOption = MENU_OPTION_FROM_LINK (NewPos);
- UpdateOptionSkipLines (SavedMenuOption);
+ //
+ // Found the last time highlight menu.
+ //
+ *TopOfScreen = FindTopOfScreenMenuOption();
+ if (*TopOfScreen != NULL) {
+ //
+ // Found the last time selectable top of screen menu.
+ //
+ AdjustDateAndTimePosition(TRUE, TopOfScreen);
+ MenuOption = MENU_OPTION_FROM_LINK (*TopOfScreen);
+ UpdateOptionSkipLines (MenuOption);
- //
- // FormRefreshEvent != NULL means this form will auto exit at an interval, display engine
- // will try to keep highlight on the current position after this form exit and re-enter.
- //
- // HiiHandle + QuestionId can find the only one question in the system.
- //
- // If this question has question id, save the question id info to find the question.
- // else save the opcode buffer to find it.
- //
- if (gFormData->FormRefreshEvent != NULL && gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle) {
- if (gHighligthMenuInfo.QuestionId != 0) {
- if (gHighligthMenuInfo.QuestionId == GetQuestionIdInfo(SavedMenuOption->ThisTag->OpCode)) {
- BottomRow = gHighligthMenuInfo.DisplayRow + SavedMenuOption->Skip;
+ *SkipValue = gHighligthMenuInfo.SkipValue;
+ } else {
//
- // SkipValue only used for menu at the top of the form.
- // If Highlight menu is not at the top, this value will be update later.
+ // Not found last time top of screen menu, so base on current highlight menu
+ // to find the new top of screen menu.
+ // Make the current highlight menu at the bottom of the form to calculate the
+ // top of screen menu.
//
- TmpValue = gHighligthMenuInfo.SkipValue;
+ if (MenuOption->Skip >= BottomRow - TopRow) {
+ *TopOfScreen = *HighlightMenu;
+ TmpValue = 0;
+ } else {
+ *TopOfScreen = FindTopOfScreenMenu(*HighlightMenu, BottomRow - TopRow - MenuOption->Skip, &TmpValue);
+ }
+
+ *SkipValue = TmpValue;
}
- } else if (gHighligthMenuInfo.OpCode != NULL){
- if (!CompareMem (gHighligthMenuInfo.OpCode, SavedMenuOption->ThisTag->OpCode, gHighligthMenuInfo.OpCode->Length)) {
- BottomRow = gHighligthMenuInfo.DisplayRow + SavedMenuOption->Skip;
+ } else {
+ //
+ // Last time highlight menu has disappear, find the first highlightable menu as the defalut one.
+ //
+ *HighlightMenu = gMenuOption.ForwardLink;
+ if (!IsListEmpty (&gMenuOption)) {
+ MoveToNextStatement (FALSE, HighlightMenu, BottomRow - TopRow, TRUE);
+ }
+ *TopOfScreen = gMenuOption.ForwardLink;
+ *SkipValue = 0;
+ }
+
+ gMisMatch = FALSE;
+ } else if (FormData->HighLightedStatement != NULL) {
+ if (IsSavedHighlightStatement (FormData->HighLightedStatement)) {
+ //
+ // Input highlight menu is same as last time highlight menu.
+ // Base on last time highlight menu to set the top of screen menu and highlight menu.
+ //
+ *HighlightMenu = FindHighLightMenuOption(NULL);
+ ASSERT (*HighlightMenu != NULL);
+
+ //
+ // Update skip info for this highlight menu.
+ //
+ MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu);
+ UpdateOptionSkipLines (MenuOption);
+
+ *TopOfScreen = FindTopOfScreenMenuOption();
+ if (*TopOfScreen == NULL) {
//
- // SkipValue only used for menu at the top of the form.
- // If Highlight menu is not at the top, this value will be update later.
+ // Not found last time top of screen menu, so base on current highlight menu
+ // to find the new top of screen menu.
+ // Make the current highlight menu at the bottom of the form to calculate the
+ // top of screen menu.
//
- TmpValue = gHighligthMenuInfo.SkipValue;
+ if (MenuOption->Skip >= BottomRow - TopRow) {
+ *TopOfScreen = *HighlightMenu;
+ TmpValue = 0;
+ } else {
+ *TopOfScreen = FindTopOfScreenMenu(*HighlightMenu, BottomRow - TopRow - MenuOption->Skip, &TmpValue);
+ }
+
+ *SkipValue = TmpValue;
+ } else {
+ AdjustDateAndTimePosition(TRUE, TopOfScreen);
+ MenuOption = MENU_OPTION_FROM_LINK (*TopOfScreen);
+ UpdateOptionSkipLines (MenuOption);
+
+ *SkipValue = gHighligthMenuInfo.SkipValue;
}
- }
- }
+ AdjustDateAndTimePosition(TRUE, TopOfScreen);
+ } else {
+ //
+ // Input highlight menu is not save as last time highlight menu.
+ //
+ *HighlightMenu = FindHighLightMenuOption(FormData->HighLightedStatement);
+ MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu);
+ UpdateOptionSkipLines (MenuOption);
- if (SavedMenuOption->Skip >= BottomRow - TopRow) {
- *TopOfScreen = NewPos;
+ //
+ // Make the current highlight menu at the bottom of the form to calculate the
+ // top of screen menu.
+ //
+ if (MenuOption->Skip >= BottomRow - TopRow) {
+ *TopOfScreen = *HighlightMenu;
+ TmpValue = 0;
+ } else {
+ *TopOfScreen = FindTopOfScreenMenu(*HighlightMenu, BottomRow - TopRow - MenuOption->Skip, &TmpValue);
+ }
+
+ *SkipValue = TmpValue;
+ }
+ AdjustDateAndTimePosition(TRUE, TopOfScreen);
} else {
- *TopOfScreen = FindTopOfScreenMenu(NewPos, BottomRow - TopRow - SavedMenuOption->Skip, &TmpValue);
+ //
+ // If not has input highlight statement, just return the first one in this form.
+ //
+ *TopOfScreen = gMenuOption.ForwardLink;
+ *HighlightMenu = gMenuOption.ForwardLink;
+ if (!IsListEmpty (&gMenuOption)) {
+ MoveToNextStatement (FALSE, HighlightMenu, BottomRow - TopRow, TRUE);
+ }
+ *SkipValue = 0;
}
- AdjustDateAndTimePosition(TRUE, TopOfScreen);
-
- *SkipValue = TmpValue;
}
/**
- Update highlight menu info.
+ Record the highlight menu and top of screen menu info.
- @param MenuOption The menu opton which is highlight.
- @param SkipValue The skipvalue info for this menu.
- SkipValue only used for the menu at the top of the form.
+ @param Highlight The menu opton which is highlight.
+ @param TopOfScreen The menu opton which is at the top of the form.
+ @param SkipValue The skip line info for the top of screen menu.
**/
VOID
UpdateHighlightMenuInfo (
- IN UI_MENU_OPTION *MenuOption,
- IN UINTN SkipValue
+ IN LIST_ENTRY *Highlight,
+ IN LIST_ENTRY *TopOfScreen,
+ IN UINTN SkipValue
)
{
+ UI_MENU_OPTION *MenuOption;
FORM_DISPLAY_ENGINE_STATEMENT *Statement;
- //
- // This is the current selected statement
- //
- Statement = MenuOption->ThisTag;
+ gHighligthMenuInfo.HiiHandle = gFormData->HiiHandle;
+ gHighligthMenuInfo.FormId = gFormData->FormId;
+ gHighligthMenuInfo.SkipValue = (UINT16)SkipValue;
- //
- // Get the highlight statement.
- //
- gUserInput->SelectedStatement = Statement;
- gSequence = (UINT16) MenuOption->Sequence;
+ if (!IsListEmpty (&gMenuOption)) {
+ MenuOption = MENU_OPTION_FROM_LINK (Highlight);
+ Statement = MenuOption->ThisTag;
- //
- // FormRefreshEvent != NULL means this form will auto exit at an interval, display engine
- // will try to keep highlight on the current position after this form exit and re-enter.
- //
- // HiiHandle + QuestionId can find the only one question in the system.
- //
- // If this question has question id, base on the question id info to find the question.
- // else base on the opcode buffer to find it.
- //
- if (gFormData->FormRefreshEvent != NULL) {
- gHighligthMenuInfo.HiiHandle = gFormData->HiiHandle;
- gHighligthMenuInfo.QuestionId = GetQuestionIdInfo(Statement->OpCode);
+ gUserInput->SelectedStatement = Statement;
- //
- // if question id == 0, save the opcode buffer for later use.
- //
- if (gHighligthMenuInfo.QuestionId == 0) {
- if (gHighligthMenuInfo.OpCode != NULL) {
- FreePool (gHighligthMenuInfo.OpCode);
+ gHighligthMenuInfo.HLTSequence = MenuOption->Sequence;
+ gHighligthMenuInfo.HLTQuestionId = GetQuestionIdInfo(Statement->OpCode);
+ if (gHighligthMenuInfo.HLTQuestionId == 0) {
+ //
+ // if question id == 0, save the opcode buffer..
+ //
+ if (gHighligthMenuInfo.HLTOpCode != NULL) {
+ FreePool (gHighligthMenuInfo.HLTOpCode);
}
- gHighligthMenuInfo.OpCode = AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
- ASSERT (gHighligthMenuInfo.OpCode != NULL);
+ gHighligthMenuInfo.HLTOpCode = AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
+ ASSERT (gHighligthMenuInfo.HLTOpCode != NULL);
+
+ gHighligthMenuInfo.HLTIndex = GetIndexInfoForOpcode(Statement->OpCode);
+ }
+
+ MenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);
+ Statement = MenuOption->ThisTag;
+
+ gHighligthMenuInfo.TOSQuestionId = GetQuestionIdInfo(Statement->OpCode);
+ if (gHighligthMenuInfo.TOSQuestionId == 0) {
+ //
+ // if question id == 0, save the opcode buffer..
+ //
+ if (gHighligthMenuInfo.TOSOpCode != NULL) {
+ FreePool (gHighligthMenuInfo.TOSOpCode);
+ }
+ gHighligthMenuInfo.TOSOpCode = AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
+ ASSERT (gHighligthMenuInfo.TOSOpCode != NULL);
+
+ gHighligthMenuInfo.TOSIndex = GetIndexInfoForOpcode(Statement->OpCode);
}
- gHighligthMenuInfo.DisplayRow = (UINT16) MenuOption->Row;
- gHighligthMenuInfo.SkipValue = (UINT16) SkipValue;
} else {
- gHighligthMenuInfo.HiiHandle = NULL;
- gHighligthMenuInfo.QuestionId = 0;
- if (gHighligthMenuInfo.OpCode != NULL) {
- FreePool (gHighligthMenuInfo.OpCode);
- gHighligthMenuInfo.OpCode = NULL;
+ gUserInput->SelectedStatement = NULL;
+
+ gHighligthMenuInfo.HLTSequence = 0;
+ gHighligthMenuInfo.HLTQuestionId = 0;
+ if (gHighligthMenuInfo.HLTOpCode != NULL) {
+ FreePool (gHighligthMenuInfo.HLTOpCode);
}
- gHighligthMenuInfo.DisplayRow = 0;
- gHighligthMenuInfo.SkipValue = 0;
- }
+ gHighligthMenuInfo.HLTOpCode = NULL;
+ gHighligthMenuInfo.HLTIndex = 0;
- RefreshKeyHelp(gFormData, Statement, FALSE);
+ gHighligthMenuInfo.TOSQuestionId = 0;
+ if (gHighligthMenuInfo.TOSOpCode != NULL) {
+ FreePool (gHighligthMenuInfo.TOSOpCode);
+ }
+ gHighligthMenuInfo.TOSOpCode = NULL;
+ gHighligthMenuInfo.TOSIndex = 0;
+ }
}
/**
@@ -2128,6 +2422,10 @@ UiDisplayMenu (
}
FindTopMenu(FormData, &TopOfScreen, &NewPos, &SkipValue);
+ if (!IsListEmpty (&gMenuOption)) {
+ NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);
+ gUserInput->SelectedStatement = NextMenuOption->ThisTag;
+ }
gST->ConOut->EnableCursor (gST->ConOut, FALSE);
@@ -2233,7 +2531,11 @@ UiDisplayMenu (
}
if (EFI_ERROR (Status)) {
- return Status;
+ if (gMisMatch) {
+ return EFI_SUCCESS;
+ } else {
+ return Status;
+ }
}
//
// 3. Update the row info which will be used by next menu.
@@ -2296,10 +2598,12 @@ UiDisplayMenu (
//
ControlFlag = CfUpdateHelpString;
+ UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);
+
if (SkipHighLight) {
- MenuOption = SavedMenuOption;
SkipHighLight = FALSE;
- UpdateHighlightMenuInfo (MenuOption, TopOfScreen == &MenuOption->Link ? SkipValue : 0);
+ MenuOption = SavedMenuOption;
+ RefreshKeyHelp(gFormData, SavedMenuOption->ThisTag, FALSE);
break;
}
@@ -2341,9 +2645,7 @@ UiDisplayMenu (
// This is the current selected statement
//
MenuOption = MENU_OPTION_FROM_LINK (NewPos);
- Statement = MenuOption->ThisTag;
-
- UpdateHighlightMenuInfo (MenuOption, Temp2);
+ RefreshKeyHelp(gFormData, MenuOption->ThisTag, FALSE);
if (!IsSelectable (MenuOption)) {
break;
@@ -2578,6 +2880,7 @@ UiDisplayMenu (
}
if (EventType == UIEventDriver) {
+ gMisMatch = TRUE;
gUserInput->Action = BROWSER_ACTION_NONE;
ControlFlag = CfExit;
break;
@@ -2785,13 +3088,6 @@ UiDisplayMenu (
break;
}
- //
- // When user press ESC, it will try to show another menu, should clean the gSequence info.
- //
- if (gSequence != 0) {
- gSequence = 0;
- }
-
gUserInput->Action = BROWSER_ACTION_FORM_EXIT;
ControlFlag = CfExit;
break;
@@ -2904,6 +3200,8 @@ UiDisplayMenu (
//
AdjustDateAndTimePosition (TRUE, &TopOfScreen);
AdjustDateAndTimePosition (TRUE, &NewPos);
+
+ UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);
break;
case CfUiPageUp:
@@ -2943,6 +3241,8 @@ UiDisplayMenu (
//
AdjustDateAndTimePosition (TRUE, &TopOfScreen);
AdjustDateAndTimePosition (TRUE, &NewPos);
+
+ UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);
break;
case CfUiPageDown:
@@ -3004,6 +3304,8 @@ UiDisplayMenu (
//
AdjustDateAndTimePosition (TRUE, &TopOfScreen);
AdjustDateAndTimePosition (TRUE, &NewPos);
+
+ UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);
break;
case CfUiDown:
@@ -3065,6 +3367,8 @@ UiDisplayMenu (
//
AdjustDateAndTimePosition (TRUE, &TopOfScreen);
AdjustDateAndTimePosition (TRUE, &NewPos);
+
+ UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);
break;
}
@@ -3162,6 +3466,8 @@ UiDisplayMenu (
//
AdjustDateAndTimePosition (TRUE, &TopOfScreen);
AdjustDateAndTimePosition (TRUE, &NewPos);
+
+ UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue);
break;
case CfUiNoOperation:
@@ -3571,8 +3877,12 @@ UnloadDisplayEngine (
FreeDisplayStrings ();
- if (gHighligthMenuInfo.OpCode != NULL) {
- FreePool (gHighligthMenuInfo.OpCode);
+ if (gHighligthMenuInfo.HLTOpCode != NULL) {
+ FreePool (gHighligthMenuInfo.HLTOpCode);
+ }
+
+ if (gHighligthMenuInfo.TOSOpCode != NULL) {
+ FreePool (gHighligthMenuInfo.TOSOpCode);
}
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
index f369877386..968d293afd 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
@@ -63,6 +63,7 @@ extern CHAR16 gPromptBlockWidth;
extern CHAR16 gOptionBlockWidth;
extern CHAR16 gHelpBlockWidth;
extern CHAR16 *mUnknownString;
+extern BOOLEAN gMisMatch;
//
// Screen definitions
@@ -196,9 +197,31 @@ typedef struct {
typedef struct {
EFI_HII_HANDLE HiiHandle;
- EFI_QUESTION_ID QuestionId;
- EFI_IFR_OP_HEADER *OpCode;
- UINT16 DisplayRow;
+ UINT16 FormId;
+
+ //
+ // Info for the highlight question.
+ // HLT means highlight
+ //
+ // If one statement has questionid, save questionid info to find the question.
+ // If one statement not has questionid info, save the opcode info to find the
+ // statement. If more than one statement has same opcode in one form(just like
+ // empty subtitle info may has more than one info one form), also use Index
+ // info to find the statement.
+ //
+ EFI_QUESTION_ID HLTQuestionId;
+ EFI_IFR_OP_HEADER *HLTOpCode;
+ UINTN HLTIndex;
+ UINTN HLTSequence;
+
+ //
+ // Info for the top of screen question.
+ // TOS means Top Of Screen
+ //
+ EFI_QUESTION_ID TOSQuestionId;
+ EFI_IFR_OP_HEADER *TOSOpCode;
+ UINTN TOSIndex;
+
UINT16 SkipValue;
} DISPLAY_HIGHLIGHT_MENU_INFO;
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
index 6e9e6ddfcc..84ae03eea7 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c
@@ -1034,7 +1034,7 @@ ProcessOptions (
// Exit current DisplayForm with new value.
//
gUserInput->SelectedStatement = Question;
-
+ gMisMatch = TRUE;
ValueArray = AllocateZeroPool (Question->CurrentValue.BufferLen);
ASSERT (ValueArray != NULL);
gUserInput->InputValue.Buffer = ValueArray;
@@ -1119,7 +1119,7 @@ ProcessOptions (
// Exit current DisplayForm with new value.
//
gUserInput->SelectedStatement = Question;
-
+ gMisMatch = TRUE;
ValueArray = AllocateCopyPool (Question->CurrentValue.BufferLen, Question->CurrentValue.Buffer);
ASSERT (ValueArray != NULL);
gUserInput->InputValue.Buffer = ValueArray;
@@ -1196,7 +1196,7 @@ ProcessOptions (
break;
}
gUserInput->SelectedStatement = Question;
-
+ gMisMatch = TRUE;
FreePool (*OptionString);
*OptionString = NULL;
return EFI_NOT_FOUND;
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index 4cbf6dd209..13f4d9c5e9 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -1,6 +1,7 @@
/** @file
Help functions used by PCD DXE driver.
+Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1508,7 +1509,7 @@ GetExPcdTokenNumber (
MatchGuidIdx = MatchGuid - GuidTable;
- for (Index = 0; Index < mPeiExMapppingTableSize; Index++) {
+ for (Index = 0; Index < mPcdDatabase.PeiDb->ExTokenCount; Index++) {
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {
return ExMap[Index].TokenNumber;
@@ -1529,7 +1530,7 @@ GetExPcdTokenNumber (
MatchGuidIdx = MatchGuid - GuidTable;
- for (Index = 0; Index < mDxeExMapppingTableSize; Index++) {
+ for (Index = 0; Index < mPcdDatabase.DxeDb->ExTokenCount; Index++) {
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {
return ExMap[Index].TokenNumber;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index bfb8afc140..ad39d22a9d 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -928,7 +928,7 @@ ProcessAction (
}
if ((Action & BROWSER_ACTION_DEFAULT) == BROWSER_ACTION_DEFAULT) {
- ExtractDefault (gCurrentSelection->FormSet, gCurrentSelection->Form, DefaultId, gBrowserSettingScope, GetDefaultForAll, NULL, FALSE);
+ ExtractDefault (gCurrentSelection->FormSet, gCurrentSelection->Form, DefaultId, gBrowserSettingScope, GetDefaultForAll, NULL, FALSE, FALSE);
UpdateStatementStatus (gCurrentSelection->FormSet, gCurrentSelection->Form, gBrowserSettingScope);
}
@@ -1445,21 +1445,20 @@ ProcessQuestionConfig (
Process the user input data.
@param UserInput The user input data.
- @param ChangeHighlight Whether need to change the highlight statement.
@retval EFI_SUCESSS This function always return successfully for now.
**/
EFI_STATUS
ProcessUserInput (
- IN USER_INPUT *UserInput,
- IN BOOLEAN ChangeHighlight
+ IN USER_INPUT *UserInput
)
{
EFI_STATUS Status;
FORM_BROWSER_STATEMENT *Statement;
- Status = EFI_SUCCESS;
+ Status = EFI_SUCCESS;
+ Statement = NULL;
//
// When Exit from FormDisplay function, one of the below two cases must be true.
@@ -1470,62 +1469,35 @@ ProcessUserInput (
// Remove the last highligh question id, this id will update when show next form.
//
gCurrentSelection->QuestionId = 0;
+ if (UserInput->SelectedStatement != NULL){
+ Statement = GetBrowserStatement(UserInput->SelectedStatement);
+ ASSERT (Statement != NULL);
+
+ //
+ // This question is the current user select one,record it and later
+ // show it as the highlight question.
+ //
+ gCurrentSelection->CurrentMenu->QuestionId = Statement->QuestionId;
+ //
+ // For statement like text, actio, it not has question id.
+ // So use FakeQuestionId to save the question.
+ //
+ if (gCurrentSelection->CurrentMenu->QuestionId == 0) {
+ mCurFakeQestId = Statement->FakeQuestionId;
+ } else {
+ mCurFakeQestId = 0;
+ }
+ }
//
// First process the Action field in USER_INPUT.
//
if (UserInput->Action != 0) {
Status = ProcessAction (UserInput->Action, UserInput->DefaultId);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- //
- // Clear the highlight info.
- //
gCurrentSelection->Statement = NULL;
-
- if (UserInput->SelectedStatement != NULL) {
- Statement = GetBrowserStatement(UserInput->SelectedStatement);
- ASSERT (Statement != NULL);
- //
- // Save the current highlight menu in the menu history data.
- // which will be used when later browse back to this form.
- //
- gCurrentSelection->CurrentMenu->QuestionId = Statement->QuestionId;
- //
- // For statement like text, actio, it not has question id.
- // So use FakeQuestionId to save the question.
- //
- if (gCurrentSelection->CurrentMenu->QuestionId == 0) {
- mCurFakeQestId = Statement->FakeQuestionId;
- } else {
- mCurFakeQestId = 0;
- }
- }
} else {
- Statement = GetBrowserStatement(UserInput->SelectedStatement);
ASSERT (Statement != NULL);
-
gCurrentSelection->Statement = Statement;
-
- if (ChangeHighlight) {
- //
- // This question is the current user select one,record it and later
- // show it as the highlight question.
- //
- gCurrentSelection->CurrentMenu->QuestionId = Statement->QuestionId;
- //
- // For statement like text, actio, it not has question id.
- // So use FakeQuestionId to save the question.
- //
- if (gCurrentSelection->CurrentMenu->QuestionId == 0) {
- mCurFakeQestId = Statement->FakeQuestionId;
- } else {
- mCurFakeQestId = 0;
- }
- }
-
switch (Statement->Operand) {
case EFI_IFR_REF_OP:
Status = ProcessGotoOpCode(Statement, gCurrentSelection);
@@ -1542,7 +1514,7 @@ ProcessUserInput (
//
// Reset Question to default value specified by DefaultId
//
- Status = ExtractDefault (gCurrentSelection->FormSet, NULL, Statement->DefaultId, FormSetLevel, GetDefaultForAll, NULL, FALSE);
+ Status = ExtractDefault (gCurrentSelection->FormSet, NULL, Statement->DefaultId, FormSetLevel, GetDefaultForAll, NULL, FALSE, FALSE);
UpdateStatementStatus (gCurrentSelection->FormSet, NULL, FormSetLevel);
break;
@@ -1612,7 +1584,6 @@ DisplayForm (
EFI_STATUS Status;
USER_INPUT UserInput;
FORM_ENTRY_INFO *CurrentMenu;
- BOOLEAN ChangeHighlight;
ZeroMem (&UserInput, sizeof (USER_INPUT));
@@ -1636,9 +1607,6 @@ DisplayForm (
gCurrentSelection->CurrentMenu = CurrentMenu;
- //
- // Find currrent highlight statement.
- //
if (gCurrentSelection->QuestionId == 0) {
//
// Highlight not specified, fetch it from cached menu
@@ -1646,9 +1614,6 @@ DisplayForm (
gCurrentSelection->QuestionId = CurrentMenu->QuestionId;
}
- //
- // Evaluate all the Expressions in this Form
- //
Status = EvaluateFormExpressions (gCurrentSelection->FormSet, gCurrentSelection->Form);
if (EFI_ERROR (Status)) {
return Status;
@@ -1656,34 +1621,15 @@ DisplayForm (
UpdateDisplayFormData ();
- //
- // Three possible status maybe return.
- //
- // EFI_INVALID_PARAMETER: The input dimension info is not valid.
- // EFI_NOT_FOUND: The input value for oneof/orderedlist opcode is not valid
- // and an valid value has return.
- // EFI_SUCCESS: Success shows form and get user input in UserInput paramenter.
- //
ASSERT (gDisplayFormData.BrowserStatus == BROWSER_SUCCESS);
Status = mFormDisplay->FormDisplay (&gDisplayFormData, &UserInput);
- if (EFI_ERROR (Status) && Status != EFI_NOT_FOUND) {
+ if (EFI_ERROR (Status)) {
FreeDisplayFormData();
return Status;
}
- //
- // If status is EFI_SUCCESS, means user has change the highlight menu and new user input return.
- // in this case, browser need to change the highlight menu.
- // If status is EFI_NOT_FOUND, means the input DisplayFormData has error for oneof/orderedlist
- // opcode and new valid value has return, browser core need to adjust
- // value for this opcode and shows this form again.
- //
- ChangeHighlight = (Status == EFI_SUCCESS ? TRUE :FALSE);
-
- Status = ProcessUserInput (&UserInput, ChangeHighlight);
-
+ Status = ProcessUserInput (&UserInput);
FreeDisplayFormData();
-
return Status;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index a25150165c..fb88956a24 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -3986,13 +3986,15 @@ GetQuestionDefault (
@param FormSet Form data structure.
@param Form Form data structure.
@param DefaultId The Class of the default.
+ @param BrowserStorage The input request storage for the questions.
**/
VOID
ExtractAltCfgForForm (
IN FORM_BROWSER_FORMSET *FormSet,
IN FORM_BROWSER_FORM *Form,
- IN UINT16 DefaultId
+ IN UINT16 DefaultId,
+ IN BROWSER_STORAGE *BrowserStorage
)
{
EFI_STATUS Status;
@@ -4013,10 +4015,13 @@ ExtractAltCfgForForm (
FormSetStorage = FORMSET_STORAGE_FROM_LINK (Link);
Storage = FormSetStorage->BrowserStorage;
Link = GetNextNode (&FormSet->StorageListHead, Link);
+ if (BrowserStorage != NULL && BrowserStorage != Storage) {
+ continue;
+ }
if (Storage->Type != EFI_HII_VARSTORE_EFI_VARIABLE &&
FormSetStorage->ElementCount != 0 &&
- FormSetStorage->ConfigAltResp != NULL) {
+ FormSetStorage->HasCallAltCfg) {
return;
}
}
@@ -4030,6 +4035,10 @@ ExtractAltCfgForForm (
Link = GetNextNode (&Form->ConfigRequestHead, Link);
Storage = ConfigInfo->Storage;
+ if (BrowserStorage != NULL && BrowserStorage != Storage) {
+ continue;
+ }
+
if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
continue;
}
@@ -4107,12 +4116,14 @@ CleanAltCfgForForm (
@param FormSet Form data structure.
@param DefaultId The Class of the default.
+ @param BrowserStorage The input request storage for the questions.
**/
VOID
ExtractAltCfgForFormSet (
IN FORM_BROWSER_FORMSET *FormSet,
- IN UINT16 DefaultId
+ IN UINT16 DefaultId,
+ IN BROWSER_STORAGE *BrowserStorage
)
{
EFI_STATUS Status;
@@ -4129,6 +4140,10 @@ ExtractAltCfgForFormSet (
Storage = FormSetStorage->BrowserStorage;
Link = GetNextNode (&FormSet->StorageListHead, Link);
+ if (BrowserStorage != NULL && BrowserStorage != Storage) {
+ continue;
+ }
+
if (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
continue;
}
@@ -4140,6 +4155,8 @@ ExtractAltCfgForFormSet (
continue;
}
+ FormSetStorage->HasCallAltCfg = TRUE;
+
//
// 2. Get value through hii config routine protocol.
//
@@ -4200,6 +4217,8 @@ CleanAltCfgForFormSet (
FreePool (FormSetStorage->ConfigAltResp);
FormSetStorage->ConfigAltResp = NULL;
}
+
+ FormSetStorage->HasCallAltCfg = FALSE;
}
}
@@ -4218,6 +4237,7 @@ CleanAltCfgForFormSet (
@param RetrieveValueFirst Whether call the retrieve call back to
get the initial value before get default
value.
+ @param SkipGetAltCfg Whether skip the get altcfg string process.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_UNSUPPORTED Unsupport SettingScope.
@@ -4231,7 +4251,8 @@ ExtractDefault (
IN BROWSER_SETTING_SCOPE SettingScope,
IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,
IN BROWSER_STORAGE *Storage OPTIONAL,
- IN BOOLEAN RetrieveValueFirst
+ IN BOOLEAN RetrieveValueFirst,
+ IN BOOLEAN SkipGetAltCfg
)
{
EFI_STATUS Status;
@@ -4258,7 +4279,9 @@ ExtractDefault (
//
// Prepare the AltCfg String for form.
//
- ExtractAltCfgForForm (FormSet, Form, DefaultId);
+ if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
+ ExtractAltCfgForForm (FormSet, Form, DefaultId, Storage);
+ }
//
// Extract Form default
@@ -4320,24 +4343,30 @@ ExtractDefault (
//
// Clean the AltCfg String.
//
- CleanAltCfgForForm(Form);
+ if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
+ CleanAltCfgForForm(Form);
+ }
} else if (SettingScope == FormSetLevel) {
//
// Prepare the AltCfg String for formset.
//
- ExtractAltCfgForFormSet (FormSet, DefaultId);
+ if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
+ ExtractAltCfgForFormSet (FormSet, DefaultId, Storage);
+ }
FormLink = GetFirstNode (&FormSet->FormListHead);
while (!IsNull (&FormSet->FormListHead, FormLink)) {
Form = FORM_BROWSER_FORM_FROM_LINK (FormLink);
- ExtractDefault (FormSet, Form, DefaultId, FormLevel, GetDefaultValueScope, Storage, RetrieveValueFirst);
+ ExtractDefault (FormSet, Form, DefaultId, FormLevel, GetDefaultValueScope, Storage, RetrieveValueFirst, SkipGetAltCfg);
FormLink = GetNextNode (&FormSet->FormListHead, FormLink);
}
//
// Clean the AltCfg String.
//
- CleanAltCfgForFormSet (FormSet);
+ if (!SkipGetAltCfg && (GetDefaultValueScope != GetDefaultForNoStorage)) {
+ CleanAltCfgForFormSet (FormSet);
+ }
} else if (SettingScope == SystemLevel) {
//
// Preload all Hii formset.
@@ -4359,7 +4388,7 @@ ExtractDefault (
mSystemLevelFormSet = LocalFormSet;
- ExtractDefault (LocalFormSet, NULL, DefaultId, FormSetLevel, GetDefaultValueScope, Storage, RetrieveValueFirst);
+ ExtractDefault (LocalFormSet, NULL, DefaultId, FormSetLevel, GetDefaultValueScope, Storage, RetrieveValueFirst, SkipGetAltCfg);
}
mSystemLevelFormSet = OldFormSet;
@@ -4920,158 +4949,6 @@ ConfigRequestAdjust (
}
/**
-
- Base on ConfigRequest info to get default value for current formset.
-
- ConfigRequest info include the info about which questions in current formset need to
- get default value. This function only get these questions default value.
-
- @param FormSet FormSet data structure.
- @param Storage Storage need to update value.
- @param ConfigRequest The config request string.
-
-**/
-VOID
-GetDefaultForFormset (
- IN FORM_BROWSER_FORMSET *FormSet,
- IN BROWSER_STORAGE *Storage,
- IN CHAR16 *ConfigRequest
- )
-{
- UINT8 *BackUpBuf;
- UINTN BufferSize;
- LIST_ENTRY BackUpList;
- NAME_VALUE_NODE *Node;
- LIST_ENTRY *Link;
- LIST_ENTRY *NodeLink;
- NAME_VALUE_NODE *TmpNode;
- EFI_STATUS Status;
- EFI_STRING Progress;
- EFI_STRING Result;
-
- BackUpBuf = NULL;
- InitializeListHead(&BackUpList);
-
- //
- // Back update the edit buffer.
- //
- if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
- (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
- BackUpBuf = AllocateCopyPool (Storage->Size, Storage->EditBuffer);
- ASSERT (BackUpBuf != NULL);
- } else if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
- Link = GetFirstNode (&Storage->NameValueListHead);
- while (!IsNull (&Storage->NameValueListHead, Link)) {
- Node = NAME_VALUE_NODE_FROM_LINK (Link);
- Link = GetNextNode (&Storage->NameValueListHead, Link);
-
- //
- // Only back Node belong to this formset.
- //
- if (StrStr (Storage->ConfigRequest, Node->Name) == NULL) {
- continue;
- }
-
- TmpNode = AllocateCopyPool (sizeof (NAME_VALUE_NODE), Node);
- ASSERT (TmpNode != NULL);
- TmpNode->Name = AllocateCopyPool (StrSize(Node->Name) * sizeof (CHAR16), Node->Name);
- ASSERT (TmpNode->Name != NULL);
- TmpNode->EditValue = AllocateCopyPool (StrSize(Node->EditValue) * sizeof (CHAR16), Node->EditValue);
- ASSERT (TmpNode->EditValue != NULL);
-
- InsertTailList(&BackUpList, &TmpNode->Link);
- }
- }
-
- //
- // Get default value.
- //
- ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForStorage, Storage, TRUE);
-
- //
- // Update the question value based on the input ConfigRequest.
- //
- if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||
- (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) {
- ASSERT (BackUpBuf != NULL);
- BufferSize = Storage->Size;
- Status = mHiiConfigRouting->BlockToConfig(
- mHiiConfigRouting,
- ConfigRequest,
- Storage->EditBuffer,
- BufferSize,
- &Result,
- &Progress
- );
- ASSERT_EFI_ERROR (Status);
-
- Status = mHiiConfigRouting->ConfigToBlock (
- mHiiConfigRouting,
- Result,
- BackUpBuf,
- &BufferSize,
- &Progress
- );
- ASSERT_EFI_ERROR (Status);
-
- if (Result != NULL) {
- FreePool (Result);
- }
-
- CopyMem (Storage->EditBuffer, BackUpBuf, Storage->Size);
- FreePool (BackUpBuf);
- } else if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) {
- //
- // Update question value, only element in ConfigReqeust will be update.
- //
- Link = GetFirstNode (&BackUpList);
- while (!IsNull (&BackUpList, Link)) {
- Node = NAME_VALUE_NODE_FROM_LINK (Link);
- Link = GetNextNode (&BackUpList, Link);
-
- if (StrStr (ConfigRequest, Node->Name) != NULL) {
- continue;
- }
-
- NodeLink = GetFirstNode (&Storage->NameValueListHead);
- while (!IsNull (&Storage->NameValueListHead, NodeLink)) {
- TmpNode = NAME_VALUE_NODE_FROM_LINK (NodeLink);
- NodeLink = GetNextNode (&Storage->NameValueListHead, NodeLink);
-
- if (StrCmp (Node->Name, TmpNode->Name) != 0) {
- continue;
- }
-
- FreePool (TmpNode->EditValue);
- TmpNode->EditValue = AllocateCopyPool (StrSize(Node->EditValue) * sizeof (CHAR16), Node->EditValue);
-
- RemoveEntryList (&Node->Link);
- FreePool (Node->EditValue);
- FreePool (Node->Name);
- FreePool (Node);
- }
- }
-
- //
- // Restore the Name/Value node.
- //
- Link = GetFirstNode (&BackUpList);
- while (!IsNull (&BackUpList, Link)) {
- Node = NAME_VALUE_NODE_FROM_LINK (Link);
- Link = GetNextNode (&BackUpList, Link);
-
- //
- // Free this node.
- //
- RemoveEntryList (&Node->Link);
- FreePool (Node->EditValue);
- FreePool (Node->Name);
- FreePool (Node);
- }
- }
-}
-
-/**
Fill storage's edit copy with settings requested from Configuration Driver.
@param FormSet FormSet data structure.
@@ -5161,7 +5038,7 @@ LoadStorage (
// If get value fail, extract default from IFR binary
//
if (EFI_ERROR (Status)) {
- ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage, TRUE);
+ ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForStorage, Storage->BrowserStorage, TRUE, TRUE);
} else {
//
// Convert Result from <ConfigAltResp> to <ConfigResp>
@@ -5307,7 +5184,7 @@ InitializeCurrentSetting (
//
// Extract default from IFR binary for no storage questions.
//
- ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForNoStorage, NULL, TRUE);
+ ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForNoStorage, NULL, TRUE, FALSE);
//
// Request current settings from Configuration Driver
@@ -6100,7 +5977,7 @@ ExecuteAction (
// Executet the difault action.
//
if ((Action & BROWSER_ACTION_DEFAULT) != 0) {
- Status = ExtractDefault (FormSet, Form, DefaultId, gBrowserSettingScope, GetDefaultForAll, NULL, FALSE);
+ Status = ExtractDefault (FormSet, Form, DefaultId, gBrowserSettingScope, GetDefaultForAll, NULL, FALSE, FALSE);
if (EFI_ERROR (Status)) {
return Status;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
index b2c3c2010e..f431bb0f36 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
@@ -172,6 +172,7 @@ typedef struct {
CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
CHAR16 *ConfigAltResp; // Alt config response string for this ConfigRequest.
+ BOOLEAN HasCallAltCfg; // Flag to show whether browser has call ExtractConfig to get Altcfg string.
UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
UINTN SpareStrLen; // Spare length of ConfigRequest string buffer
} FORMSET_STORAGE;
@@ -917,6 +918,7 @@ InitializeFormSet (
@param RetrieveValueFirst Whether call the retrieve call back to
get the initial value before get default
value.
+ @param SkipGetAltCfg Whether skip the get altcfg string process.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_UNSUPPORTED Unsupport SettingScope.
@@ -930,7 +932,8 @@ ExtractDefault (
IN BROWSER_SETTING_SCOPE SettingScope,
IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,
IN BROWSER_STORAGE *Storage,
- IN BOOLEAN RetrieveValueFirst
+ IN BOOLEAN RetrieveValueFirst,
+ IN BOOLEAN SkipGetAltCfg
);
/**
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index 4716cc5124..97c86f2feb 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -884,6 +884,8 @@ PeiGetVariable (
return EFI_INVALID_PARAMETER;
}
+ VariableHeader = NULL;
+
//
// Find existing variable
//
@@ -970,6 +972,8 @@ PeiGetNextVariableName (
return EFI_INVALID_PARAMETER;
}
+ VariableHeader = NULL;
+
Status = FindVariable (VariableName, VariableGuid, &Variable, &StoreInfo);
if (Variable.CurrPtr == NULL || Status != EFI_SUCCESS) {
return Status;
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index c66bdbf9fd..b545a05530 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -3,6 +3,17 @@
The common variable operation routines shared by DXE_RUNTIME variable
module and DXE_SMM variable module.
+ Caution: This module requires additional review when modified.
+ This driver will have external input - variable data. They may be input in SMM mode.
+ This external input must be validated carefully to avoid security issue like
+ buffer overflow, integer overflow.
+
+ VariableServiceGetNextVariableName () and VariableServiceQueryVariableInfo() are external API.
+ They need check input parameter.
+
+ VariableServiceGetVariable() and VariableServiceSetVariable() are external API
+ to receive datasize and data buffer. The size should be checked carefully.
+
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -2276,6 +2287,10 @@ VariableLockRequestToLock (
This code finds variable in storage blocks (Volatile or Non-Volatile).
+ Caution: This function may receive untrusted input.
+ This function may be invoked in SMM mode, and datasize is external input.
+ This function will do basic validation, before parse the data.
+
@param VariableName Name of Variable to be found.
@param VendorGuid Variable vendor GUID.
@param Attributes Attribute value of the variable found.
@@ -2353,6 +2368,9 @@ Done:
This code Finds the Next available variable.
+ Caution: This function may receive untrusted input.
+ This function may be invoked in SMM mode. This function will do basic validation, before parse the data.
+
@param VariableNameSize Size of the variable name.
@param VariableName Pointer to variable name.
@param VendorGuid Variable Vendor Guid.
@@ -2515,6 +2533,10 @@ Done:
This code sets variable in storage blocks (Volatile or Non-Volatile).
+ Caution: This function may receive untrusted input.
+ This function may be invoked in SMM mode, and datasize and data are external input.
+ This function will do basic validation, before parse the data.
+
@param VariableName Name of Variable to be found.
@param VendorGuid Variable vendor GUID.
@param Attributes Attribute value of the variable found
@@ -2686,6 +2708,9 @@ Done:
This code returns information about the EFI variables.
+ Caution: This function may receive untrusted input.
+ This function may be invoked in SMM mode. This function will do basic validation, before parse the data.
+
@param Attributes Attributes bitmask to specify the type of variables
on which to return information.
@param MaximumVariableStorageSize Pointer to the maximum size of the storage space available
@@ -2839,6 +2864,9 @@ VariableServiceQueryVariableInfoInternal (
This code returns information about the EFI variables.
+ Caution: This function may receive untrusted input.
+ This function may be invoked in SMM mode. This function will do basic validation, before parse the data.
+
@param Attributes Attributes bitmask to specify the type of variables
on which to return information.
@param MaximumVariableStorageSize Pointer to the maximum size of the storage space available
@@ -2910,7 +2938,10 @@ VariableServiceQueryVariableInfo (
/**
This function reclaims variable storage if free size is below the threshold.
-
+
+ Caution: This function may be invoked at SMM mode.
+ Care must be taken to make sure not security issue.
+
**/
VOID
ReclaimForOS(
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
index 2585203120..f8ee4684e2 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
@@ -3,6 +3,11 @@
#
# It provides four EFI_RUNTIME_SERVICES: SetVariable, GetVariable, GetNextVariableName and QueryVariableInfo.
#
+# Caution: This module requires additional review when modified.
+# This driver will have external input - variable data.
+# This external input must be validated carefully to avoid security issues such as
+# buffer overflow or integer overflow.
+#
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.uni b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.uni
index b91e18a339..ee8acd0ad1 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.uni
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.uni
Binary files differ
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
index 7ca3326a88..14e421cb79 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
@@ -4,6 +4,16 @@
and volatile storage space and install variable architecture protocol
based on SMM variable module.
+ Caution: This module requires additional review when modified.
+ This driver will have external input - variable data.
+ This external input must be validated carefully to avoid security issue like
+ buffer overflow, integer overflow.
+
+ RuntimeServiceGetVariable() and RuntimeServiceSetVariable() are external API
+ to receive data buffer. The size should be checked carefully.
+
+ InitCommunicateBuffer() is really function to check the variable data size.
+
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -97,6 +107,9 @@ ReleaseLockOnlyAtBootTime (
The communicate size is: SMM_COMMUNICATE_HEADER_SIZE + SMM_VARIABLE_COMMUNICATE_HEADER_SIZE +
DataSize.
+ Caution: This function may receive untrusted input.
+ The data size external input, so this function will validate it carefully to avoid buffer overflow.
+
@param[out] DataPtr Points to the data in the communicate buffer.
@param[in] DataSize The data size to send to SMM.
@param[in] Function The function number to initialize the communicate header.
@@ -234,6 +247,9 @@ Done:
/**
This code finds variable in storage blocks (Volatile or Non-Volatile).
+ Caution: This function may receive untrusted input.
+ The data size is external input, so this function will validate it carefully to avoid buffer overflow.
+
@param[in] VariableName Name of Variable to be found.
@param[in] VendorGuid Variable vendor GUID.
@param[out] Attributes Attribute value of the variable found.
@@ -453,6 +469,9 @@ Done:
/**
This code sets variable in storage blocks (Volatile or Non-Volatile).
+ Caution: This function may receive untrusted input.
+ The data size and data are external input, so this function will validate it carefully to avoid buffer overflow.
+
@param[in] VariableName Name of Variable to be found.
@param[in] VendorGuid Variable vendor GUID.
@param[in] Attributes Attribute value of the variable found
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
index 644c4fce67..4bd470662f 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
@@ -5,6 +5,11 @@
# four EFI_RUNTIME_SERVICES: SetVariable, GetVariable, GetNextVariableName and QueryVariableInfo
# and works with SMM variable module together.
#
+# Caution: This module requires additional review when modified.
+# This driver will have external input - variable data.
+# This external input must be validated carefully to avoid security issues such as
+# buffer overflow or integer overflow.
+#
# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.uni b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.uni
index 5b5dcd8ab3..39cf83edec 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.uni
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.uni
Binary files differ