summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-12-07 11:59:51 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2018-12-20 11:02:30 +0100
commit6bd42402f70ba0db9161fc59301b60ee82ba1c09 (patch)
treece15595f5b6d4ff42a1e1c8d644ae89e405f7c51 /ArmPlatformPkg
parent1c36f028fae7583eb4ff5201ea109d90eaedf11e (diff)
downloadedk2-6bd42402f70ba0db9161fc59301b60ee82ba1c09.tar.gz
edk2-6bd42402f70ba0db9161fc59301b60ee82ba1c09.tar.bz2
edk2-6bd42402f70ba0db9161fc59301b60ee82ba1c09.zip
ArmPlatformPkg/MemoryInitPeim: take MAX_ALLOC_ADDRESS into account
Limit the PEI memory region so it will not extend beyond what we can address architecturally when running with 4 KB pages. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
index 389a2e6f1a..010f93add7 100644
--- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
+++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
@@ -105,12 +105,12 @@ InitializeMemory (
// Ensure PcdSystemMemorySize has been set
ASSERT (PcdGet64 (PcdSystemMemorySize) != 0);
- ASSERT (PcdGet64 (PcdSystemMemoryBase) < (UINT64)MAX_ADDRESS);
+ ASSERT (PcdGet64 (PcdSystemMemoryBase) < (UINT64)MAX_ALLOC_ADDRESS);
SystemMemoryBase = (UINTN)PcdGet64 (PcdSystemMemoryBase);
SystemMemoryTop = SystemMemoryBase + PcdGet64 (PcdSystemMemorySize);
- if (SystemMemoryTop - 1 > MAX_ADDRESS) {
- SystemMemoryTop = (UINT64)MAX_ADDRESS + 1;
+ if (SystemMemoryTop - 1 > MAX_ALLOC_ADDRESS) {
+ SystemMemoryTop = (UINT64)MAX_ALLOC_ADDRESS + 1;
}
FdBase = (UINTN)PcdGet64 (PcdFdBaseAddress);
FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize);