Tweak the read/write data abort check to recognise Xscale's strd/ldrd

instructions.

While the original code matched "strd" just fine, it also matched
the "ldrd" instruction ...
This commit is contained in:
scw 2003-10-13 21:13:30 +00:00
parent 1f11f69f25
commit 3bf49b3ae8
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fault.c,v 1.35 2003/10/08 00:28:41 thorpej Exp $ */
/* $NetBSD: fault.c,v 1.36 2003/10/13 21:13:30 scw Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@ -82,7 +82,7 @@
#include "opt_pmap_debug.h"
#include <sys/types.h>
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.35 2003/10/08 00:28:41 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.36 2003/10/13 21:13:30 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -513,9 +513,15 @@ we_re_toast:
/* STM or CDT instruction ? */
else if ((fault_instruction & 0x0a100000) == 0x08000000)
ftype = VM_PROT_WRITE;
#ifdef __XSCALE__
/* STRH, STRD instruction ? */
else if ((fault_instruction & 0x0e1000b0) == 0x000000b0)
ftype = VM_PROT_WRITE;
#else
/* STRH, STRSH or STRSB instruction ? */
else if ((fault_instruction & 0x0e100090) == 0x00000090)
ftype = VM_PROT_WRITE;
#endif
/* SWP instruction ? */
else if ((fault_instruction & 0x0fb00ff0) == 0x01000090)
ftype = VM_PROT_READ | VM_PROT_WRITE;