summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1997-04-08 05:14:54 +0000
committerbriggs <briggs@cvs.openbsd.org>1997-04-08 05:14:54 +0000
commit386adbc742cff77a46666a8fff5c2f9b05793904 (patch)
treea93601de6fc3eeade2939c76b2a250b8a7f932da
parentbbdb5f0d53ede750e4f2981a65ccac3c9fb1819d (diff)
Fix from NetBSD: flush caches on trap 2 in SunOS emulation. Comment on
mac68k change by scottr attributes Gordon (Ross) on the change.
-rw-r--r--sys/arch/atari/atari/trap.c11
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c12
2 files changed, 13 insertions, 10 deletions
diff --git a/sys/arch/atari/atari/trap.c b/sys/arch/atari/atari/trap.c
index 7d6858d1933..9055e0afb6c 100644
--- a/sys/arch/atari/atari/trap.c
+++ b/sys/arch/atari/atari/trap.c
@@ -615,15 +615,16 @@ trap(type, code, v, frame)
case T_TRAP15|T_USER:
#ifdef COMPAT_SUNOS
/*
- * XXX This comment/code is not consistent XXX
- * SunOS seems to use Trap #2 for some obscure
- * fpu operations. So far, just ignore it, but
- * DONT trap on it..
+ * SunOS uses Trap #2 for a "CPU cache flush"
+ * Just flush the on-chip caches and return.
+ * XXX - Too bad OpenBSD uses trap 2...
*/
if (p->p_emul == &emul_sunos) {
+ ICIA();
+ DCIU();
+ /* get out fast */
userret(p, frame.f_pc, sticks);
return;
- }
#endif
frame.f_sr &= ~PSL_T;
i = SIGTRAP;
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index 9a4ed40be2d..7dfa8b2d7f5 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.16 1997/03/31 00:24:16 downsj Exp $ */
+/* $OpenBSD: trap.c,v 1.17 1997/04/08 05:14:52 briggs Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -475,12 +475,14 @@ copyfault:
case T_TRAP15|T_USER: /* SUN user trace trap */
#ifdef COMPAT_SUNOS
/*
- * XXX This comment/code is not consistent XXX
- * SunOS seems to use Trap #2 for some obscure
- * fpu operations. So far, just ignore it, but
- * DONT trap on it..
+ * SunOS uses Trap #2 for a "CPU cache flush"
+ * Just flush the on-chip caches and return.
+ * XXX - Too bad OpenBSD uses trap 2...
*/
if (p->p_emul == &emul_sunos) {
+ ICIA();
+ DCIU();
+ /* get out fast */
userret(p, &frame, sticks, v, 1);
return;
}