diff --git a/sys/arm/arm/trap.c b/sys/arm/arm/trap.c index 3a9e8525890c..423e3de0daed 100644 --- a/sys/arm/arm/trap.c +++ b/sys/arm/arm/trap.c @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -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, diff --git a/sys/arm/include/armreg.h b/sys/arm/include/armreg.h index cf6c417f11bc..7cb68d0b8c35 100644 --- a/sys/arm/include/armreg.h +++ b/sys/arm/include/armreg.h @@ -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.