Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Apr 2003 02:37:43 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 28209 for review
Message-ID:  <200304051037.h35Abh8g047042@repoman.freebsd.org>

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

Change 28209 by peter@peter_overcee on 2003/04/05 02:36:49

	kill pmap_set_opt - it'll be done right instead of this hack

Affected files ...

.. //depot/projects/hammer/sys/x86_64/include/pmap.h#11 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#14 edit

Differences ...

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

@@ -266,7 +266,6 @@
 void	*pmap_mapdev(vm_paddr_t, vm_size_t);
 void	pmap_unmapdev(vm_offset_t, vm_size_t);
 pt_entry_t *pmap_pte_quick(pmap_t, vm_offset_t) __pure2;
-void	pmap_set_opt(void);
 void	pmap_invalidate_page(pmap_t, vm_offset_t);
 void	pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t);
 void	pmap_invalidate_all(pmap_t);

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

@@ -369,48 +369,9 @@
  */
 	pseflag = 0;
 
-	/*
-	 * Turn on PGE/PSE.
-	 */
-	pmap_set_opt();
 	invltlb();
 }
 
-/*
- * Enable 4MB page mode for MP startup.  Turn on PG_G support.
- * BSP will run this after all the AP's have started up.
- */
-void
-pmap_set_opt(void)
-{
-	pt_entry_t *pte;
-	vm_offset_t va, endva;
-
-	if (pgeflag && (cpu_feature & CPUID_PGE)) {
-		load_cr4(rcr4() | CR4_PGE);
-		invltlb();		/* Insurance */
-	}
-	if (PCPU_GET(cpuid) == 0) {
-		if (pgeflag) {
-			/* Turn on PG_G for text, data, bss pages. */
-			va = (vm_offset_t)btext;
-			endva = KERNBASE + KERNend;
-			while (va < endva) {
-				pte = vtopte(va);
-				if (*pte)
-					*pte |= pgeflag;
-				va += PAGE_SIZE;
-			}
-			invltlb();	/* Insurance */
-		}
-		/*
-		 * We do not need to broadcast the invltlb here, because
-		 * each AP does it the moment it is released from the boot
-		 * lock.  See ap_init().
-		 */
-	}
-}
-
 static void *
 pmap_pv_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
 {



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