]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/PrePi: remove mSystemMemoryEnd
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 24 Oct 2016 08:22:22 +0000 (09:22 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 24 Oct 2016 14:57:25 +0000 (15:57 +0100)
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>
ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmVirtPkg/PrePi/Arm/ModuleEntryPoint.S
ArmVirtPkg/PrePi/PrePi.h

index 9c040b17f253b7f9ef4951c1bdb932b80102bb98..cc8b47e690265afbe43cd1f1f5fd6c03e64e155b 100644 (file)
@@ -14,8 +14,6 @@
 \r
 #include <AsmMacroIoLibV8.h>\r
 \r
-ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)\r
-\r
 ASM_FUNC(_ModuleEntryPoint)\r
   //\r
   // We are built as a ET_DYN PIE executable, so we need to process all\r
@@ -68,8 +66,6 @@ _SetupStackPosition:
   ldr   x2, PcdGet64 (PcdSystemMemorySize)\r
   sub   x2, x2, #1\r
   add   x1, x1, x2      // x1 = SystemMemoryTop = PcdSystemMemoryBase + PcdSystemMemorySize\r
-  adr   x2, mSystemMemoryEnd\r
-  str   x1, [x2]\r
 \r
   // Calculate Top of the Firmware Device\r
   ldr   x2, PcdGet64 (PcdFdBaseAddress)\r
@@ -151,5 +147,3 @@ _PrepareArguments:
 \r
 _NeverReturn:\r
   b _NeverReturn\r
-\r
-ASM_PFX(mSystemMemoryEnd):    .8byte 0\r
index e03aeefbb003283379ba1759100c8bbeb98de69d..59028d0a553ed23387cec5ef11a25cc8dd7dae9a 100644 (file)
@@ -14,8 +14,6 @@
 \r
 #include <AsmMacroIoLib.h>\r
 \r
-ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)\r
-\r
 ASM_FUNC(_ModuleEntryPoint)\r
   //\r
   // We are built as a ET_DYN PIE executable, so we need to process all\r
@@ -66,12 +64,10 @@ _SetupStackPosition:
   ADRL  (r12, PcdGet64 (PcdSystemMemorySize))\r
   ldrd  r2, r3, [r12]\r
 \r
-  // calculate the top of memory, and record it in mSystemMemoryEnd\r
+  // calculate the top of memory\r
   adds  r2, r2, r1\r
   sub   r2, r2, #1\r
   addcs r3, r3, #1\r
-  adr   r12, mSystemMemoryEnd\r
-  strd  r2, r3, [r12]\r
 \r
   // truncate the memory used by UEFI to 4 GB range\r
   teq   r3, #0\r
@@ -159,5 +155,3 @@ _PrepareArguments:
 \r
 _NeverReturn:\r
   b _NeverReturn\r
-\r
-ASM_PFX(mSystemMemoryEnd):    .quad 0\r
index 9b828377adc33bc9ffdf157702760aa12e7e5b4a..d3189c0b8a6fdd7e400bc146fe29180d06a7cc9e 100644 (file)
@@ -29,8 +29,6 @@
 \r
 #define SerialPrint(txt)  SerialPortWrite (txt, AsciiStrLen(txt)+1);\r
 \r
-extern UINT64 mSystemMemoryEnd;\r
-\r
 RETURN_STATUS\r
 EFIAPI\r
 TimerConstructor (\r