Author: andrew Date: Fri Apr 17 09:14:58 2015 New Revision: 281647 URL: https://svnweb.freebsd.org/changeset/base/281647
Log: Use cp15_ifar_get to get the instruction fault address. When using Thumb-2 the instruction may be over two pages so the program counter could point to the wrong page. Modified: head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Fri Apr 17 08:21:04 2015 (r281646) +++ head/sys/arm/arm/trap-v6.c Fri Apr 17 09:14:58 2015 (r281647) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_extern.h> #include <vm/vm_param.h> +#include <machine/acle-compat.h> #include <machine/cpu.h> #include <machine/cpu-v6.h> #include <machine/frame.h> @@ -287,7 +288,11 @@ abort_handler(struct trapframe *tf, int #endif td = curthread; fsr = (prefetch) ? cp15_ifsr_get(): cp15_dfsr_get(); +#if __ARM_ARCH >= 7 + far = (prefetch) ? cp15_ifar_get() : cp15_dfar_get(); +#else far = (prefetch) ? TRAPF_PC(tf) : cp15_dfar_get(); +#endif idx = FSR_TO_FAULT(fsr); usermode = TRAPF_USERMODE(tf); /* Abort came from user mode? */ _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"