Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips Introduce mips3_TBRPL(); not used in this...



details:   https://anonhg.NetBSD.org/src/rev/bdc152917979
branches:  trunk
changeset: 485947:bdc152917979
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Tue May 09 09:50:17 2000 +0000

description:
Introduce mips3_TBRPL(); not used in this moment, to be useful to
discard MachTLBUpdate() calls, however, the necessity of TLB entry
modification in such a way is under question because implementation
glitches on ASID management was straightened, those calls can be
sanely removed after all.

diffstat:

 sys/arch/mips/mips/locore_mips3.S |  57 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)

diffs (71 lines):

diff -r 9686f9e63dab -r bdc152917979 sys/arch/mips/mips/locore_mips3.S
--- a/sys/arch/mips/mips/locore_mips3.S Tue May 09 09:25:21 2000 +0000
+++ b/sys/arch/mips/mips/locore_mips3.S Tue May 09 09:50:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore_mips3.S,v 1.25 2000/04/21 14:14:55 shin Exp $   */
+/*     $NetBSD: locore_mips3.S,v 1.26 2000/05/09 09:50:17 nisimura Exp $       */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -2381,6 +2381,61 @@
        mtc0    v1, MIPS_COP_0_STATUS           # restore status register
        END(mips3_TBIA)
 
+/*
+ * void mips3_TBRPL(vpn1, vpn2, pte)
+ *     probe TLB entry which has vpn1 address; if found, have it new
+ *     entryHi and entryLo[01] pair as [vpn2, pte]
+ */
+LEAF_NOPROFILE(mips3_TBRPL)
+       mfc0    v1, MIPS_COP_0_STATUS
+       mtc0    zero, MIPS_COP_0_STATUS
+       dmfc0   v0, MIPS_COP_0_TLB_HI
+       li      t0, (MIPS3_PG_HVPN | MIPS3_PG_ASID)
+       and     a0, a0, t0
+       dmtc0   a0, MIPS_COP_0_TLB_HI
+       nop
+       nop
+       tlbp
+       nop
+       nop
+       mfc0    t1, MIPS_COP_0_TLB_INDEX
+       nop
+       nop
+       bltz    t1, 9f
+       nop
+       tlbr
+       #nop
+       #nop
+       and     t1, a1, MIPS3_PG_ODDPG
+       and     a1, a1, t0
+       dsll    a2, a2, 34
+       dsrl    a2, a2, 34
+       or      a2, a2, MIPS3_PG_G
+       li      a0, MIPS3_PG_G
+       bnez    t1, 1f
+       nop
+0: #EVEN
+       dmtc0   a1, MIPS_COP_0_TLB_HI
+       dmtc0   a2, MIPS_COP_0_TLB_LO0
+       dmtc0   a0, MIPS_COP_0_TLB_LO1
+       b       2f
+       nop
+1: #ODD
+       dmtc0   a1, MIPS_COP_0_TLB_HI
+       dmtc0   a0, MIPS_COP_0_TLB_LO0
+       dmtc0   a2, MIPS_COP_0_TLB_LO1
+       nop
+       nop
+2:
+       tlbwi
+       nop
+       nop
+9:
+       dmtc0   v0, MIPS_COP_0_TLB_HI
+       j       ra
+       mtc0    v1, MIPS_COP_0_STATUS
+       END(mips3_TBRPL)
+
 LEAF(mips3_Set64bit)
        mfc0    v0, MIPS_COP_0_STATUS
        lui     v1, (MIPS3_SR_XX >> 16)



Home | Main Index | Thread Index | Old Index