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:
Bi, Dandan
2017-07-21 16:56:01 +08:00
committed by Liming Gao
parent 1d8701a20e
commit b2dcae4c57
3 changed files with 20 additions and 13 deletions

View File

@@ -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) {