Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2014 19:59:31 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261808 - in head/sys/arm: arm include
Message-ID:  <201402121959.s1CJxV41061054@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Wed Feb 12 19:59:30 2014
New Revision: 261808
URL: http://svnweb.freebsd.org/changeset/base/261808

Log:
  Use the right symbols for determining arm architecture.  Include the
  necessary header file which has the new FAULT_WNR symbol defined in it.

Modified:
  head/sys/arm/arm/trap.c
  head/sys/arm/include/armreg.h

Modified: head/sys/arm/arm/trap.c
==============================================================================
--- head/sys/arm/arm/trap.c	Wed Feb 12 19:51:12 2014	(r261807)
+++ head/sys/arm/arm/trap.c	Wed Feb 12 19:59:30 2014	(r261808)
@@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$");
 #include <vm/vm_map.h>
 #include <vm/vm_extern.h>
 
+#include <machine/armreg.h>
 #include <machine/cpuconf.h>
 #include <machine/vmparam.h>
 #include <machine/frame.h>
@@ -393,7 +394,7 @@ data_abort_handler(struct trapframe *tf)
 	 * location, so we can deal with those quickly.  Otherwise we need to
 	 * disassemble the faulting instruction to determine if it was a write.
 	 */
-#ifdef _ARM_ARCH_6
+#if ARM_ARCH_6 || ARM_ARCH_7A
 	ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ;
 #else
 	if (IS_PERMISSION_FAULT(fsr))
@@ -411,8 +412,8 @@ data_abort_handler(struct trapframe *tf)
 			else
 				ftype = VM_PROT_READ;
 		}
-#endif
 	}
+#endif
 
 	/*
 	 * See if the fault is as a result of ref/mod emulation,

Modified: head/sys/arm/include/armreg.h
==============================================================================
--- head/sys/arm/include/armreg.h	Wed Feb 12 19:51:12 2014	(r261807)
+++ head/sys/arm/include/armreg.h	Wed Feb 12 19:59:30 2014	(r261808)
@@ -404,6 +404,8 @@
 #define FAULT_PERM_P    0x0f /* Permission -- Page */
 
 #define	FAULT_IMPRECISE	0x400	/* Imprecise exception (XSCALE) */
+#define	FAULT_EXTERNAL	0x400	/* External abort (armv6+) */
+#define	FAULT_WNR	0x800	/* Write-not-Read access (armv6+) */
 
 /*
  * Address of the vector page, low and high versions.



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