summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1997-04-08 17:30:24 +0000
committerbriggs <briggs@cvs.openbsd.org>1997-04-08 17:30:24 +0000
commit9b40fac6f08d37fa7a996fd91e12aab93dee1d74 (patch)
treeb22e48bd539fbc843bbcd075ac2cf8ae65d29534 /sys
parent18765111aba1a3eb43303f2969c61f1557cf3f77 (diff)
SunOS uses trap 2 to clear cpu caches. From NetBSD via scottr and gwr.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sun3/sun3/trap.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/arch/sun3/sun3/trap.c b/sys/arch/sun3/sun3/trap.c
index f3eb4d052d9..a1a0f877f93 100644
--- a/sys/arch/sun3/sun3/trap.c
+++ b/sys/arch/sun3/sun3/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.15 1997/02/21 06:07:28 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.16 1997/04/08 17:30:23 briggs Exp $ */
/* $NetBSD: trap.c,v 1.63-1.65ish 1997/01/16 15:41:40 gwr Exp $ */
/*
@@ -413,12 +413,16 @@ trap(type, code, v, frame)
case T_TRAP15|T_USER: /* SUN user trace trap */
#ifdef COMPAT_SUNOS
/*
- * SunOS seems to use Trap #2 for some obscure fpu operations.
- * So far, just ignore it, but DONT trap on it...
- * (i.e. do not deliver a signal for it)
- */
- if (p->p_emul == &emul_sunos)
- goto douret;
+ * SunOS uses Trap #2 for a "CPU cache flush"
+ * Just flush the on-chip caches and return.
+ * XXX - Too bad NetBSD uses trap 2...
+ */
+ if (p->p_emul == &emul_sunos) {
+ ICIA();
+ DCIU();
+ /* get out fast */
+ return;
+ }
#endif
frame.f_sr &= ~PSL_T;
sig = SIGTRAP;