PERFORCE change 116824 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Thu Mar 29 11:12:08 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=116824
Change 116824 by gonzo at gonzo_jeeves on 2007/03/29 11:11:01
o Ensure presence of global bit in TLB entry for KVA
with KASSERT.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/tlb.c#13 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/tlb.c#13 (text+ko) ====
@@ -140,6 +140,7 @@
panic("pmap %p entering invalid mapping for va %lx to pa %lx [%lx]",
pmap, (u_long)va, (u_long)pa, (u_long)bits);
+
*pte &= PG_G;
*pte |= (MIPS_PA_TO_PFN(pa) << MIPS_PFN_SHIFT) | bits;
*pte |= PG_C_UNCACHED;
@@ -184,6 +185,15 @@
register_t ehi, old_ehi;
int i;
+ /*
+ * Bailout if we're trying to add TLB entry for KVA without
+ * PG_G bit set.
+ */
+ KASSERT(!((va > VM_MAXUSER_ADDRESS) && (((pte0) & PG_G) == 0)),
+ ("tlb_enter for KVA without global bit set"));
+ KASSERT(!((va > VM_MAXUSER_ADDRESS) && (((pte1) & PG_G) == 0)),
+ ("tlb_enter for KVA without global bit set"));
+
va &= ~PAGE_MASK;
ehi = MIPS_HI_ENTRY(va, asid);
old_ehi = mips_rd_entryhi();
More information about the p4-projects
mailing list