Revision: 15093
          http://sourceforge.net/p/edk2/code/15093
Author:   oliviermartin
Date:     2014-01-10 11:27:31 +0000 (Fri, 10 Jan 2014)
Log Message:
-----------
ArmPkg/ArmPkg.dec: Redefined PcdSystemMemory(Base|Size) as UINT64

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 <[email protected]>

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

Modified: trunk/edk2/ArmPkg/ArmPkg.dec
===================================================================
--- trunk/edk2/ArmPkg/ArmPkg.dec        2014-01-10 08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPkg/ArmPkg.dec        2014-01-10 11:27:31 UTC (rev 15093)
@@ -114,8 +114,8 @@
   # System Memory (DRAM): These PCDs define the region of in-built system 
memory
   # Some platforms can get DRAM extensions, these additional regions will be 
declared
   # to UEFI by ArmPLatformPlib   
-  gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT32|0x00000029
-  gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT32|0x0000002A
+  gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029
+  gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A
 
   # Use ClusterId + CoreId to identify the PrimaryCore
   gArmTokenSpaceGuid.PcdArmPrimaryCoreMask|0xF03|UINT32|0x00000031

Modified: trunk/edk2/ArmPkg/Include/Library/ArmLib.h
===================================================================
--- trunk/edk2/ArmPkg/Include/Library/ArmLib.h  2014-01-10 08:24:29 UTC (rev 
15092)
+++ trunk/edk2/ArmPkg/Include/Library/ArmLib.h  2014-01-10 11:27:31 UTC (rev 
15093)
@@ -76,7 +76,7 @@
 typedef struct {
   EFI_PHYSICAL_ADDRESS          PhysicalBase;
   EFI_VIRTUAL_ADDRESS           VirtualBase;
-  UINTN                         Length;
+  UINT64                        Length;
   ARM_MEMORY_REGION_ATTRIBUTES  Attributes;
 } ARM_MEMORY_REGION_DESCRIPTOR;
 

Modified: trunk/edk2/ArmPkg/Library/BdsLib/AArch64/BdsLinuxLoader.c
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/AArch64/BdsLinuxLoader.c   2014-01-10 
08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPkg/Library/BdsLib/AArch64/BdsLinuxLoader.c   2014-01-10 
11:27:31 UTC (rev 15093)
@@ -223,7 +223,7 @@
 
   // Try to put the kernel at the start of RAM so as to give it access to all 
memory.
   // If that fails fall back to try loading it within LINUX_KERNEL_MAX_OFFSET 
of memory start.
-  LinuxImage = PcdGet32(PcdSystemMemoryBase) + 0x80000;
+  LinuxImage = PcdGet64 (PcdSystemMemoryBase) + 0x80000;
   Status = BdsLoadImage (LinuxKernelDevicePath, AllocateAddress, &LinuxImage, 
&LinuxImageSize);
   if (EFI_ERROR(Status)) {
     // Try again but give the loader more freedom of where to put the image.

Modified: trunk/edk2/ArmPkg/Library/BdsLib/BdsLinuxLoader.h
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/BdsLinuxLoader.h   2014-01-10 08:24:29 UTC 
(rev 15092)
+++ trunk/edk2/ArmPkg/Library/BdsLib/BdsLinuxLoader.h   2014-01-10 11:27:31 UTC 
(rev 15093)
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.
 *  
 *  This program and the accompanying materials                          
 *  are licensed and made available under the terms and conditions of the BSD 
License         
@@ -16,9 +16,9 @@
 #define __BDSLINUXLOADER_H
 
 #define LINUX_UIMAGE_SIGNATURE    0x56190527
-#define LINUX_KERNEL_MAX_OFFSET   (PcdGet32(PcdSystemMemoryBase) + 
PcdGet32(PcdArmLinuxKernelMaxOffset))
-#define LINUX_ATAG_MAX_OFFSET     (PcdGet32(PcdSystemMemoryBase) + 
PcdGet32(PcdArmLinuxAtagMaxOffset))
-#define LINUX_FDT_MAX_OFFSET      (PcdGet32(PcdSystemMemoryBase) + 
PcdGet32(PcdArmLinuxFdtMaxOffset))
+#define LINUX_KERNEL_MAX_OFFSET   (PcdGet64 (PcdSystemMemoryBase) + 
PcdGet32(PcdArmLinuxKernelMaxOffset))
+#define LINUX_ATAG_MAX_OFFSET     (PcdGet64 (PcdSystemMemoryBase) + 
PcdGet32(PcdArmLinuxAtagMaxOffset))
+#define LINUX_FDT_MAX_OFFSET      (PcdGet64 (PcdSystemMemoryBase) + 
PcdGet32(PcdArmLinuxFdtMaxOffset))
 
 // Additional size that could be used for FDT entries added by the UEFI OS 
