]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmPkg.dec: Redefined PcdSystemMemory(Base|Size) as UINT64
authorOlivier Martin <olivier.martin@arm.com>
Fri, 10 Jan 2014 11:27:31 +0000 (11:27 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 10 Jan 2014 11:27:31 +0000 (11:27 +0000)
The System Memory region might be out of the 32-bit memory space.

This change has been validated on the FVP AArch64 model using 4GB
of DRAM at 0x8_0000_0000:

-  # System Memory (2GB)
-  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
-  gArmTokenSpaceGuid.PcdSystemMemorySize|0x80000000
+  # System Memory (4GB)
+  gArmTokenSpaceGuid.PcdSystemMemoryBase|0x800000000
+  gArmTokenSpaceGuid.PcdSystemMemorySize|0x100000000

EFI Shell and Linux kernel boot successfully.

Note: This change has not been validated on AArch32. I expect some
early assembly code to not work.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15093 6f19259b-4bc3-4df7-8a09-765794883524

16 files changed:
ArmPkg/ArmPkg.dec
ArmPkg/Include/Library/ArmLib.h
ArmPkg/Library/BdsLib/AArch64/BdsLinuxLoader.c
ArmPkg/Library/BdsLib/BdsLinuxLoader.h
ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h
ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM/ArmPlatform.h
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Mem.c
ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S
ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm
ArmPlatformPkg/PrePi/PrePi.c
BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c

index 1d6231c6783225d9dde25581a8e5698446fe32b9..f11243f236058b81b42b245a47f260ac279a80ff 100644 (file)
   # System Memory (DRAM): These PCDs define the region of in-built system memory\r
   # Some platforms can get DRAM extensions, these additional regions will be declared\r
   # to UEFI by ArmPLatformPlib   \r
-  gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029\r
-  gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A\r
+  gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029\r
+  gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A\r
 \r
   # Use ClusterId + CoreId to identify the PrimaryCore\r
   gArmTokenSpaceGuid.PcdArmPrimaryCoreMask|0xF03|UINT32|0x00000031\r
index 611622e1a8e72bba47fe921f63bf8e6cb6d647a2..a05f7251a1c3e8068f164f11c86b08e287b2ee68 100644 (file)
@@ -76,7 +76,7 @@ typedef enum {
 typedef struct {\r
   EFI_PHYSICAL_ADDRESS          PhysicalBase;\r
   EFI_VIRTUAL_ADDRESS           VirtualBase;\r
-  UINT                        Length;\r
+  UINT64                        Length;\r
   ARM_MEMORY_REGION_ATTRIBUTES  Attributes;\r
 } ARM_MEMORY_REGION_DESCRIPTOR;\r
 \r
index 887058bafe60b0be73589617e3f68798904bd2b0..19177c8e4e3b62d16a508b6d805156f50e2b2f72 100644 (file)
@@ -223,7 +223,7 @@ BdsBootLinuxFdt (
 \r
   // Try to put the kernel at the start of RAM so as to give it access to all memory.\r
   // If that fails fall back to try loading it within LINUX_KERNEL_MAX_OFFSET of memory start.\r
-  LinuxImage = PcdGet32(PcdSystemMemoryBase) + 0x80000;\r
+  LinuxImage = PcdGet64 (PcdSystemMemoryBase) + 0x80000;\r
   Status = BdsLoadImage (LinuxKernelDevicePath, AllocateAddress, &LinuxImage, &LinuxImageSize);\r
   if (EFI_ERROR(Status)) {\r
     // Try again but give the loader more freedom of where to put the image.\r
index 09b212f364e27baf0601810d8330aa6278d6d1bb..8949cfa9813d9c3b34a5ba23498e11add2128ae2 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2013, ARM 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
@@ -16,9 +16,9 @@
 #define __BDSLINUXLOADER_H\r
 \r
 #define LINUX_UIMAGE_SIGNATURE    0x56190527\r
-#define LINUX_KERNEL_MAX_OFFSET   (PcdGet32(PcdSystemMemoryBase) + PcdGet32(PcdArmLinuxKernelMaxOffset))\r
-#define LINUX_ATAG_MAX_OFFSET     (PcdGet32(PcdSystemMemoryBase) + PcdGet32(PcdArmLinuxAtagMaxOffset))\r
-#define LINUX_FDT_MAX_OFFSET      (PcdGet32(PcdSystemMemoryBase) + PcdGet32(PcdArmLinuxFdtMaxOffset))\r
+#define LINUX_KERNEL_MAX_OFFSET   (PcdGet64 (PcdSystemMemoryBase) + PcdGet32(PcdArmLinuxKernelMaxOffset))\r
+#define LINUX_ATAG_MAX_OFFSET     (PcdGet64 (PcdSystemMemoryBase) + PcdGet32(PcdArmLinuxAtagMaxOffset))\r
+#define LINUX_FDT_MAX_OFFSET      (PcdGet64 (PcdSystemMemoryBase) + PcdGet32(PcdArmLinuxFdtMaxOffset))\r
 \r
 // Additional size that could be used for FDT entries added by the UEFI OS Loader\r
 // Estimation based on: EDID (300bytes) + bootargs (200bytes) + initrd region (20bytes)\r
index c7a413dc2e66b6ce688e190b55a03544f2d27d4d..1ed2c478031919ffc2cc0090b24a1693d1f837ea 100644 (file)
@@ -65,9 +65,9 @@ ArmPlatformGetVirtualMemoryMap (
   VirtualMemoryTable[Index].Attributes   = (ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes;\r
 \r
   // DDR\r
-  VirtualMemoryTable[++Index].PhysicalBase = PcdGet32 (PcdSystemMemoryBase);\r
-  VirtualMemoryTable[Index].VirtualBase  = PcdGet32 (PcdSystemMemoryBase);\r
-  VirtualMemoryTable[Index].Length       = PcdGet32 (PcdSystemMemorySize);\r
+  VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdSystemMemoryBase);\r
+  VirtualMemoryTable[Index].VirtualBase  = PcdGet64 (PcdSystemMemoryBase);\r
+  VirtualMemoryTable[Index].Length       = PcdGet64 (PcdSystemMemorySize);\r
   VirtualMemoryTable[Index].Attributes   = (ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes;\r
 \r
   // SMC CS7\r
index 06537a428b6a86c05f25f5dcb3499d12ba5cc228..b692b168cb0d37f8d4d81c5655908e8227bacf65 100644 (file)
@@ -52,8 +52,8 @@
 #define ARM_VE_SMB_PERIPH_SZ                    SIZE_64MB\r
 \r
 // DRAM\r
-#define ARM_VE_DRAM_BASE                        PcdGet32 (PcdSystemMemoryBase)\r
-#define ARM_VE_DRAM_SZ                          PcdGet32 (PcdSystemMemorySize)\r
+#define ARM_VE_DRAM_BASE                        PcdGet64 (PcdSystemMemoryBase)\r
+#define ARM_VE_DRAM_SZ                          PcdGet64 (PcdSystemMemorySize)\r
 // Inside the DRAM we allocate a section for the VRAM (Video RAM)\r
 #define LCD_VRAM_CORE_TILE_BASE                     0x64000000\r
 \r
index b568d6fa2ecfa56f97c4161b02a71a5aeca52d90..06414e6e7208aa8718c8058fb606bf0e35db0052 100644 (file)
@@ -45,8 +45,8 @@
 #define ARM_VE_SMB_PERIPH_SZ                    SIZE_64MB\r
 \r
 // DRAM\r
-#define ARM_VE_DRAM_BASE                        PcdGet32 (PcdSystemMemoryBase)\r
-#define ARM_VE_DRAM_SZ                          PcdGet32 (PcdSystemMemorySize)\r
+#define ARM_VE_DRAM_BASE                        PcdGet64 (PcdSystemMemoryBase)\r
+#define ARM_VE_DRAM_SZ                          PcdGet64 (PcdSystemMemorySize)\r
 \r
 // This can be any value since we only support motherboard PL111\r
 #define LCD_VRAM_CORE_TILE_BASE                 0x00000000\r
index 473b3f323ef4472ae005a855dbead17cd8f4e4eb..e633c893759c014d0539afbf158f126c71c89f52 100644 (file)
@@ -136,18 +136,18 @@ ArmPlatformGetVirtualMemoryMap (
 \r
 #ifndef ARM_BIGLITTLE_TC2\r
   // Workaround for SRAM bug in RTSM\r
-  if (PcdGet32 (PcdSystemMemoryBase) != 0x80000000) {\r
+  if (PcdGet64 (PcdSystemMemoryBase) != 0x80000000) {\r
     VirtualMemoryTable[++Index].PhysicalBase  = 0x80000000;\r
     VirtualMemoryTable[Index].VirtualBase     = 0x80000000;\r
-    VirtualMemoryTable[Index].Length          = PcdGet32 (PcdSystemMemoryBase) - 0x80000000;\r
+    VirtualMemoryTable[Index].Length          = PcdGet64 (PcdSystemMemoryBase) - 0x80000000;\r
     VirtualMemoryTable[Index].Attributes      = CacheAttributes;\r
   }\r
 #endif\r
 \r
   // DDR\r
-  VirtualMemoryTable[++Index].PhysicalBase  = PcdGet32 (PcdSystemMemoryBase);\r
-  VirtualMemoryTable[Index].VirtualBase     = PcdGet32 (PcdSystemMemoryBase);\r
-  VirtualMemoryTable[Index].Length          = PcdGet32 (PcdSystemMemorySize);\r
+  VirtualMemoryTable[++Index].PhysicalBase  = PcdGet64 (PcdSystemMemoryBase);\r
+  VirtualMemoryTable[Index].VirtualBase     = PcdGet64 (PcdSystemMemoryBase);\r
+  VirtualMemoryTable[Index].Length          = PcdGet64 (PcdSystemMemorySize);\r
   VirtualMemoryTable[Index].Attributes      = CacheAttributes;\r
 \r
   // Detect if it is a 1GB or 2GB Test Chip\r
@@ -159,13 +159,13 @@ ArmPlatformGetVirtualMemoryMap (
         EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |\r
           EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |\r
           EFI_RESOURCE_ATTRIBUTE_TESTED,\r
-        PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize),\r
+        PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize),\r
         SIZE_1GB\r
     );\r
 \r
     // Map the additional 1GB into the MMU\r
-    VirtualMemoryTable[++Index].PhysicalBase  = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize);\r
-    VirtualMemoryTable[Index].VirtualBase     = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize);\r
+    VirtualMemoryTable[++Index].PhysicalBase  = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize);\r
+    VirtualMemoryTable[Index].VirtualBase     = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize);\r
     VirtualMemoryTable[Index].Length          = SIZE_1GB;\r
     VirtualMemoryTable[Index].Attributes      = CacheAttributes;\r
   }\r
index 47430e302b99b55c41b175e7363a9ae6a0054d50..02cbb00daf479f5b7e4376dca02c69328b08f3a4 100644 (file)
@@ -19,8 +19,8 @@
 #include <Library/PcdLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
-#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize))) || \\r
-                  ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < PcdGet32 (PcdSystemMemoryBase)))\r
+#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize))) || \\r
+                  ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < PcdGet64 (PcdSystemMemoryBase)))\r
 \r
 // Declared by ArmPlatformPkg/PrePi Module\r
 extern UINTN mGlobalVariableBase;\r
