summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2006-04-04 21:00:44 +0000
committermarius <marius@FreeBSD.org>2006-04-04 21:00:44 +0000
commit8ea6d154a2636d979bcad320762c6ecb0af4ea1b (patch)
tree9745d193b0a146f8300190b494d7b7f7c3c6260d /sys/sparc64
parent06e487e0f33f00ead0bfc827bf2911db179ef034 (diff)
downloadFreeBSD-src-8ea6d154a2636d979bcad320762c6ecb0af4ea1b.zip
FreeBSD-src-8ea6d154a2636d979bcad320762c6ecb0af4ea1b.tar.gz
For USIII CPUs the type of the trap caused by peeking/poking non-existent
PCI devices apparently was changed from a special deferred trap with TPC pointing to the membar #Sync following the failing load/store instruction to a precise trap with TPC pointing to the failing load/store instruction. Thus remove the check the check whether TPC points to a membar #Sync in case of a data access trap as it's off-by-one for USIII CPUs and it should be sufficient to check whether the trap happend while in fasword*() to properly detect traps caused by peeking/poking. This also corresponds to what other OSs do. Note that also only the USIIi manual suggests to check the TPC for such traps while the USII one doesn't (in the public USIII manual device peeking/poking isn't mentioned at all).
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/trap.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index 4cbbbad..4d623a4 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -354,14 +354,13 @@ trap(struct trapframe *tf)
break;
case T_DATA_ERROR:
/*
- * handle PCI poke/peek as per UltraSPARC IIi
- * User's Manual 16.2.1.
+ * Handle PCI poke/peek as per UltraSPARC IIi
+ * User's Manual 16.2.1, modulo checking the
+ * TPC as USIII CPUs generate a precise trap
+ * instead of a special deferred one.
*/
-#define MEMBARSYNC_INST ((u_int32_t)0x8143e040)
if (tf->tf_tpc > (u_long)fas_nofault_begin &&
- tf->tf_tpc < (u_long)fas_nofault_end &&
- *(u_int32_t *)tf->tf_tpc == MEMBARSYNC_INST &&
- ((u_int32_t *)tf->tf_tpc)[-2] == MEMBARSYNC_INST) {
+ tf->tf_tpc < (u_long)fas_nofault_end) {
cache_flush();
cache_enable();
tf->tf_tpc = (u_long)fas_fault;
@@ -369,7 +368,6 @@ trap(struct trapframe *tf)
error = 0;
break;
}
-#undef MEMBARSYNC_INST
error = 1;
break;
default:
OpenPOWER on IntegriCloud