mirror of https://github.com/acidanthera/audk.git
MdeModulePkg Variable: Before EndOfDxe, just record the current boot VarErrorFlag to local variable.
And leave the variable error flag in NV flash as the last boot variable error flag. After EndOfDxe in InitializeVarErrorFlag (), the variable error flag in NV flash will be initialized to this local current boot variable error flag. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16684 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3ab016b2a3
commit
00ab76e0fe
|
@ -55,6 +55,10 @@ BOOLEAN mEndOfDxe = FALSE;
|
||||||
///
|
///
|
||||||
BOOLEAN mEnableLocking = TRUE;
|
BOOLEAN mEnableLocking = TRUE;
|
||||||
|
|
||||||
|
//
|
||||||
|
// It will record the current boot error flag before EndOfDxe.
|
||||||
|
//
|
||||||
|
VAR_ERROR_FLAG mCurrentBootVarErrFlag = VAR_ERROR_FLAG_NO_ERROR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Routine used to track statistical information about variable usage.
|
Routine used to track statistical information about variable usage.
|
||||||
|
@ -561,6 +565,17 @@ RecordVarErrorFlag (
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!mEndOfDxe) {
|
||||||
|
//
|
||||||
|
// Before EndOfDxe, just record the current boot variable error flag to local variable,
|
||||||
|
// and leave the variable error flag in NV flash as the last boot variable error flag.
|
||||||
|
// After EndOfDxe in InitializeVarErrorFlag (), the variable error flag in NV flash
|
||||||
|
// will be initialized to this local current boot variable error flag.
|
||||||
|
//
|
||||||
|
mCurrentBootVarErrFlag &= Flag;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Record error flag (it should have be initialized).
|
// Record error flag (it should have be initialized).
|
||||||
//
|
//
|
||||||
|
@ -619,7 +634,7 @@ InitializeVarErrorFlag (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Flag = VAR_ERROR_FLAG_NO_ERROR;
|
Flag = mCurrentBootVarErrFlag;
|
||||||
DEBUG ((EFI_D_INFO, "Initialize variable error flag (%02x)\n", Flag));
|
DEBUG ((EFI_D_INFO, "Initialize variable error flag (%02x)\n", Flag));
|
||||||
|
|
||||||
Status = FindVariable (
|
Status = FindVariable (
|
||||||
|
|
Loading…
Reference in New Issue