]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
ArmPkg: Made ArmConfigureMmu() returns a status code
[mirror_edk2.git] / ArmPlatformPkg / MemoryInitPei / MemoryInitPeiLib.c
index aee41c247b35b2b45ed28abe14afcda6c82d5322..192486ce566a55decaf4c4d456d262c2f1e2cc60 100755 (executable)
@@ -20,8 +20,6 @@
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
-#include <Chipset/ArmV7.h>\r
-\r
 VOID\r
 BuildMemoryTypeInformationHob (\r
   VOID\r
@@ -35,13 +33,17 @@ InitMmu (
   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