mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
ArmPlatformPkg/MemoryInitPeim: handle memory above 4 GB on 32-bit ARM
Make sure that the PEI memory region is carved out of memory that is 32-bit addressable, by taking MAX_ADDRESS into account (which is defined as '4 GB - 1' on ARM) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18426 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8483681426
commit
984ec7588d
@ -96,7 +96,7 @@ InitializeMemory (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN SystemMemoryBase;
|
||||
UINTN SystemMemoryTop;
|
||||
UINT64 SystemMemoryTop;
|
||||
UINTN FdBase;
|
||||
UINTN FdTop;
|
||||
UINTN UefiMemoryBase;
|
||||
@ -115,7 +115,10 @@ InitializeMemory (
|
||||
ASSERT (PcdGet64 (PcdSystemMemorySize) != 0);
|
||||
|
||||
SystemMemoryBase = (UINTN)PcdGet64 (PcdSystemMemoryBase);
|
||||
SystemMemoryTop = SystemMemoryBase + (UINTN)PcdGet64 (PcdSystemMemorySize);
|
||||
SystemMemoryTop = SystemMemoryBase + PcdGet64 (PcdSystemMemorySize);
|
||||
if (SystemMemoryTop - 1 > MAX_ADDRESS) {
|
||||
SystemMemoryTop = (UINT64)MAX_ADDRESS + 1;
|
||||
}
|
||||
FdBase = (UINTN)PcdGet64 (PcdFdBaseAddress);
|
||||
FdTop = FdBase + (UINTN)PcdGet32 (PcdFdSize);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user