diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 08d46cf554..97713ebb60 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -997,7 +997,8 @@ ProcessAction ( } if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) { - gResetRequired = TRUE; + gResetRequiredFormLevel = TRUE; + gResetRequiredSystemLevel = TRUE; } if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) { @@ -2045,7 +2046,8 @@ ProcessCallBackFunction ( switch (ActionRequest) { case EFI_BROWSER_ACTION_REQUEST_RESET: DiscardFormIsRequired = TRUE; - gResetRequired = TRUE; + gResetRequiredFormLevel = TRUE; + gResetRequiredSystemLevel = TRUE; NeedExit = TRUE; break; @@ -2544,7 +2546,8 @@ SetupBrowser ( if ((Status == EFI_SUCCESS) && (Statement->Storage == NULL)) { if ((Statement->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) { - gResetRequired = TRUE; + gResetRequiredFormLevel = TRUE; + gResetRequiredSystemLevel = TRUE; } if ((Statement->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) { diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 83dc2b86c7..89e06deae8 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -53,7 +53,8 @@ LIST_ENTRY gBrowserStorageList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserSto LIST_ENTRY gBrowserSaveFailFormSetList = INITIALIZE_LIST_HEAD_VARIABLE (gBrowserSaveFailFormSetList); BOOLEAN mSystemSubmit = FALSE; -BOOLEAN gResetRequired; +BOOLEAN gResetRequiredFormLevel; +BOOLEAN gResetRequiredSystemLevel = FALSE; BOOLEAN gExitRequired; BOOLEAN gFlagReconnect; BOOLEAN gCallbackReconnect; @@ -499,7 +500,7 @@ SendForm ( SaveBrowserContext (); gFlagReconnect = FALSE; - gResetRequired = FALSE; + gResetRequiredFormLevel = FALSE; gExitRequired = FALSE; gCallbackReconnect = FALSE; Status = EFI_SUCCESS; @@ -579,7 +580,7 @@ SendForm ( if (ActionRequest != NULL) { *ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE; - if (gResetRequired) { + if (gResetRequiredFormLevel) { *ActionRequest = EFI_BROWSER_ACTION_REQUEST_RESET; } } @@ -2678,7 +2679,8 @@ UpdateFlagForForm ( // if (SetFlag && OldValue && !Question->ValueChanged) { if ((Question->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) { - gResetRequired = TRUE; + gResetRequiredFormLevel = TRUE; + gResetRequiredSystemLevel = TRUE; } if ((Question->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) { @@ -5917,7 +5919,7 @@ SaveBrowserContext ( // Save FormBrowser context // Context->Selection = gCurrentSelection; - Context->ResetRequired = gResetRequired; + Context->ResetRequired = gResetRequiredFormLevel; Context->FlagReconnect = gFlagReconnect; Context->CallbackReconnect = gCallbackReconnect; Context->ExitRequired = gExitRequired; @@ -5990,7 +5992,7 @@ RestoreBrowserContext ( // Restore FormBrowser context // gCurrentSelection = Context->Selection; - gResetRequired = Context->ResetRequired; + gResetRequiredFormLevel = Context->ResetRequired; gFlagReconnect = Context->FlagReconnect; gCallbackReconnect = Context->CallbackReconnect; gExitRequired = Context->ExitRequired; @@ -6465,7 +6467,8 @@ ExecuteAction ( // Executet the reset action. // if ((Action & BROWSER_ACTION_RESET) != 0) { - gResetRequired = TRUE; + gResetRequiredFormLevel = TRUE; + gResetRequiredSystemLevel = TRUE; } // @@ -6565,6 +6568,6 @@ IsResetRequired ( VOID ) { - return gResetRequired; + return gResetRequiredSystemLevel; } diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h index f1accdf841..de140e9cb2 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h @@ -1,7 +1,7 @@ /** @file Private MACRO, structure and function definitions for Setup Browser module. -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -580,7 +580,8 @@ extern EDKII_FORM_DISPLAY_ENGINE_PROTOCOL *mFormDisplay; extern BOOLEAN gCallbackReconnect; extern BOOLEAN gFlagReconnect; -extern BOOLEAN gResetRequired; +extern BOOLEAN gResetRequiredFormLevel; +extern BOOLEAN gResetRequiredSystemLevel; extern BOOLEAN gExitRequired; extern LIST_ENTRY gBrowserFormSetList; extern LIST_ENTRY gBrowserHotKeyList;