]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c
ArmVirtPkg: Change use of EFI_D_* to DEBUG_*
[mirror_edk2.git] / ArmVirtPkg / Library / ArmVirtMemoryInitPeiLib / ArmVirtMemoryInitPeiLib.c
index 6f3e54b7afcb6ecc9eae5af53c6449244250a6d8..4946fad77adf74a10772ecf6a33e0dfab95c7ed2 100644 (file)
@@ -3,20 +3,14 @@
 *  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *  Copyright (c) 2014, Linaro Limited. All rights reserved.\r
 *\r
-*  This program and the accompanying materials\r
-*  are licensed and made available under the terms and conditions of the BSD License\r
-*  which accompanies this distribution.  The full text of the license may be found at\r
-*  http://opensource.org/licenses/bsd-license.php\r
-*\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+*  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 *\r
 **/\r
 \r
 #include <PiPei.h>\r
 \r
 #include <Library/ArmMmuLib.h>\r
-#include <Library/ArmPlatformLib.h>\r
+#include <Library/ArmVirtMemInfoLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/HobLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
@@ -39,13 +33,13 @@ InitMmu (
   RETURN_STATUS                 Status;\r
 \r
   // Get Virtual Memory Map from the Platform Library\r
-  ArmPlatformGetVirtualMemoryMap (&MemoryTable);\r
+  ArmVirtGetMemoryMap (&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
   Status = ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "Error: Failed to enable MMU\n"));\r
+    DEBUG ((DEBUG_ERROR, "Error: Failed to enable MMU\n"));\r
   }\r
 }\r
 \r
@@ -75,18 +69,18 @@ MemoryPeim (
   SystemMemoryTop = PcdGet64 (PcdSystemMemoryBase) +\r
                     PcdGet64 (PcdSystemMemorySize);\r
 \r
-  if (SystemMemoryTop - 1 > MAX_ADDRESS) {\r
+  if (SystemMemoryTop - 1 > MAX_ALLOC_ADDRESS) {\r
     BuildResourceDescriptorHob (\r
         EFI_RESOURCE_SYSTEM_MEMORY,\r
         ResourceAttributes,\r
         PcdGet64 (PcdSystemMemoryBase),\r
-        (UINT64)MAX_ADDRESS - PcdGet64 (PcdSystemMemoryBase) + 1\r
+        (UINT64)MAX_ALLOC_ADDRESS - PcdGet64 (PcdSystemMemoryBase) + 1\r
         );\r
     BuildResourceDescriptorHob (\r
         EFI_RESOURCE_SYSTEM_MEMORY,\r
         ResourceAttributes,\r
-        (UINT64)MAX_ADDRESS + 1,\r
-        SystemMemoryTop - MAX_ADDRESS - 1\r
+        (UINT64)MAX_ALLOC_ADDRESS + 1,\r
+        SystemMemoryTop - MAX_ALLOC_ADDRESS - 1\r
         );\r
   } else {\r
     BuildResourceDescriptorHob (\r