summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-09 08:17:40 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-09 13:46:52 +0100
commit35071e15748fa54809e485935b631dbe58c1f078 (patch)
tree78f39847b89614d777274a78a66427c6cbc05372 /MdePkg
parent2d41ea3aed4ea1935fc63df35b834e9626f896df (diff)
downloadedk2-35071e15748fa54809e485935b631dbe58c1f078.tar.gz
edk2-35071e15748fa54809e485935b631dbe58c1f078.tar.bz2
edk2-35071e15748fa54809e485935b631dbe58c1f078.zip
MdePkg/BaseLib AARCH64: terminate stack frame list on stack switch
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>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BaseLib/AArch64/SwitchStack.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S
index 2bce9c998f..c3ac8d7e4d 100644
--- a/MdePkg/Library/BaseLib/AArch64/SwitchStack.S
+++ b/MdePkg/Library/BaseLib/AArch64/SwitchStack.S
@@ -40,6 +40,7 @@ InternalSwitchStackAsm (
);
**/
ASM_PFX(InternalSwitchStackAsm):
+ mov x29, #0
mov x30, x0
mov sp, x3
mov x0, x1