@@ -40,7 +40,7 @@ ArmPlatformGetGlobalVariable (
   if (IS_XIP()) {\r
     // In Case of XIP, we expect the Primary Stack at the top of the System Memory\r
     // The size must be 64bit aligned to allow 64bit variable to be aligned\r
-    GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
+    GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
   } else {\r
     GlobalVariableBase = mGlobalVariableBase;\r
   }\r
@@ -69,7 +69,7 @@ ArmPlatformSetGlobalVariable (
   if (IS_XIP()) {\r
     // In Case of XIP, we expect the Primary Stack at the top of the System Memory\r
     // The size must be 64bit aligned to allow 64bit variable to be aligned\r
-    GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
+    GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
   } else {\r
     GlobalVariableBase = mGlobalVariableBase;\r
   }\r
@@ -96,7 +96,7 @@ ArmPlatformGetGlobalVariableAddress (
   if (IS_XIP()) {\r
     // In Case of XIP, we expect the Primary Stack at the top of the System Memory\r
     // The size must be 64bit aligned to allow 64bit variable to be aligned\r
-    GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
+    GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);\r
   } else {\r
     GlobalVariableBase = mGlobalVariableBase;\r
   }\r
index d1bf394c45456b89da0effe063692daf38b88e7c..0214897d8b5cdecfa0c8cffb9e089a0b835f90ca 100755 (executable)
@@ -78,7 +78,7 @@ MemoryPeim (
   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
@@ -97,16 +97,16 @@ MemoryPeim (
   BuildResourceDescriptorHob (\r
       EFI_RESOURCE_SYSTEM_MEMORY,\r
       ResourceAttributes,\r
-      PcdGet32 (PcdSystemMemoryBase),\r
-      PcdGet32 (PcdSystemMemorySize)\r
+      PcdGet64 (PcdSystemMemoryBase),\r
+      PcdGet64 (PcdSystemMemorySize)\r
   );\r
 \r
-  SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdSystemMemoryBase) + (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdSystemMemorySize);\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
index 1de7d38078c506a5684d3f9bf19739a450782c41..c6a6fe64ba811d42ff5a0c386036c260558a3dd3 100755 (executable)
@@ -104,10 +104,10 @@ InitializeMemory (
   DEBUG ((EFI_D_ERROR, "Memory Init PEIM Loaded\n"));\r
 \r
   // Ensure PcdSystemMemorySize has been set\r
-  ASSERT (FixedPcdGet32 (PcdSystemMemorySize) != 0);\r
+  ASSERT (FixedPcdGet64 (PcdSystemMemorySize) != 0);\r
 \r
-  SystemMemoryBase = (UINTN)FixedPcdGet32 (PcdSystemMemoryBase);\r
-  SystemMemoryTop = SystemMemoryBase + (UINTN)FixedPcdGet32 (PcdSystemMemorySize);\r
+  SystemMemoryBase = (UINTN)FixedPcdGet64 (PcdSystemMemoryBase);\r
+  SystemMemoryTop = SystemMemoryBase + (UINTN)FixedPcdGet64 (PcdSystemMemorySize);\r
   FdBase = (UINTN)PcdGet32 (PcdFdBaseAddress);\r
   FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize);\r
 \r
index 6358e3a27eb13cf894d376d027f7b46d61de67d6..86b2f245919673b41b3fd3b06442d5ba3874d4e7 100644 (file)
@@ -42,8 +42,8 @@ _SetSVCMode:
 // at the top of the DRAM)\r
 _SetupStackPosition:\r
   // Compute Top of System Memory\r
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), x1)\r
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), x2)\r
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), x1)\r
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), x2)\r
   sub   x2, x2, #1\r
   add   x1, x1, x2      // x1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize\r
 \r
