]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/BaseLib AARCH64: terminate stack frame list on stack switch
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 9 Sep 2016 07:17:40 +0000 (08:17 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 9 Sep 2016 12:46:52 +0000 (13:46 +0100)
When switching to the DXE phase stack, set the frame pointer to zero so
that code walking the stack frame will not try to access stack frames
belonging to the old stack.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
MdePkg/Library/BaseLib/AArch64/SwitchStack.S

index 2bce9c998f4f8407af5c613575d6424d2c37cec0..c3ac8d7e4dfe750ef1c4bce4d9874a76bdcfa67f 100644 (file)
@@ -40,6 +40,7 @@ InternalSwitchStackAsm (
   );\r
 **/\r
 ASM_PFX(InternalSwitchStackAsm):\r
+    mov   x29, #0\r
     mov   x30, x0\r
     mov   sp, x3\r
     mov   x0, x1\r