Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2003 17:26:07 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 28466 for review
Message-ID:  <200304080026.h380Q7d9057822@repoman.freebsd.org>

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

Change 28466 by peter@peter_overcee on 2003/04/07 17:25:56

	update some 4MB page references to 2MB

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#17 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#17 (text+ko) ====

@@ -246,8 +246,8 @@
 
 /*
  * Move the kernel virtual free pointer to the next
- * 4MB.  This is used to help improve performance
- * by using a large (4MB) page for much of the kernel
+ * 2MB.  This is used to help improve performance
+ * by using a large (2MB) page for much of the kernel
  * (.text, .data, .bss)
  */
 static vm_offset_t
@@ -255,6 +255,9 @@
 {
 	vm_offset_t newaddr = addr;
 
+#if 0
+	newaddr = (addr + (NBPDR - 1)) & ~(NBPDR - 1);
+#endif
 	return newaddr;
 }
 
@@ -364,9 +367,11 @@
 	pgeflag = 0;
 	
 /*
- * Initialize the 4MB page size flag
+ * Initialize the 2MB page size flag
  */
-	pseflag = 0;
+#if 0
+	pseflag = PG_PS;
+#endif
 
 	invltlb();
 }
@@ -1185,7 +1190,7 @@
 	ptepa = (vm_offset_t) pmap->pm_pdir[ptepindex];
 
 	/*
-	 * This supports switching from a 4MB page to a
+	 * This supports switching from a 2MB page to a
 	 * normal 4K page.
 	 */
 	if (ptepa & PG_PS) {
@@ -1807,7 +1812,7 @@
 	opa = origpte & PG_FRAME;
 
 	if (origpte & PG_PS)
-		panic("pmap_enter: attempted pmap_enter on 4MB page");
+		panic("pmap_enter: attempted pmap_enter on 2MB page");
 
 	/*
 	 * Mapping has not changed, must be protection or wiring change.
@@ -1960,7 +1965,7 @@
 			 */
 			if (ptepa) {
 				if (ptepa & PG_PS)
-					panic("pmap_enter_quick: unexpected mapping into 4MB page");
+					panic("pmap_enter_quick: unexpected mapping into 2MB page");
 				if (pmap->pm_pteobj->root &&
 					(pmap->pm_pteobj->root->pindex == ptepindex)) {
 					mpte = pmap->pm_pteobj->root;



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