diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-01-10 11:27:31 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-01-10 11:27:31 +0000 |
commit | c357fd6a1f79e2d7b0a1bd01994b8d33925bfff5 (patch) | |
tree | b65ae48d420d19197ab04b50acff06cadbde24e8 /ArmPlatformPkg/PrePi | |
parent | 18b24f924f06f2345c0410d145d14e1a9a500dc8 (diff) | |
download | edk2-platforms-c357fd6a1f79e2d7b0a1bd01994b8d33925bfff5.tar.xz |
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 <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15093 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/PrePi')
-rw-r--r-- | ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S | 4 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S | 4 | ||||
-rw-r--r-- | ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm | 4 | ||||
-rwxr-xr-x | ArmPlatformPkg/PrePi/PrePi.c | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S index 6358e3a27e..86b2f24591 100644 --- a/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -42,8 +42,8 @@ _SetSVCMode: // 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
diff --git a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S index 3d4e1e9279..50671aecd7 100644 --- a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S +++ b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.S @@ -50,8 +50,8 @@ _SetSVCMode: // 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
diff --git a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm index 993fccfa47..f76b62e5d0 100644 --- a/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm +++ b/ArmPlatformPkg/PrePi/Arm/ModuleEntryPoint.asm @@ -52,8 +52,8 @@ _SetSVCMode // 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
diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index 7ef88c0e36..d54ebf9337 100755 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -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 @@ PrePiMain ( // 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 ();
|