Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2006 09:04:18 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 93392 for review
Message-ID:  <200603160904.k2G94IiL051858@repoman.freebsd.org>

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

Change 93392 by kmacy@kmacy_storage:sun4v_work on 2006/03/16 09:04:08

	reduce debug noise somewhat
	ensure all direct mappings are added

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#27 edit

Differences ...

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

@@ -357,8 +357,6 @@
 	pmap->pm_active |= 1;
 #endif
 	pmap->pm_hashscratch = tte_hash_set_scratchpad_user(pmap->pm_hash);
-	printf("hashscratch=%lx\n", pmap->pm_hashscratch);
-
 	pmap->pm_tsbscratch = tsb_set_scratchpad_user(&pmap->pm_tsb);
 	PCPU_SET(curpmap, pmap);
 	critical_exit();
@@ -533,18 +531,20 @@
 	/*
 	 * Calculate the last available physical address.
 	 */
-	for (i = 0; phys_avail[i + 2] != 0; i += 2)
+	for (i = 0; phys_avail[i + 2] != 0; i += 2) 
 		;
 	Maxmem = sparc64_btop(phys_avail[i + 1]);
 	/*
 	 * setup direct mappings
 	 * 
 	 */
-	for (pa = PAGE_SIZE_4M; pa < phys_avail[2]; pa += PAGE_SIZE_4M) {
+	pa = PAGE_SIZE_4M;
+	for (i = 0; phys_avail[i + 2] != 0; i += 2) 
+		for (; pa < phys_avail[i + 1]; pa += PAGE_SIZE_4M) {
 		tsb_set_tte(&kernel_td[TSB4M_INDEX], TLB_PHYS_TO_DIRECT(pa), 
 			    pa | TTE_KERNEL | VTD_4M, 0);
-	}
-
+		}
+	
 	/*
 	 * Add the prom mappings to the kernel tsb.
 	 */
@@ -613,7 +613,6 @@
 
 	PMAP_LOCK_INIT(kernel_pmap);
 	TAILQ_INIT(&kernel_pmap->pm_pvlist);
-	printf("physical address of kernel_td: 0x%lx\n", vtophys((vm_offset_t)&kernel_td));
 	
 	error = hv_set_ctx0(MAX_TSB_INFO, vtophys((vm_offset_t)&kernel_td));
 	if (error != H_EOK)
@@ -698,8 +697,7 @@
 	vm_offset_t addr, end_addr;
 
 	end_addr = src_addr + len;
-	
-	printf("pmap_copy(0x%lx, %ld, 0x%lx)\n", dst_addr, len, src_addr);
+
 	if (dst_addr != src_addr)
 		return;
 
@@ -1130,11 +1128,7 @@
 pmap_kremove(vm_offset_t va)
 { 
 
-	if ((va & PAGE_MASK_4M) == 0 &&	
-	    tsb_get_tte(&kernel_td[TSB4M_INDEX], va) != 0)
-		tsb_clear_tte(&kernel_td[TSB4M_INDEX], va);
-	else
-		tte_hash_delete(kernel_pmap->pm_hash, va);
+	tte_hash_delete(kernel_pmap->pm_hash, va);
 }
 
 static void
@@ -1266,7 +1260,6 @@
 		("max context limit hit - need to implement context recycling"));
 
 	pmap->pm_hash = tte_hash_create(pmap->pm_context, &pmap->pm_hashscratch);
-	printf("hashscratch=%lx\n", pmap->pm_hashscratch);
 	pmap->pm_tsb_ra = tsb_init(&pmap->pm_tsb, &pmap->pm_tsbscratch);
 	pmap->pm_active = 0;
 	TAILQ_INIT(&pmap->pm_pvlist);



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