From bb3cce0dc7483645b179a990e0fd3ad621607f6b Mon Sep 17 00:00:00 2001 From: gene Date: Tue, 8 Apr 1997 02:53:27 +0000 Subject: [PATCH] From scottr@netbsd.org: >Fix SunOS user trace trap handling, from Gordon. --- sys/arch/mac68k/mac68k/trap.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c index cf916f70ee2..9af660a38fe 100644 --- a/sys/arch/mac68k/mac68k/trap.c +++ b/sys/arch/mac68k/mac68k/trap.c @@ -1,5 +1,5 @@ -/* $OpenBSD: trap.c,v 1.9 1997/03/30 21:53:27 briggs Exp $ */ -/* $NetBSD: trap.c,v 1.45 1997/01/20 04:30:05 scottr Exp $ */ +/* $OpenBSD: trap.c,v 1.10 1997/04/08 02:53:27 gene Exp $ */ +/* $NetBSD: trap.c,v 1.46 1997/04/07 22:54:44 scottr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -462,13 +462,16 @@ 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 NetBSD uses trap 2... */ - if (p->p_emul == &emul_sunos) - goto out; + if (p->p_emul == &emul_sunos) { + ICIA(); + DCIU(); + /* get out fast */ + goto done; + } #endif frame.f_sr &= ~PSL_T; i = SIGTRAP; -- 2.20.1