svn commit: r292194 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Mon Dec 14 10:06:02 UTC 2015
Author: andrew
Date: Mon Dec 14 10:06:01 2015
New Revision: 292194
URL: https://svnweb.freebsd.org/changeset/base/292194
Log:
Skip restoring more registers when returning from an exception taken in
the kernel. These registers are all callee saved, and as such will be
restored before returning to the exception handler.
Userland still needs these registers to be restored as they may be changed
by the kernel and we don't currently track these places.
Modified:
head/sys/arm64/arm64/exception.S
Modified: head/sys/arm64/arm64/exception.S
==============================================================================
--- head/sys/arm64/arm64/exception.S Mon Dec 14 10:04:57 2015 (r292193)
+++ head/sys/arm64/arm64/exception.S Mon Dec 14 10:06:01 2015 (r292194)
@@ -90,15 +90,19 @@ __FBSDID("$FreeBSD$");
ldp x14, x15, [sp, #(TF_X + 14 * 8)]
ldp x16, x17, [sp, #(TF_X + 16 * 8)]
.if \el == 0
+ /*
+ * We only restore the callee saved registers when returning to
+ * userland as they may have been updated by a system call or signal.
+ */
ldp x18, x19, [sp, #(TF_X + 18 * 8)]
-.else
- ldr x19, [sp, #(TF_X + 19 * 8)]
-.endif
ldp x20, x21, [sp, #(TF_X + 20 * 8)]
ldp x22, x23, [sp, #(TF_X + 22 * 8)]
ldp x24, x25, [sp, #(TF_X + 24 * 8)]
ldp x26, x27, [sp, #(TF_X + 26 * 8)]
ldp x28, x29, [sp, #(TF_X + 28 * 8)]
+.else
+ ldr x29, [sp, #(TF_X + 29 * 8)]
+.endif
.if \el == 0
add sp, sp, #(TF_SIZE + 16)
.else
More information about the svn-src-head
mailing list