Loader
 // Estimation based on: EDID (300bytes) + bootargs (200bytes) + initrd region 
(20bytes)

Modified: 
trunk/edk2/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
===================================================================
--- 
trunk/edk2/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
  2014-01-10 08:24:29 UTC (rev 15092)
+++ 
trunk/edk2/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEbMem.c
  2014-01-10 11:27:31 UTC (rev 15093)
@@ -65,9 +65,9 @@
   VirtualMemoryTable[Index].Attributes   = 
(ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes;
 
   // DDR
-  VirtualMemoryTable[++Index].PhysicalBase = PcdGet32 (PcdSystemMemoryBase);
-  VirtualMemoryTable[Index].VirtualBase  = PcdGet32 (PcdSystemMemoryBase);
-  VirtualMemoryTable[Index].Length       = PcdGet32 (PcdSystemMemorySize);
+  VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdSystemMemoryBase);
+  VirtualMemoryTable[Index].VirtualBase  = PcdGet64 (PcdSystemMemoryBase);
+  VirtualMemoryTable[Index].Length       = PcdGet64 (PcdSystemMemorySize);
   VirtualMemoryTable[Index].Attributes   = 
(ARM_MEMORY_REGION_ATTRIBUTES)CacheAttributes;
 
   // SMC CS7

Modified: 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h
===================================================================
--- 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h  
    2014-01-10 08:24:29 UTC (rev 15092)
+++ 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h  
    2014-01-10 11:27:31 UTC (rev 15093)
@@ -52,8 +52,8 @@
 #define ARM_VE_SMB_PERIPH_SZ                    SIZE_64MB
 
 // DRAM
-#define ARM_VE_DRAM_BASE                        PcdGet32 (PcdSystemMemoryBase)
-#define ARM_VE_DRAM_SZ                          PcdGet32 (PcdSystemMemorySize)
+#define ARM_VE_DRAM_BASE                        PcdGet64 (PcdSystemMemoryBase)
+#define ARM_VE_DRAM_SZ                          PcdGet64 (PcdSystemMemorySize)
 // Inside the DRAM we allocate a section for the VRAM (Video RAM)
 #define LCD_VRAM_CORE_TILE_BASE                     0x64000000
 

Modified: 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM/ArmPlatform.h
===================================================================
--- 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM/ArmPlatform.h    
    2014-01-10 08:24:29 UTC (rev 15092)
+++ 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM/ArmPlatform.h    
    2014-01-10 11:27:31 UTC (rev 15093)
@@ -45,8 +45,8 @@
 #define ARM_VE_SMB_PERIPH_SZ                    SIZE_64MB
 
 // DRAM
-#define ARM_VE_DRAM_BASE                        PcdGet32 (PcdSystemMemoryBase)
-#define ARM_VE_DRAM_SZ                          PcdGet32 (PcdSystemMemorySize)
+#define ARM_VE_DRAM_BASE                        PcdGet64 (PcdSystemMemoryBase)
+#define ARM_VE_DRAM_SZ                          PcdGet64 (PcdSystemMemorySize)
 
 // This can be any value since we only support motherboard PL111
 #define LCD_VRAM_CORE_TILE_BASE                 0x00000000

Modified: 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Mem.c
===================================================================
--- 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Mem.c
       2014-01-10 08:24:29 UTC (rev 15092)
+++ 
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7Mem.c
       2014-01-10 11:27:31 UTC (rev 15093)
@@ -136,18 +136,18 @@
 
 #ifndef ARM_BIGLITTLE_TC2
   // Workaround for SRAM bug in RTSM
