ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable;\r
VOID *TranslationTableBase;\r
UINTN TranslationTableSize;\r
+ RETURN_STATUS Status;\r
\r
// Get Virtual Memory Map from the Platform Library\r
- ArmPlatformGetVirtualMemoryMap(&MemoryTable);\r
+ ArmPlatformGetVirtualMemoryMap (&MemoryTable);\r
\r
//Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in\r
// DRAM (even at the top of DRAM as it is the first permanent memory allocation)\r
- ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);\r
+ Status = ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((EFI_D_ERROR, "Error: Failed to enable MMU\n"));\r
+ }\r
}\r
\r
/*++\r
BOOLEAN Found;\r
\r
// Ensure PcdSystemMemorySize has been set\r
- ASSERT (PcdGet32 (PcdSystemMemorySize) != 0);\r
+ ASSERT (PcdGet64 (PcdSystemMemorySize) != 0);\r
\r
//\r
// Now, the permanent memory has been installed, we can call AllocatePages()\r
BuildResourceDescriptorHob (\r
EFI_RESOURCE_SYSTEM_MEMORY,\r
ResourceAttributes,\r
- PcdGet32 (PcdSystemMemoryBase),\r
- PcdGet32 (PcdSystemMemorySize)\r
+ PcdGet64 (PcdSystemMemoryBase),\r
+ PcdGet64 (PcdSystemMemorySize)\r
);\r
\r
- SystemMemoryTop = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize);\r
- FdTop = PcdGet32(PcdFdBaseAddress) + PcdGet32(PcdFdSize);\r
+ SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemoryBase) + (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemorySize);\r
+ FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdBaseAddress) + (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdSize);\r
\r
// EDK2 does not have the concept of boot firmware copied into DRAM. To avoid the DXE\r
// core to overwrite this area we must mark the region with the attribute non-present\r
- if ((PcdGet32 (PcdFdBaseAddress) >= PcdGet32 (PcdSystemMemoryBase)) && (FdTop <= SystemMemoryTop)) {\r
+ if ((PcdGet32 (PcdFdBaseAddress) >= PcdGet64 (PcdSystemMemoryBase)) && (FdTop <= SystemMemoryTop)) {\r
Found = FALSE;\r
\r
// Search for System Memory Hob that contains the firmware\r