Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2006 14:44:11 GMT
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 107892 for review
Message-ID:  <200610141444.k9EEiBud025700@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107892

Change 107892 by gonzo@gonzo_hq on 2006/10/14 14:44:05

	o Add missing part of TLBMiss handler: get actual PTEs from segtab
	    if it's present. 

Affected files ...

.. //depot/projects/mips2/src/sys/mips/mips/exception.S#12 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/mips/exception.S#12 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/mips2/src/sys/mips/mips/exception.S#11 $
+ * $P4: //depot/projects/mips2/src/sys/mips/mips/exception.S#12 $
  */
 
 /*	$NetBSD: mipsX_subr.S,v 1.19 2005/12/11 12:18:09 christos Exp $	*/
@@ -337,9 +337,22 @@
 	beq	k1, zero, 7f                    # ==0 -- no page table
 	srl	k0, 10                          # k0=VPN (aka va>>10)
 
-	break					# XXX: Not ready yet
-
-	eret
+	andi	k0, k0, 0xff8			# k0=page tab offset
+	addu	k1, k1, k0			# k1=pte address
+	lw	k0, 0(k1)			# k0=lo0 pte
+	lw	k1, 4(k1)			# k1=lo1 pte
+	sll	k0, 2				# chop top 2 bits (part 1a)
+	srl	k0, 2				# chop top 2 bits (part 1b)
+	mtc0	k0, MIPS_COP_0_TLB_LO0		# lo0 is loaded
+	sll	k1, 2				# chop top 2 bits (part 2a)
+	srl	k1, 2				# chop top 2 bits (part 2b)
+	mtc0	k1, MIPS_COP_0_TLB_LO1		# lo1 is loaded
+	nop					# standard nop
+	tlbwr					# write to tlb
+	nop					# standard nop
+	nop					# needed by R4000/4400
+	nop					# needed by R4000/4400
+	eret					# return from exception
 5:
 	j	KVATLBMiss
 	nop



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610141444.k9EEiBud025700>