From 35071e15748fa54809e485935b631dbe58c1f078 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 9 Sep 2016 08:17:40 +0100 Subject: [PATCH] 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 Reviewed-by: Leif Lindholm --- MdePkg/Library/BaseLib/AArch64/SwitchStack.S | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.2