summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2015-11-16 08:02:03 +0000
committervanjeff <vanjeff@Edk2>2015-11-16 08:02:03 +0000
commitb0a3a913c1b9ce7f14324e3d73308f0bbbe9d35f (patch)
treec66c8395bf569f6270fa5d604b0cf0d9b5f12e67
parent7e37880a7fe0f485d00c5ffd046d6b81fd18e144 (diff)
downloadedk2-platforms-b0a3a913c1b9ce7f14324e3d73308f0bbbe9d35f.tar.xz
MdeModulePkg SetupBrowserDxe: Save global variable values before nest function called.
The SendForm function can be called nest in it. This function also uses some global variables. So we must save global variable values before it been called again. Old implementation miss to save some global variables, this patch fixed it. (Sync patch r18650 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18803 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c8
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.h8
2 files changed, 15 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 43cfc87eeb..4a6758a5e4 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -5568,6 +5568,10 @@ SaveBrowserContext (
Context->HiiHandle = mCurrentHiiHandle;
Context->FormId = mCurrentFormId;
CopyGuid (&Context->FormSetGuid, &mCurrentFormSetGuid);
+ Context->SystemLevelFormSet = mSystemLevelFormSet;
+ Context->CurFakeQestId = mCurFakeQestId;
+ Context->HiiPackageListUpdated = mHiiPackageListUpdated;
+ Context->FinishRetrieveCall = mFinishRetrieveCall;
//
// Save the menu history data.
@@ -5625,6 +5629,10 @@ RestoreBrowserContext (
mCurrentHiiHandle = Context->HiiHandle;
mCurrentFormId = Context->FormId;
CopyGuid (&mCurrentFormSetGuid, &Context->FormSetGuid);
+ mSystemLevelFormSet = Context->SystemLevelFormSet;
+ mCurFakeQestId = Context->CurFakeQestId;
+ mHiiPackageListUpdated = Context->HiiPackageListUpdated;
+ mFinishRetrieveCall = Context->FinishRetrieveCall;
//
// Restore the menu history data.
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
index 61e706a0b4..81e2a62df1 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
@@ -538,7 +538,10 @@ typedef struct {
EFI_GUID FormSetGuid;
EFI_FORM_ID FormId;
UI_MENU_SELECTION *Selection;
-
+ FORM_BROWSER_FORMSET *SystemLevelFormSet;
+ EFI_QUESTION_ID CurFakeQestId;
+ BOOLEAN HiiPackageListUpdated;
+ BOOLEAN FinishRetrieveCall;
LIST_ENTRY FormHistoryList;
} BROWSER_CONTEXT;
@@ -586,6 +589,9 @@ extern SETUP_DRIVER_PRIVATE_DATA mPrivateData;
extern CHAR16 *gEmptyString;
extern UI_MENU_SELECTION *gCurrentSelection;
+extern BOOLEAN mHiiPackageListUpdated;
+extern UINT16 mCurFakeQestId;
+extern BOOLEAN mFinishRetrieveCall;
//
// Global Procedure Defines