mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 22:54:51 +02:00
ArmVirtPkg/PrePi: remove mSystemMemoryEnd
Recording the top of SEC visible system memory in a global variable is not necessary, and violates the constraints of the SEC/PEI environment, given that it may execute from NOR flash. So remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
c112e371ce
commit
5b005a6b32
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
#include <AsmMacroIoLibV8.h>
|
#include <AsmMacroIoLibV8.h>
|
||||||
|
|
||||||
ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)
|
|
||||||
|
|
||||||
ASM_FUNC(_ModuleEntryPoint)
|
ASM_FUNC(_ModuleEntryPoint)
|
||||||
//
|
//
|
||||||
// We are built as a ET_DYN PIE executable, so we need to process all
|
// We are built as a ET_DYN PIE executable, so we need to process all
|
||||||
@ -68,8 +66,6 @@ _SetupStackPosition:
|
|||||||
ldr x2, PcdGet64 (PcdSystemMemorySize)
|
ldr x2, PcdGet64 (PcdSystemMemorySize)
|
||||||
sub x2, x2, #1
|
sub x2, x2, #1
|
||||||
add x1, x1, x2 // x1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize
|
add x1, x1, x2 // x1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize
|
||||||
adr x2, mSystemMemoryEnd
|
|
||||||
str x1, [x2]
|
|
||||||
|
|
||||||
// Calculate Top of the Firmware Device
|
// Calculate Top of the Firmware Device
|
||||||
ldr x2, PcdGet64 (PcdFdBaseAddress)
|
ldr x2, PcdGet64 (PcdFdBaseAddress)
|
||||||
@ -151,5 +147,3 @@ _PrepareArguments:
|
|||||||
|
|
||||||
_NeverReturn:
|
_NeverReturn:
|
||||||
b _NeverReturn
|
b _NeverReturn
|
||||||
|
|
||||||
ASM_PFX(mSystemMemoryEnd): .8byte 0
|
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
#include <AsmMacroIoLib.h>
|
#include <AsmMacroIoLib.h>
|
||||||
|
|
||||||
ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)
|
|
||||||
|
|
||||||
ASM_FUNC(_ModuleEntryPoint)
|
ASM_FUNC(_ModuleEntryPoint)
|
||||||
//
|
//
|
||||||
// We are built as a ET_DYN PIE executable, so we need to process all
|
// We are built as a ET_DYN PIE executable, so we need to process all
|
||||||
@ -66,12 +64,10 @@ _SetupStackPosition:
|
|||||||
ADRL (r12, PcdGet64 (PcdSystemMemorySize))
|
ADRL (r12, PcdGet64 (PcdSystemMemorySize))
|
||||||
ldrd r2, r3, [r12]
|
ldrd r2, r3, [r12]
|
||||||
|
|
||||||
// calculate the top of memory, and record it in mSystemMemoryEnd
|
// calculate the top of memory
|
||||||
adds r2, r2, r1
|
adds r2, r2, r1
|
||||||
sub r2, r2, #1
|
sub r2, r2, #1
|
||||||
addcs r3, r3, #1
|
addcs r3, r3, #1
|
||||||
adr r12, mSystemMemoryEnd
|
|
||||||
strd r2, r3, [r12]
|
|
||||||
|
|
||||||
// truncate the memory used by UEFI to 4 GB range
|
// truncate the memory used by UEFI to 4 GB range
|
||||||
teq r3, #0
|
teq r3, #0
|
||||||
@ -159,5 +155,3 @@ _PrepareArguments:
|
|||||||
|
|
||||||
_NeverReturn:
|
_NeverReturn:
|
||||||
b _NeverReturn
|
b _NeverReturn
|
||||||
|
|
||||||
ASM_PFX(mSystemMemoryEnd): .quad 0
|
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
|
|
||||||
#define SerialPrint(txt) SerialPortWrite (txt, AsciiStrLen(txt)+1);
|
#define SerialPrint(txt) SerialPortWrite (txt, AsciiStrLen(txt)+1);
|
||||||
|
|
||||||
extern UINT64 mSystemMemoryEnd;
|
|
||||||
|
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TimerConstructor (
|
TimerConstructor (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user