Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jul 2006 00:58:18 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 100374 for review
Message-ID:  <200607010058.k610wI85009102@repoman.freebsd.org>

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

Change 100374 by kmacy@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;
 }
 
 



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