arm64: fix stack unwinding past exception handlers

Commit 281402e0a5 ("arm64: Shave off two instructions in exceptions")
removed the instruction that set the frame pointer (x29) as it appeared
to be unused.

The frame pointer is used in arm64/db_trace.c:db_stack_trace_cmd() when
unwinding state, and hence still needs to be set.

Add back the instruction to save_registers to properly update frame
pointer.

Reported by: andrew
Sponsored by: Arm Ltd
This commit is contained in:
Zachary Leaf 2023-05-09 17:04:44 +01:00 committed by Andrew Turner
parent 982cd5ae8e
commit 2b8c4137d4

View File

@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$");
.endm
.macro save_registers el
add x29, sp, #(TF_SIZE)
.if \el == 0
#if defined(PERTHREAD_SSP)
/* Load the SSP canary to sp_el0 */