index 3d4e1e927920a102dbd6a053ce05303bcd1d2567..50671aecd7cb9885be88ed4767675e1f0af162fa 100644 (file)
@@ -50,8 +50,8 @@ _SetSVCMode:
 // at the top of the DRAM)\r
 _SetupStackPosition:\r
   // Compute Top of System Memory\r
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), r1)\r
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), r2)\r
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), r1)\r
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), r2)\r
   sub   r2, r2, #1\r
   add   r1, r1, r2      // r1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize\r
 \r
index 993fccfa47d2e0519305c5e6e57ed59ce66496c9..f76b62e5d0a1c5dba8c0a98fb27a779a5a00ec8d 100644 (file)
@@ -52,8 +52,8 @@ _SetSVCMode
 // at the top of the DRAM)\r
 _SetupStackPosition\r
   // Compute Top of System Memory\r
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), r1)\r
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), r2)\r
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), r1)\r
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), r2)\r
   sub   r2, r2, #1\r
   add   r1, r1, r2      // r1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize\r
 \r
index 7ef88c0e36a966157a51f6e8caba158f8d485fb2..d54ebf93371a54a6a5d57ec42a090e0566d7ba31 100755 (executable)
@@ -30,8 +30,8 @@
 #include "PrePi.h"\r
 #include "LzmaDecompress.h"\r
 \r