-  if (PcdGet32 (PcdSystemMemoryBase) != 0x80000000) {
+  if (PcdGet64 (PcdSystemMemoryBase) != 0x80000000) {
     VirtualMemoryTable[++Index].PhysicalBase  = 0x80000000;
     VirtualMemoryTable[Index].VirtualBase     = 0x80000000;
-    VirtualMemoryTable[Index].Length          = PcdGet32 (PcdSystemMemoryBase) 
- 0x80000000;
+    VirtualMemoryTable[Index].Length          = PcdGet64 (PcdSystemMemoryBase) 
- 0x80000000;
     VirtualMemoryTable[Index].Attributes      = CacheAttributes;
   }
 #endif
 
   // DDR
-  VirtualMemoryTable[++Index].PhysicalBase  = PcdGet32 (PcdSystemMemoryBase);
-  VirtualMemoryTable[Index].VirtualBase     = PcdGet32 (PcdSystemMemoryBase);
-  VirtualMemoryTable[Index].Length          = PcdGet32 (PcdSystemMemorySize);
+  VirtualMemoryTable[++Index].PhysicalBase  = PcdGet64 (PcdSystemMemoryBase);
+  VirtualMemoryTable[Index].VirtualBase     = PcdGet64 (PcdSystemMemoryBase);
+  VirtualMemoryTable[Index].Length          = PcdGet64 (PcdSystemMemorySize);
   VirtualMemoryTable[Index].Attributes      = CacheAttributes;
 
   // Detect if it is a 1GB or 2GB Test Chip
@@ -159,13 +159,13 @@
         EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | 
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
           EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | 
EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | 
EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
           EFI_RESOURCE_ATTRIBUTE_TESTED,
-        PcdGet32 (PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize),
+        PcdGet64 (PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize),
         SIZE_1GB
     );
 
     // Map the additional 1GB into the MMU
-    VirtualMemoryTable[++Index].PhysicalBase  = PcdGet32 (PcdSystemMemoryBase) 
+ PcdGet32 (PcdSystemMemorySize);
-    VirtualMemoryTable[Index].VirtualBase     = PcdGet32 (PcdSystemMemoryBase) 
+ PcdGet32 (PcdSystemMemorySize);
+    VirtualMemoryTable[++Index].PhysicalBase  = PcdGet64 (PcdSystemMemoryBase) 
+ PcdGet64 (PcdSystemMemorySize);
+    VirtualMemoryTable[Index].VirtualBase     = PcdGet64 (PcdSystemMemoryBase) 
+ PcdGet64 (PcdSystemMemorySize);
     VirtualMemoryTable[Index].Length          = SIZE_1GB;
     VirtualMemoryTable[Index].Attributes      = CacheAttributes;
   }

Modified: 
trunk/edk2/ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.c
===================================================================
--- 
trunk/edk2/ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.c
    2014-01-10 08:24:29 UTC (rev 15092)
+++ 
trunk/edk2/ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.c
    2014-01-10 11:27:31 UTC (rev 15093)
@@ -19,8 +19,8 @@
 #include <Library/PcdLib.h>
 #include <Library/DebugLib.h>
 
-#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet32 
(PcdSystemMemoryBase) + PcdGet32 (PcdSystemMemorySize))) || \
-                  ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < 
PcdGet32 (PcdSystemMemoryBase)))
+#define IS_XIP() (((UINT32)PcdGet32 (PcdFdBaseAddress) > (UINT32)(PcdGet64 
(PcdSystemMemoryBase) + PcdGet64 (PcdSystemMemorySize))) || \
+                  ((PcdGet32 (PcdFdBaseAddress) + PcdGet32 (PcdFdSize)) < 
PcdGet64 (PcdSystemMemoryBase)))
 
 // Declared by ArmPlatformPkg/PrePi Module
 extern UINTN mGlobalVariableBase;
@@ -40,7 +40,7 @@
   if (IS_XIP()) {
     // In Case of XIP, we expect the Primary Stack at the top of the System 
Memory
     // The size must be 64bit aligned to allow 64bit variable to be aligned
-    GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 
(PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);
+    GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 
(PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);
   } else {
     GlobalVariableBase = mGlobalVariableBase;
   }
@@ -69,7 +69,7 @@
   if (IS_XIP()) {
     // In Case of XIP, we expect the Primary Stack at the top of the System 
Memory
     // The size must be 64bit aligned to allow 64bit variable to be aligned
-    GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 
(PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);
+    GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 
(PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);
   } else {
     GlobalVariableBase = mGlobalVariableBase;
   }
