Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/mvme68k/mvme68k Pull up revision 1.56 (request...



details:   https://anonhg.NetBSD.org/src/rev/f2f1d5536723
branches:  netbsd-1-4
changeset: 469739:f2f1d5536723
user:      he <he%NetBSD.org@localhost>
date:      Sun Nov 21 15:41:35 1999 +0000

description:
Pull up revision 1.56 (requested by itohy):
  Fix the problem where single-step tracing of a trap instruction
  makes the system fall into kernel debugger.

diffstat:

 sys/arch/mvme68k/mvme68k/locore.s |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 0e291c6eaff8 -r f2f1d5536723 sys/arch/mvme68k/mvme68k/locore.s
--- a/sys/arch/mvme68k/mvme68k/locore.s Sun Nov 21 15:40:58 1999 +0000
+++ b/sys/arch/mvme68k/mvme68k/locore.s Sun Nov 21 15:41:35 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.48.2.3 1999/05/02 21:57:48 perry Exp $    */
+/*     $NetBSD: locore.s,v 1.48.2.4 1999/11/21 15:41:35 he Exp $       */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -906,9 +906,17 @@
        clrl    sp@-                    | stack adjust count
        moveml  #0xFFFF,sp@-
        moveq   #T_TRACE,d0
+
+       | Check PSW and see what happen.
+       |   T=0 S=0     (should not happen)
+       |   T=1 S=0     trace trap from user mode
+       |   T=0 S=1     trace trap on a trap instruction
+       |   T=1 S=1     trace trap from system mode (kernel breakpoint)
+
        movw    sp@(FR_HW),d1           | get PSW
-       andw    #PSL_S,d1               | from system mode?
-       jne     Lkbrkpt                 | yes, kernel breakpoint
+       notw    d1                      | XXX no support for T0 on 680[234]0
+       andw    #PSL_TS,d1              | from system mode (T=1, S=1)?
+       jeq     Lkbrkpt                 | yes, kernel breakpoint
        jra     _ASM_LABEL(fault)       | no, user-mode fault
 
 /*



Home | Main Index | Thread Index | Old Index