-#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > (UINT32)(FixedPcdGet32 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize))) || \\r
-                  ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet32 (PcdSystemMemoryBase)))\r
+#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize))) || \\r
+                  ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))\r
 \r
 // Not used when PrePi in run in XIP mode\r
 UINTN mGlobalVariableBase = 0;\r
@@ -108,8 +108,8 @@ PrePiMain (
 \r
   // If ensure the FD is either part of the System Memory or totally outside of the System Memory (XIP)\r
   ASSERT (IS_XIP() || \r
-          ((FixedPcdGet32 (PcdFdBaseAddress) >= FixedPcdGet32 (PcdSystemMemoryBase)) &&\r
-           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= (UINT32)(FixedPcdGet32 (PcdSystemMemoryBase) + FixedPcdGet32 (PcdSystemMemorySize)))));\r
+          ((FixedPcdGet32 (PcdFdBaseAddress) >= FixedPcdGet64 (PcdSystemMemoryBase)) &&\r
+           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 (PcdFdSize)) <= (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet64 (PcdSystemMemorySize)))));\r
 \r
   // Initialize the architecture specific bits\r
   ArchInitialize ();\r
index 5524ddbcad863d7f6a90d5a4fec9fb16a7b4c3c1..210e850c8d23e46fd73a510bd964fcf0b3e9dc5f 100755 (executable)
@@ -55,9 +55,9 @@ ArmPlatformGetVirtualMemoryMap (
   }\r
 \r
   // ReMap (Either NOR Flash or DRAM)\r
-  VirtualMemoryTable[Index].PhysicalBase = PcdGet32(PcdSystemMemoryBase);\r
-  VirtualMemoryTable[Index].VirtualBase  = PcdGet32(PcdSystemMemoryBase);\r
-  VirtualMemoryTable[Index].Length       = PcdGet32(PcdSystemMemorySize);\r
+  VirtualMemoryTable[Index].PhysicalBase = PcdGet64 (PcdSystemMemoryBase);\r
+  VirtualMemoryTable[Index].VirtualBase  = PcdGet64 (PcdSystemMemoryBase);\r
+  VirtualMemoryTable[Index].Length       = PcdGet64 (PcdSystemMemorySize);\r
   VirtualMemoryTable[Index].Attributes   = CacheAttributes;\r
 \r
   // SOC Registers. L3 interconnects\r