diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-10 06:51:55 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-10 06:51:55 +0000 |
commit | 9948c0b0183845817b83a444a8cb1f4b2ec93a4c (patch) | |
tree | f952c1b6a7b89e187436b68b6166a66d8f2fda7d | |
parent | 252b9c7a9fc5c35e6ba59f06c32bf6b88db05b3d (diff) | |
download | edk2-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.c | 7 |
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,
|