Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2003 00:31:53 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 42113 for review
Message-ID:  <200311120831.hAC8VrBR056199@repoman.freebsd.org>

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

Change 42113 by jmallett@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



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