@@ -96,7 +96,7 @@
   if (IS_XIP()) {
     // In Case of XIP, we expect the Primary Stack at the top of the System 
Memory
     // The size must be 64bit aligned to allow 64bit variable to be aligned
-    GlobalVariableBase = PcdGet32 (PcdSystemMemoryBase) + PcdGet32 
(PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);
+    GlobalVariableBase = PcdGet64 (PcdSystemMemoryBase) + PcdGet64 
(PcdSystemMemorySize) - ALIGN_VALUE(PcdGet32 (PcdPeiGlobalVariableSize),0x8);
   } else {
     GlobalVariableBase = mGlobalVariableBase;
   }

Modified: trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c  2014-01-10 
08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c  2014-01-10 
11:27:31 UTC (rev 15093)
@@ -78,7 +78,7 @@
   BOOLEAN                     Found;
 
   // Ensure PcdSystemMemorySize has been set
-  ASSERT (PcdGet32 (PcdSystemMemorySize) != 0);
+  ASSERT (PcdGet64 (PcdSystemMemorySize) != 0);
 
   //
   // Now, the permanent memory has been installed, we can call AllocatePages()
@@ -97,16 +97,16 @@
   BuildResourceDescriptorHob (
       EFI_RESOURCE_SYSTEM_MEMORY,
       ResourceAttributes,
-      PcdGet32 (PcdSystemMemoryBase),
-      PcdGet32 (PcdSystemMemorySize)
+      PcdGet64 (PcdSystemMemoryBase),
+      PcdGet64 (PcdSystemMemorySize)
   );
 
-  SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdSystemMemoryBase) + 
(EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdSystemMemorySize);
+  SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemoryBase) + 
(EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemorySize);
   FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdBaseAddress) + 
(EFI_PHYSICAL_ADDRESS)PcdGet32(PcdFdSize);
 
   // EDK2 does not have the concept of boot firmware copied into DRAM. To 
avoid the DXE
   // core to overwrite this area we must mark the region with the attribute 
non-present
-  if ((PcdGet32 (PcdFdBaseAddress) >= PcdGet32 (PcdSystemMemoryBase)) && 
(FdTop <= SystemMemoryTop)) {
+  if ((PcdGet32 (PcdFdBaseAddress) >= PcdGet64 (PcdSystemMemoryBase)) && 
(FdTop <= SystemMemoryTop)) {
     Found = FALSE;
 
     // Search for System Memory Hob that contains the firmware

Modified: trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c    2014-01-10 
08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c    2014-01-10 
11:27:31 UTC (rev 15093)
@@ -104,10 +104,10 @@
   DEBUG ((EFI_D_ERROR, "Memory Init PEIM Loaded\n"));
 
   // Ensure PcdSystemMemorySize has been set
-  ASSERT (FixedPcdGet32 (PcdSystemMemorySize) != 0);
+  ASSERT (FixedPcdGet64 (PcdSystemMemorySize) != 0);
 
-  SystemMemoryBase = (UINTN)FixedPcdGet32 (PcdSystemMemoryBase);
-  SystemMemoryTop = SystemMemoryBase + (UINTN)FixedPcdGet32 
(PcdSystemMemorySize);
+  SystemMemoryBase = (UINTN)FixedPcdGet64 (PcdSystemMemoryBase);
+  SystemMemoryTop = SystemMemoryBase + (UINTN)FixedPcdGet64 
(PcdSystemMemorySize);
   FdBase = (UINTN)PcdGet32 (PcdFdBaseAddress);
   FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize);
 

Modified: trunk/edk2/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S
===================================================================
--- trunk/edk2/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S  2014-01-10 
08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S  2014-01-10 
11:27:31 UTC (rev 15093)
@@ -42,8 +42,8 @@
 // at the top of the DRAM)
 _SetupStackPosition:
   // Compute Top of System Memory
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), x1)
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), x2)
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), x1)
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), x2)
   sub   x2, x2, #1
   add   x1, x1, x2      // x1 = SystemMemoryTop = PcdSystemMemoryBase + 
PcdSystemMemorySize
 

