diff options
-rw-r--r-- | ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S | 4 | ||||
-rw-r--r-- | ArmVirtPkg/PrePi/PrePi.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S index 568d0086d6..0adaf44c9e 100644 --- a/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S +++ b/ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S @@ -25,8 +25,10 @@ GCC_ASM_IMPORT(ArmReadMpidr) GCC_ASM_IMPORT(ArmPlatformPeiBootAction)
GCC_ASM_IMPORT(ArmPlatformStackSet)
GCC_ASM_EXPORT(_ModuleEntryPoint)
+GCC_ASM_EXPORT(mSystemMemoryEnd)
StartupAddr: .8byte ASM_PFX(CEntryPoint)
+mSystemMemoryEnd: .8byte 0
ASM_PFX(_ModuleEntryPoint):
//
@@ -80,6 +82,8 @@ _SetupStackPosition: ldr x2, PcdGet64 (PcdSystemMemorySize)
sub x2, x2, #1
add x1, x1, x2 // x1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize
+ adr x2, mSystemMemoryEnd
+ str x1, [x2]
// Calculate Top of the Firmware Device
ldr x2, PcdGet64 (PcdFdBaseAddress)
diff --git a/ArmVirtPkg/PrePi/PrePi.h b/ArmVirtPkg/PrePi/PrePi.h index 517429fab9..15b91e49c9 100644 --- a/ArmVirtPkg/PrePi/PrePi.h +++ b/ArmVirtPkg/PrePi/PrePi.h @@ -29,6 +29,8 @@ #define SerialPrint(txt) SerialPortWrite (txt, AsciiStrLen(txt)+1);
+extern UINT64 mSystemMemoryEnd;
+
RETURN_STATUS
EFIAPI
TimerConstructor (
|