PERFORCE change 48332 for review

Juli Mallett jmallett at FreeBSD.org
Sat Mar 6 23:29:43 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=48332

Change 48332 by jmallett at jmallett_oingo on 2004/03/06 23:28:50

	Scribblings of code to start to look at cache attributes and
	do something with global bit preservation rather than checking
	pmap==kernel_pmap.  Also fix a typo which would surely be borken.

Affected files ...

.. //depot/projects/mips/sys/mips/mips/tlb.c#21 edit

Differences ...

==== //depot/projects/mips/sys/mips/mips/tlb.c#21 (text+ko) ====

@@ -115,14 +115,12 @@
 	if ((bits & PG_V) == 0)
 		printf("pmap %p entering invalid mapping for va %lx to pa %lx [%lx]\n",
 		       pmap, (u_long)va, (u_long)pa, (u_long)bits);
-	*pte = MIPS_PA_TO_PFN(pa) | bits;
-	if (pmap == kernel_pmap)
-		*pte |= PG_G;
-	if ((va >> PAGE_SHIFT) & 1) {
-		tlb_update(va, pte[-1], pte[0]);
-	} else {
-		tlb_update(va, pte[0], pte[1]);
-	}
+	*pte &= PG_G;
+	*pte |= MIPS_PA_TO_PFN(pa) | bits;
+	if (0)
+		*pte |= PG_C(3);
+	else
+		*pte |= PG_C_UNCACHED;
 }
 
 void
@@ -193,6 +191,8 @@
 	/* Bogus VPN2. */
 	ehi = MIPS_KSEG1_END + 2 * i * PAGE_SIZE;
 	mips_wr_index(i);
+	mips_wr_entrylo0(0);
+	mips_wr_entrylo1(0);
 	mips_wr_entryhi(ehi);
 	mips_tlbwi();
 }
@@ -209,7 +209,7 @@
 	mips_tlbp();
 	i = mips_rd_index();
 	if (i >= 0)
-		tlb_invalidate_one(va);
+		tlb_invalidate_one(i);
 }
 
 /*


More information about the p4-projects mailing list