Revision: 18426
http://sourceforge.net/p/edk2/code/18426
Author: abiesheuvel
Date: 2015-09-09 14:48:25 +0000 (Wed, 09 Sep 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
Modified: trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c 2015-09-09
13:37:50 UTC (rev 18425)
+++ trunk/edk2/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c 2015-09-09
14:48:25 UTC (rev 18426)
@@ -96,7 +96,7 @@
{
EFI_STATUS Status;
UINTN SystemMemoryBase;
- UINTN SystemMemoryTop;
+ UINT64 SystemMemoryTop;
UINTN FdBase;
UINTN FdTop;
UINTN UefiMemoryBase;
@@ -115,7 +115,10 @@
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);
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits