mirror of https://github.com/acidanthera/audk.git
if PcdHwErrStorageSize is zero, it means HwErr variable store doesn't exist in Variable Region.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9252 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
252b9c7a9f
commit
9948c0b018
|
@ -2179,7 +2179,7 @@ ReclaimForOS(
|
|||
VOID *Context
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
UINTN CommonVariableSpace;
|
||||
UINTN RemainingCommonVariableSpace;
|
||||
UINTN RemainingHwErrVariableSpace;
|
||||
|
@ -2192,10 +2192,11 @@ ReclaimForOS(
|
|||
|
||||
RemainingHwErrVariableSpace = PcdGet32 (PcdHwErrStorageSize) - mVariableModuleGlobal->HwErrVariableTotalSize;
|
||||
//
|
||||
// Check if the free area is blow a threshold
|
||||
// Check if the free area is blow a threshold.
|
||||
//
|
||||
if ((RemainingCommonVariableSpace < PcdGet32 (PcdMaxVariableSize))
|
||||
|| (RemainingHwErrVariableSpace < PcdGet32 (PcdMaxHardwareErrorVariableSize))){
|
||||
|| ((PcdGet32 (PcdHwErrStorageSize) != 0) &&
|
||||
(RemainingHwErrVariableSpace < PcdGet32 (PcdMaxHardwareErrorVariableSize)))){
|
||||
Status = Reclaim (
|
||||
mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase,
|
||||
&mVariableModuleGlobal->NonVolatileLastVariableOffset,
|
||||
|
|
Loading…
Reference in New Issue