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:
eric_tian 2009-09-10 06:51:55 +00:00
parent 252b9c7a9f
commit 9948c0b018
1 changed files with 4 additions and 3 deletions

View File

@ -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,