PERFORCE change 42113 for review
Juli Mallett
jmallett at FreeBSD.org
Wed Nov 12 00:31:55 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=42113
Change 42113 by jmallett at jmallett_dalek on 2003/11/12 00:31:48
Clarify some things that are page size relative. Badly need to init
PageMask as necessary. Have some patches, but don't trust them.
Affected files ...
.. //depot/projects/mips/sys/mips/include/pte.h#16 edit
Differences ...
==== //depot/projects/mips/sys/mips/include/pte.h#16 (text+ko) ====
@@ -46,8 +46,9 @@
/*
* VPN for EntryHi register. Upper two bits select user, supervisor,
- * or kernel. Bits 61 to 40 copy bit 63. VPN2 is bits 39 to 13. From
- * bit 12 to bit 8 there is a 5-bit 0 field. Low byte is ASID.
+ * or kernel. Bits 61 to 40 copy bit 63. VPN2 is bits 39 and down to
+ * as low as 13, down to PAGE_SHIFT + 1, to index 2 pages. From bit 12
+ * to bit 8 there is a 5-bit 0 field. Low byte is ASID.
*/
#define MIPS_HI_R_SHIFT 62
#ifdef LOCORE
@@ -64,7 +65,8 @@
#define MIPS_HI_FILL_SHIFT 40
#define MIPS_HI_FILL_MASK ((0x800000UL - 1) << MIPS_HI_FILL_SHIFT)
#define MIPS_HI_VA_FILL(va) ((((va) & (1ULL << 63)) != 0 ? MIPS_HI_FILL_MASK : 0))
-#define MIPS_HI_VPN2_SHIFT 13
+#define MIPS_HI_VPN2_SHIFT (PAGE_SHIFT + 1)
+/* XXX VPN2 masking is wrong. Should trim off below VPN2_SHIFT, and from FILL_SHIFT up. */
#ifdef LOCORE
#define MIPS_HI_VPN2_BMASK 0xFFFFFFF
#else
More information about the p4-projects
mailing list