The common variable operation routines shared by DXE_RINTIME variable \r
module and DXE_SMM variable module.\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
// Check if the Data is Volatile.\r
//\r
if (!Volatile) {\r
+ ASSERT (Fvb != NULL);\r
Status = Fvb->GetPhysicalAddress(Fvb, &FvVolHdr);\r
ASSERT_EFI_ERROR (Status);\r
\r
// since the space occupied by variables not marked with\r
// VAR_ADDED is not allowed to be reclaimed in Runtime.\r
//\r
- if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
+ if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
HwErrVariableTotalSize += VariableSize;\r
} else {\r
CommonVariableTotalSize += VariableSize;\r
// the space not marked as VAR_ADDED is reclaimable now.\r
//\r
if (Variable->State == VAR_ADDED) {\r
- if ((NextVariable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
+ if ((Variable->Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == EFI_VARIABLE_HARDWARE_ERROR_RECORD) {\r
HwErrVariableTotalSize += VariableSize;\r
} else {\r
CommonVariableTotalSize += VariableSize;\r
VolatileVariableStore->Reserved1 = 0;\r
\r
//\r
- // Get non-volatile varaible store.\r
+ // Get non-volatile variable store.\r
//\r
\r
TempVariableStoreHeader = (EFI_PHYSICAL_ADDRESS) PcdGet64 (PcdFlashNvStorageVariableBase64);\r