PERFORCE change 100374 for review

Kip Macy kmacy at FreeBSD.org
Sat Jul 1 00:58:19 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100374

Change 100374 by kmacy at kmacy_storage:sun4v_work_stable on 2006/07/01 00:57:47

	don't use memory ranges less than 4M

Affected files ...

.. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/pmap.c#4 edit

Differences ...

==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/pmap.c#4 (text+ko) ====

@@ -694,6 +694,12 @@
 			    pa | TTE_KERNEL | VTD_4M, 0);
 		}
 
+        for (i = 0; i < 2; i++) {
+                pa = nucleus_mappings[i];
+                tsb_set_tte_real(&kernel_td[TSB4M_INDEX], TLB_PHYS_TO_DIRECT(pa),
+				 pa | TTE_KERNEL | VTD_4M, 0);
+
+	}
 	/*
 	 * Get the available physical memory ranges from /memory/reg. These
 	 * are only used for kernel dumps, but it may not be wise to do prom
@@ -761,6 +767,10 @@
 		tte_hash_insert(pm->pm_hash, TLB_PHYS_TO_DIRECT(pa), 
 				pa | TTE_KERNEL | VTD_4M);
 #endif
+        /* XXX relies on the fact that memory ranges only get smaller */
+        for (i = 0; phys_avail[i + 2] != 0; i += 2)
+                if (phys_avail[i + 1] - phys_avail[i] < PAGE_SIZE_4M)
+                        phys_avail[i] = phys_avail[i+1] = 0;
 }
 
 


More information about the p4-projects mailing list