mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/SetupBrowser: Record the reset status in all SendForm
After calling SendForm to enter front page, configuration change in some driver may require system reset. Currently the reset status is saved in SendForm level. Then SendForm can return the reset status. IsResetRequired API also can return the reset status before exiting browser. It return the reset status in current SendForm level now. But SendForm can be recursive called by some module.so the reset status in previous SendForm may be lost. Now change the IsResetRequired API to return the reset info no matter the reset is caught in any SendForm. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
1d8701a20e
commit
b2dcae4c57
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
Private MACRO, structure and function definitions for Setup Browser module.
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2017, 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
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue