]> git.proxmox.com Git - mirror_edk2.git/commitdiff
if PcdHwErrStorageSize is zero, it means HwErr variable store doesn't exist in Variab...
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 10 Sep 2009 06:51:55 +0000 (06:51 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 10 Sep 2009 06:51:55 +0000 (06:51 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9252 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c

index e524777843a9ca4d40882be98c75c99eab9c6f97..a4a26372d52a6aadf36372dd4893414de7285da3 100644 (file)
@@ -2179,7 +2179,7 @@ ReclaimForOS(
   VOID       *Context\r
   )\r
 {\r
-  EFI_STATUS                      Status;\r
+  EFI_STATUS                     Status;\r
   UINTN                          CommonVariableSpace;\r
   UINTN                          RemainingCommonVariableSpace;\r
   UINTN                          RemainingHwErrVariableSpace;\r
@@ -2192,10 +2192,11 @@ ReclaimForOS(
 \r
   RemainingHwErrVariableSpace = PcdGet32 (PcdHwErrStorageSize) - mVariableModuleGlobal->HwErrVariableTotalSize;\r
   //\r
-  // Check if the free area is blow a threshold\r
+  // Check if the free area is blow a threshold.\r
   //\r
   if ((RemainingCommonVariableSpace < PcdGet32 (PcdMaxVariableSize))\r
-    || (RemainingHwErrVariableSpace < PcdGet32 (PcdMaxHardwareErrorVariableSize))){\r
+    || ((PcdGet32 (PcdHwErrStorageSize) != 0) && \r
+       (RemainingHwErrVariableSpace < PcdGet32 (PcdMaxHardwareErrorVariableSize)))){\r
     Status = Reclaim (\r
             mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase,\r
             &mVariableModuleGlobal->NonVolatileLastVariableOffset,\r