]> 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 fa24c45ea8e3ff8b7f2ffaa18454e051b9f3d9a2..192486ce566a55decaf4c4d456d262c2f1e2cc60 100755 (executable)
@@ -33,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
 \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