git: 6cc52efa13ed - main - arm_smcc_1_2_*: Don't trash SP and X19 if no return value structure.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Feb 2023 21:54:36 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6cc52efa13ed180c35232b833d38cf288679b2db commit 6cc52efa13ed180c35232b833d38cf288679b2db Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-02-01 21:54:09 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-02-01 21:54:09 +0000 arm_smcc_1_2_*: Don't trash SP and X19 if no return value structure. Jumping direct to ret was not restoring the saved value of x19 and was also not adjusting sp to discard the two saved registers. Reviewed by: andrew Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D37922 --- sys/dev/psci/smccc_arm64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/psci/smccc_arm64.S b/sys/dev/psci/smccc_arm64.S index 41e602563222..1d05855acdf3 100644 --- a/sys/dev/psci/smccc_arm64.S +++ b/sys/dev/psci/smccc_arm64.S @@ -77,8 +77,8 @@ ENTRY(arm_smccc_1_2_\insn) stp x12, x13, [x19, #16 * 6] stp x14, x15, [x19, #16 * 7] stp x16, x17, [x19, #16 * 8] - ldp xzr, x19, [sp], #16 -1: ret +1: ldp xzr, x19, [sp], #16 + ret END(arm_smccc_1_2\insn) .endm /* int arm_smccc_1_2_*(const struct arm_smccc_1_2_regs *args,