From e403f9865d830fc7ef2509562872fb9dc6feb325 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 1 Nov 2018 10:25:22 +0000 Subject: [PATCH] Use the correct offsets for the trap frame in fork_trampoline. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/swtch.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index 4c2c3aca583..d9921f7e952 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -236,12 +236,12 @@ ENTRY(fork_trampoline) msr daifset, #2 /* Restore sp and lr */ - ldp x0, x1, [sp] + ldp x0, x1, [sp, #TF_SP] msr sp_el0, x0 mov lr, x1 /* Restore elr and spsr */ - ldp x0, x1, [sp, #16] + ldp x0, x1, [sp, #TF_ELR] msr elr_el1, x0 msr spsr_el1, x1