Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jun 2004 22:46:14 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 54361 for review
Message-ID:  <200406072246.i57MkEoS050384@repoman.freebsd.org>

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

Change 54361 by peter@peter_hammer on 2004/06/07 22:46:11

	make PG_NX stuff actually work.  PG_FRAME now has to exclude high
	order bits too, since the page frame number only goes up to bit 52.
	Switch a few things to using ~PAGE_MASK instead of PG_FRAME since
	thats what they really wanted.  Actually, they want trunc_page() etc,
	but thats for later.

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#74 edit
.. //depot/projects/hammer/sys/amd64/include/pmap.h#34 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#74 (text+ko) ====

@@ -1850,7 +1850,7 @@
 	if (pmap == NULL)
 		return;
 
-	va &= PG_FRAME;
+	va &= (~(vm_paddr_t)PAGE_MASK);
 #ifdef PMAP_DIAGNOSTIC
 	if (va > VM_MAX_KERNEL_ADDRESS)
 		panic("pmap_enter: toobig");
@@ -2779,7 +2779,7 @@
 	/* If we gave a direct map region in pmap_mapdev, do nothing */
 	if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS)
 		return;
-	base = va & PG_FRAME;
+	base = va & (~(vm_paddr_t)PAGE_MASK);
 	offset = va & PAGE_MASK;
 	size = roundup(offset + size, PAGE_SIZE);
 	for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE)

==== //depot/projects/hammer/sys/amd64/include/pmap.h#34 (text+ko) ====

@@ -68,7 +68,7 @@
 /* Our various interpretations of the above */
 #define PG_W		PG_AVAIL1	/* "Wired" pseudoflag */
 #define	PG_MANAGED	PG_AVAIL2
-#define	PG_FRAME	(~((vm_paddr_t)PAGE_MASK))
+#define	PG_FRAME	(0x000ffffffffff000ul)
 #define	PG_PROT		(PG_RW|PG_U)	/* all protection bits . */
 #define PG_N		(PG_NC_PWT|PG_NC_PCD)	/* Non-cacheable */
 



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