Modified: trunk/edk2/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S
===================================================================
--- trunk/edk2/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S      2014-01-10 
08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S      2014-01-10 
11:27:31 UTC (rev 15093)
@@ -50,8 +50,8 @@
 // at the top of the DRAM)
 _SetupStackPosition:
   // Compute Top of System Memory
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), r1)
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), r2)
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), r1)
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), r2)
   sub   r2, r2, #1
   add   r1, r1, r2      // r1 = SystemMemoryTop = PcdSystemMemoryBase + 
PcdSystemMemorySize
 

Modified: trunk/edk2/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm
===================================================================
--- trunk/edk2/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm    2014-01-10 
08:24:29 UTC (rev 15092)
+++ trunk/edk2/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm    2014-01-10 
11:27:31 UTC (rev 15093)
@@ -52,8 +52,8 @@
 // at the top of the DRAM)
 _SetupStackPosition
   // Compute Top of System Memory
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemoryBase), r1)
-  LoadConstantToReg (FixedPcdGet32(PcdSystemMemorySize), r2)
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemoryBase), r1)
+  LoadConstantToReg (FixedPcdGet64 (PcdSystemMemorySize), r2)
   sub   r2, r2, #1
   add   r1, r1, r2      // r1 = SystemMemoryTop = PcdSystemMemoryBase + 
PcdSystemMemorySize
 

Modified: trunk/edk2/ArmPlatformPkg/PrePi/PrePi.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/PrePi/PrePi.c     2014-01-10 08:24:29 UTC (rev 
15092)
+++ trunk/edk2/ArmPlatformPkg/PrePi/PrePi.c     2014-01-10 11:27:31 UTC (rev 
15093)
@@ -30,8 +30,8 @@
 #include "PrePi.h"
 #include "LzmaDecompress.h"
 
-#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > 
(UINT32)(FixedPcdGet32 (PcdSystemMemoryBase) + FixedPcdGet32 
(PcdSystemMemorySize))) || \
-                  ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 
(PcdFdSize)) < FixedPcdGet32 (PcdSystemMemoryBase)))
+#define IS_XIP() (((UINT32)FixedPcdGet32 (PcdFdBaseAddress) > 
(UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet32 
(PcdSystemMemorySize))) || \
+                  ((FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 
(PcdFdSize)) < FixedPcdGet64 (PcdSystemMemoryBase)))
 
 // Not used when PrePi in run in XIP mode
 UINTN mGlobalVariableBase = 0;
@@ -108,8 +108,8 @@
 
   // If ensure the FD is either part of the System Memory or totally outside 
of the System Memory (XIP)
   ASSERT (IS_XIP() || 
-          ((FixedPcdGet32 (PcdFdBaseAddress) >= FixedPcdGet32 
(PcdSystemMemoryBase)) &&
-           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 
(PcdFdSize)) <= (UINT32)(FixedPcdGet32 (PcdSystemMemoryBase) + FixedPcdGet32 
(PcdSystemMemorySize)))));
+          ((FixedPcdGet32 (PcdFdBaseAddress) >= FixedPcdGet64 
(PcdSystemMemoryBase)) &&
+           ((UINT32)(FixedPcdGet32 (PcdFdBaseAddress) + FixedPcdGet32 
(PcdFdSize)) <= (UINT32)(FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet64 
(PcdSystemMemorySize)))));
 
   // Initialize the architecture specific bits
   ArchInitialize ();

Modified: trunk/edk2/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c
===================================================================
--- trunk/edk2/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c   
2014-01-10 08:24:29 UTC (rev 15092)
+++ trunk/edk2/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoardMem.c   
2014-01-10 11:27:31 UTC (rev 15093)
@@ -55,9 +55,9 @@
   }
 
   // ReMap (Either NOR Flash or DRAM)
-  VirtualMemoryTable[Index].PhysicalBase = PcdGet32(PcdSystemMemoryBase);
-  VirtualMemoryTable[Index].VirtualBase  = PcdGet32(PcdSystemMemoryBase);
-  VirtualMemoryTable[Index].Length       = PcdGet32(PcdSystemMemorySize);
+  VirtualMemoryTable[Index].PhysicalBase = PcdGet64 (PcdSystemMemoryBase);
+  VirtualMemoryTable[Index].VirtualBase  = PcdGet64 (PcdSystemMemoryBase);
+  VirtualMemoryTable[Index].Length       = PcdGet64 (PcdSystemMemorySize);
   VirtualMemoryTable[Index].Attributes   = CacheAttributes;
 
   // SOC Registers. L3 interconnects

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to