]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuPei/CpuPei.c
ArmPkg: Made ArmConfigureMmu() returns a status code
[mirror_edk2.git] / ArmPkg / Drivers / CpuPei / CpuPei.c
index f358cb845a6660ca66e49325a290a4d08a6904c1..e984f5f1bf020040acd50aaca835b58fa9595102 100755 (executable)
@@ -2,7 +2,7 @@
 \r
 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2011 Hewlett Packard Corporation. All rights reserved.<BR>\r
 \r
 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
 Copyright (c) 2011 Hewlett Packard Corporation. All rights reserved.<BR>\r
-Copyright (c) 2011, ARM Limited. All rights reserved.<BR>\r
+Copyright (c) 2011-2013, ARM Limited. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 \r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
@@ -137,7 +137,10 @@ ConfigureMmu (
     SystemMemoryBase, SystemMemoryLength/1024/1024,\r
     (CacheAttributes == DDR_ATTRIBUTES_CACHED) ? "cacheable" : "uncacheable"));\r
 \r
     SystemMemoryBase, SystemMemoryLength/1024/1024,\r
     (CacheAttributes == DDR_ATTRIBUTES_CACHED) ? "cacheable" : "uncacheable"));\r
 \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 (error code: %r)\n", Status));\r
+  }\r
   \r
   BuildMemoryAllocationHob((EFI_PHYSICAL_ADDRESS)(UINTN)TranslationTableBase, TranslationTableSize, EfiBootServicesData);\r
 }\r
   \r
   BuildMemoryAllocationHob((EFI_PHYSICAL_ADDRESS)(UINTN)TranslationTableBase, TranslationTableSize, EfiBootServicesData);\r
 }\r