PERFORCE change 32118 for review
Juli Mallett
jmallett at FreeBSD.org
Fri May 30 13:28:13 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=32118
Change 32118 by jmallett at jmallett_dalek on 2003/05/30 13:28:09
Add back TLBRead, oops.
Affected files ...
.. //depot/projects/mips/sys/mips/mips/mips_subr.S#7 edit
Differences ...
==== //depot/projects/mips/sys/mips/mips/mips_subr.S#7 (text+ko) ====
@@ -338,6 +338,63 @@
COP0_SYNC # XXXX - not executed!!
END(MIPSX(TLBUpdate))
+/*--------------------------------------------------------------------------
+ *
+ * mipsN_TLBRead --
+ *
+ * Read the TLB entry.
+ *
+ * mips3_TLBRead(entry, tlb)
+ * unsigned entry;
+ * struct tlb *tlb;
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * tlb will contain the TLB entry found.
+ *
+ *--------------------------------------------------------------------------
+ */
+LEAF(MIPSX(TLBRead))
+ mfc0 v1, MIPS_COP_0_STATUS # Save the status register.
+ mtc0 zero, MIPS_COP_0_STATUS # Disable interrupts
+ COP0_SYNC
+ nop
+ mfc0 ta2, MIPS_COP_0_TLB_PG_MASK # save current pgMask
+ nop
+ _MFC0 t0, MIPS_COP_0_TLB_HI # Get current PID
+
+ mtc0 a0, MIPS_COP_0_TLB_INDEX # Set the index register
+ COP0_SYNC
+ nop
+ nop # required for QED5230
+ tlbr # Read from the TLB
+ COP0_SYNC
+ nop
+ nop
+ nop
+ mfc0 t2, MIPS_COP_0_TLB_PG_MASK # fetch the pgMask
+ _MFC0 t3, MIPS_COP_0_TLB_HI # fetch the hi entry
+ _MFC0 ta0, MIPS_COP_0_TLB_LO0 # See what we got
+ _MFC0 ta1, MIPS_COP_0_TLB_LO1 # See what we got
+ _MTC0 t0, MIPS_COP_0_TLB_HI # restore PID
+ COP0_SYNC
+ mtc0 ta2, MIPS_COP_0_TLB_PG_MASK # restore pgMask
+ COP0_SYNC
+ nop
+ nop
+ nop # wait for PID active
+ mtc0 v1, MIPS_COP_0_STATUS # Restore the status register
+ COP0_SYNC
+ nop
+ sw t2, 0(a1)
+ sw t3, 4(a1)
+ sw ta0, 8(a1)
+ j ra
+ sw ta1, 12(a1)
+END(MIPSX(TLBRead))
+
/*
* mipsN_proc_trampoline()
*
More information about the p4-projects
mailing list