Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2015 09:14:59 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281647 - head/sys/arm/arm
Message-ID:  <201504170914.t3H9ExAp050860@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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? */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504170914.t3H9ExAp050860>