]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S
ArmPlatformPkg/PrePi: avoid global variable write to mSystemMemoryEnd
[mirror_edk2.git] / ArmPlatformPkg / PrePi / AArch64 / ModuleEntryPoint.S
index d0530a874726752aa50ac9baed8d58f7f4bfc680..a81709d5d12d590ec5cb6e908ea7e0f3a4c52366 100644 (file)
@@ -13,8 +13,6 @@
 \r
 #include <AsmMacroIoLibV8.h>\r
 \r
-ASM_GLOBAL ASM_PFX(mSystemMemoryEnd)\r
-\r
 ASM_FUNC(_ModuleEntryPoint)\r
   // Do early platform specific actions\r
   bl    ASM_PFX(ArmPlatformPeiBootAction)\r
@@ -31,16 +29,6 @@ _SetSVCMode:
 _SystemMemoryEndInit:\r
   ldr   x1, mSystemMemoryEnd\r
 \r
-  // Is mSystemMemoryEnd initialized?\r
-  cmp   x1, #0\r
-  bne   _SetupStackPosition\r
-\r
-  MOV64 (x1, FixedPcdGet64(PcdSystemMemoryBase) + FixedPcdGet64(PcdSystemMemorySize) - 1)\r
-\r
-  // Update the global variable\r
-  adr   x2, mSystemMemoryEnd\r
-  str   x1, [x2]\r
-\r
 _SetupStackPosition:\r
   // r1 = SystemMemoryTop\r
 \r
@@ -129,5 +117,3 @@ _PrepareArguments:
 \r
 _NeverReturn:\r
   b _NeverReturn\r
-\r
-ASM_PFX(mSystemMemoryEnd):    .8byte 0\r