Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mac68k/mac68k As was the original intent a long, lo...



details:   https://anonhg.NetBSD.org/src/rev/58ad7337690f
branches:  trunk
changeset: 499264:58ad7337690f
user:      scottr <scottr%NetBSD.org@localhost>
date:      Wed Nov 15 07:15:36 2000 +0000

description:
As was the original intent a long, long time ago -- but in this galaxy, and
in fact on this planet -- generate a SIGILL for user-mode A-line traps.
The core of this change is taken verbatim from PR 10511, submitted by
Christian Bauer.

diffstat:

 sys/arch/mac68k/mac68k/macrom.c    |  16 +---------------
 sys/arch/mac68k/mac68k/macrom.h    |   3 +--
 sys/arch/mac68k/mac68k/macromasm.s |  10 ++++++----
 3 files changed, 8 insertions(+), 21 deletions(-)

diffs (85 lines):

diff -r 68d58db78e59 -r 58ad7337690f sys/arch/mac68k/mac68k/macrom.c
--- a/sys/arch/mac68k/mac68k/macrom.c   Wed Nov 15 06:35:51 2000 +0000
+++ b/sys/arch/mac68k/mac68k/macrom.c   Wed Nov 15 07:15:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: macrom.c,v 1.46 2000/06/29 08:15:12 mrg Exp $  */
+/*     $NetBSD: macrom.c,v 1.47 2000/11/15 07:15:36 scottr Exp $       */
 
 /*-
  * Copyright (C) 1994  Bradley A. Grantham
@@ -756,20 +756,6 @@
 #endif
 }
 
-       /* handle a user mode A-line trap */
-void
-mrg_aline_user()
-{
-#if 1
-       /* send process a SIGILL; aline traps are illegal as yet */
-#else /* how to handle real Mac App A-lines */
-       /* ignore for now */
-       I have no idea!
-       maybe pass SIGALINE?
-       maybe put global information about aline trap?
-#endif
-}
-
 extern u_int32_t traceloopstart[];
 extern u_int32_t traceloopend;
 extern u_int32_t *traceloopptr;
diff -r 68d58db78e59 -r 58ad7337690f sys/arch/mac68k/mac68k/macrom.h
--- a/sys/arch/mac68k/mac68k/macrom.h   Wed Nov 15 06:35:51 2000 +0000
+++ b/sys/arch/mac68k/mac68k/macrom.h   Wed Nov 15 07:15:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: macrom.h,v 1.11 1997/05/12 07:53:04 scottr Exp $       */
+/*     $NetBSD: macrom.h,v 1.12 2000/11/15 07:15:36 scottr Exp $       */
 
 /*-
  * Copyright (C) 1994  Bradley A. Grantham
@@ -228,7 +228,6 @@
 int    mrg_SetTrapAddress __P((void));
 void   mrg_StripAddress __P((void));
 void   mrg_aline_super __P((struct frame *));
-void   mrg_aline_user __P((void));
 void   mrg_init __P((void));
 void   mrg_FixDiv __P((void));
 void   mrg_FixMul __P((void));
diff -r 68d58db78e59 -r 58ad7337690f sys/arch/mac68k/mac68k/macromasm.s
--- a/sys/arch/mac68k/mac68k/macromasm.s        Wed Nov 15 06:35:51 2000 +0000
+++ b/sys/arch/mac68k/mac68k/macromasm.s        Wed Nov 15 07:15:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: macromasm.s,v 1.17 1998/02/21 00:37:08 scottr Exp $    */
+/*     $NetBSD: macromasm.s,v 1.18 2000/11/15 07:15:36 scottr Exp $    */
 
 /*-
  * Copyright (C) 1994  Bradley A. Grantham
@@ -37,6 +37,8 @@
 
 #include "opt_adb.h"
 #include "assym.h"
+#include <machine/asm.h>
+#include <machine/trap.h>
 
 
        /* Define this symbol as global with (v) value */
@@ -425,7 +427,6 @@
  * 1010 line emulator; A-line trap
  * (we fake MacOS traps from here)
  */
-       .global _mrg_aline_user
        .global _mrg_aline_super
        .global _mrg_ToolBoxtraps
        .global _alinetrap
@@ -437,8 +438,9 @@
        movw    sp@(FR_HW + 4), d0      | retrieve status register
        andw    #PSL_S, d0      | supervisor state?
        bne     Lalnosup        | branch if supervisor
-       jbsr    _mrg_aline_user | user a-line trap
-       bra     Lalrts
+       addql   #4, sp          | pop frame ptr
+       movql   #T_ILLINST, d0  | user-mode fault
+       jra     _ASM_LABEL(fault)
 Lalnosup:
 #define FR_PC (FR_HW+2)
        movl    sp@(FR_PC + 4), a0      | retrieve PC



Home | Main Index | Thread Index | Old Index