summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-09-10 06:51:55 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-09-10 06:51:55 +0000
commit9948c0b0183845817b83a444a8cb1f4b2ec93a4c (patch)
treef952c1b6a7b89e187436b68b6166a66d8f2fda7d
parent252b9c7a9fc5c35e6ba59f06c32bf6b88db05b3d (diff)
downloadedk2-platforms-9948c0b0183845817b83a444a8cb1f4b2ec93a4c.tar.xz
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
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index e524777843..a4a26372d5 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -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,