//\r
// Mark the variable storage region of the FLASH as RUNTIME.\r
//\r
- VariableStoreBase = mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase;\r
+ VariableStoreBase = NvStorageVariableBase + (((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)(NvStorageVariableBase))->HeaderLength);\r
VariableStoreLength = ((VARIABLE_STORE_HEADER *)(UINTN)VariableStoreBase)->Size;\r
BaseAddress = VariableStoreBase & (~EFI_PAGE_MASK);\r
Length = VariableStoreLength + (VariableStoreBase - BaseAddress);\r
\r
Status = gDS->GetMemorySpaceDescriptor (BaseAddress, &GcdDescriptor);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_WARN, "Variable driver failed to add EFI_MEMORY_RUNTIME attribute to Flash.\n"));\r
+ DEBUG ((DEBUG_WARN, "Variable driver failed to get flash memory attribute.\n"));\r
} else {\r
Status = gDS->SetMemorySpaceAttributes (\r
BaseAddress,\r