return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- NvStorageBase = (EFI_PHYSICAL_ADDRESS) PcdGet64 (PcdFlashNvStorageVariableBase64);\r
- if (NvStorageBase == 0) {\r
- NvStorageBase = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageVariableBase);\r
- }\r
+ NvStorageBase = NV_STORAGE_VARIABLE_BASE;\r
ASSERT (NvStorageBase != 0);\r
\r
//\r
}\r
\r
/**\r
- Initializes variable write service after FTW was ready.\r
+ Initializes variable write service.\r
\r
@retval EFI_SUCCESS Function successfully executed.\r
@retval Others Fail to initialize the variable service.\r
EFI_STATUS Status;\r
UINTN Index;\r
UINT8 Data;\r
- EFI_PHYSICAL_ADDRESS VariableStoreBase;\r
- EFI_PHYSICAL_ADDRESS NvStorageBase;\r
VARIABLE_ENTRY_PROPERTY *VariableEntry;\r
\r
AcquireLockOnlyAtBootTime(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock);\r
\r
- NvStorageBase = (EFI_PHYSICAL_ADDRESS) PcdGet64 (PcdFlashNvStorageVariableBase64);\r
- if (NvStorageBase == 0) {\r
- NvStorageBase = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageVariableBase);\r
- }\r
- VariableStoreBase = NvStorageBase + (mNvFvHeaderCache->HeaderLength);\r
-\r
- //\r
- // Let NonVolatileVariableBase point to flash variable store base directly after FTW ready.\r
- //\r
- mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase = VariableStoreBase;\r
-\r
//\r
// Check if the free area is really free.\r
//\r