From owner-p4-projects@FreeBSD.ORG Fri Feb 29 19:47:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E73F61065DC7; Fri, 29 Feb 2008 19:47:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B02EE1065B94 for ; Fri, 29 Feb 2008 19:47:42 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 173218FC2A for ; Fri, 29 Feb 2008 19:47:42 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1TJlfUA092366 for ; Fri, 29 Feb 2008 19:47:41 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1TJlfmv092364 for perforce@freebsd.org; Fri, 29 Feb 2008 19:47:41 GMT (envelope-from rrs@cisco.com) Date: Fri, 29 Feb 2008 19:47:41 GMT Message-Id: <200802291947.m1TJlfmv092364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 136430 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Feb 2008 19:47:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=136430 Change 136430 by rrs@rrs-mips2-jnpr on 2008/02/28 13:57:41 Fix for pmap.c (and also some more debug available). Note still need to find out who is setting P_G on pte entries in non kernel map. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#24 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#24 (text+ko) ==== @@ -618,7 +618,6 @@ return; } va = pmap_va_asid(pmap, va); - MachTLBUpdate(va, pte); } @@ -1823,8 +1822,16 @@ if (wired) newpte |= PG_W; - if (is_kernel_pmap(pmap)) - newpte |= PG_G; + if (is_kernel_pmap(pmap)) { + newpte |= PG_G; + } else { + /* non kernel map should + * should never have the PG_G + * bit on. FIX, need to find out + * who is turning it on in callers. + */ + newpte &= (~PG_G); + } /* * if the mapping or permission bits are different, we need to @@ -2861,8 +2868,9 @@ return addr; } +int pmap_pid_dump(int pid); -#if defined(PMAP_DEBUG) +int pmap_pid_dump(int pid) { pmap_t pmap; @@ -2878,6 +2886,8 @@ if (p->p_vmspace) { int i, j; + printf("vmspace is %p\n", + p->p_vmspace); index = 0; pmap = vmspace_pmap(p->p_vmspace); for (i = 0; i < NUSERPGTBLS; i++) { @@ -2915,13 +2925,15 @@ } } } + } else { + printf("Process pid:%d has no vm_space\n", pid); } + break; } sx_sunlock(&allproc_lock); return npte; } -#endif #if defined(DEBUG) @@ -3096,9 +3108,9 @@ while (tlbno <= last) { MachTLBRead(tlbno, &tlb); if (tlb.tlb_lo0 & PG_V || tlb.tlb_lo1 & PG_V) { - printf("TLB %2d vad 0x%08x ", tlbno, tlb.tlb_hi); + printf("TLB %2d vad 0x%08x ", tlbno, (tlb.tlb_hi & 0xffffff00)); } else { - printf("TLB*%2d vad 0x%08x ", tlbno, tlb.tlb_hi); + printf("TLB*%2d vad 0x%08x ", tlbno, (tlb.tlb_hi & 0xffffff00)); } printf("0=0x%08x ", pfn_to_vad(tlb.tlb_lo0)); printf("%c", tlb.tlb_lo0 & PG_M ? 'M' : ' '); @@ -3108,8 +3120,9 @@ printf("%c", tlb.tlb_lo1 & PG_M ? 'M' : ' '); printf("%c", tlb.tlb_lo1 & PG_G ? 'G' : ' '); printf(" atr %x ", (tlb.tlb_lo1 >> 3) & 7); - printf(" sz=%x\n", tlb.tlb_mask); - + printf(" sz=%x pid=%x\n", tlb.tlb_mask, + (tlb.tlb_hi & 0x000000ff) + ); tlbno++; } }