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 MIPS_TBRPL() which replaces a T...



details:   https://anonhg.NetBSD.org/src/rev/49126590666d
branches:  trunk
changeset: 484985:49126590666d
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Sun Apr 16 09:00:26 2000 +0000

description:
Introduce MIPS_TBRPL() which replaces a TLB entry of given vaddr
with new entryHi and entryLo pair iff found in TLB.  Works only
for KSEG2 this moment.  mips3 version will follow.

diffstat:

 sys/arch/mips/mips/locore_mips1.S |  30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diffs (44 lines):

diff -r 7c118cef0b0f -r 49126590666d sys/arch/mips/mips/locore_mips1.S
--- a/sys/arch/mips/mips/locore_mips1.S Sun Apr 16 08:37:27 2000 +0000
+++ b/sys/arch/mips/mips/locore_mips1.S Sun Apr 16 09:00:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore_mips1.S,v 1.29 2000/04/11 04:53:57 nisimura Exp $       */
+/*     $NetBSD: locore_mips1.S,v 1.30 2000/04/16 09:00:26 nisimura Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -1658,6 +1658,34 @@
        mtc0    v1, MIPS_COP_0_STATUS           # restore status register
        END(mips1_TBIA)
 
+/*
+ * void mips1_TBRPL(vpn1, vpn2, pte)
+ *     probe TLB entry which has vpn1 address; if found, have it new
+ *     entryHi and entryLo pair of [vpn2, pte]
+ */
+LEAF(mips1_TBRPL)
+       mfc0    v1, MIPS_COP_0_STATUS
+       mtc0    zero, MIPS_COP_0_STATUS
+       mfc0    v0, MIPS_COP_0_TLB_HI
+       nop
+       mtc0    a0, MIPS_COP_0_TLB_HI
+       nop
+       tlbp
+       mfc0    t0, MIPS_COP_0_TLB_INDEX
+       nop
+       bltz    t0, 1f
+       nop
+       or      a2, a2, MIPS1_PG_G
+       mtc0    a1, MIPS_COP_0_TLB_HI
+       mtc0    a2, MIPS_COP_0_TLB_LOW
+       nop
+       tlbwi
+1:
+       mtc0    v0, MIPS_COP_0_TLB_HI
+       j       ra
+       mtc0    v1, MIPS_COP_0_STATUS
+       END(mips1_TBRPL)
+
        .data
 mips1_excausesw:
        ####



Home | Main Index | Thread Index | Old Index