Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/m68k/m68k m68k: Support TT(Transparent Translation)...



details:   https://anonhg.NetBSD.org/src/rev/3c79dbe6e6f4
branches:  trunk
changeset: 374501:3c79dbe6e6f4
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Apr 29 03:17:30 2023 +0000

description:
m68k: Support TT(Transparent Translation) for 020/030 buserror handler.
This avoids a panic when trying badaddr() against to an address where
bus error occurs in the TT region.  Only luna68k and news68k use TT.
Discussed on port-m68k.

diffstat:

 sys/arch/m68k/m68k/busaddrerr.s |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r f8e535302bf7 -r 3c79dbe6e6f4 sys/arch/m68k/m68k/busaddrerr.s
--- a/sys/arch/m68k/m68k/busaddrerr.s   Fri Apr 28 22:31:38 2023 +0000
+++ b/sys/arch/m68k/m68k/busaddrerr.s   Sat Apr 29 03:17:30 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: busaddrerr.s,v 1.1 2014/03/15 09:22:36 tsutsui Exp $   */
+/*     $NetBSD: busaddrerr.s,v 1.2 2023/04/29 03:17:30 isaki Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -219,7 +219,12 @@ Lbe10:
        jeq     Lbe10a                  | if no, done
        movql   #5,%d0                  | else supervisor program access
 Lbe10a:
-       ptestr  %d0,%a0@,#7             | do a table search
+       ptestr  %d0,%a0@,#0             | only PTEST #0 can detect transparent
+       pmove   %psr,%sp@               |   translation (TT0 or TT1).
+       movw    %sp@,%d1
+       btst    #6,%d1                  | transparent (TT0 or TT1)?
+       jne     Lisberr1                | yes -> bus error
+       ptestr  %d0,%a0@,#7             | no, do a table search
        pmove   %psr,%sp@               | save result
        movb    %sp@,%d1
        btst    #2,%d1                  | invalid (incl. limit viol. and berr)?



Home | Main Index | Thread Index | Old Index