From owner-p4-projects@FreeBSD.ORG Wed Nov 22 13:20:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D64F716A415; Wed, 22 Nov 2006 13:20:54 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2D5A16A40F for ; Wed, 22 Nov 2006 13:20:54 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8D7743D55 for ; Wed, 22 Nov 2006 13:20:25 +0000 (GMT) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAMDKs3H058293 for ; Wed, 22 Nov 2006 13:20:54 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAMDKs7h058289 for perforce@freebsd.org; Wed, 22 Nov 2006 13:20:54 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 22 Nov 2006 13:20:54 GMT Message-Id: <200611221320.kAMDKs7h058289@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 110382 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: Wed, 22 Nov 2006 13:20:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=110382 Change 110382 by gonzo@gonzo_hq on 2006/11/22 13:20:47 o use page index based on virtual addres to grab page for segment. o bzero newly created segment to prevent garbage PTEs. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/pmap.c#14 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/pmap.c#14 (text+ko) ==== @@ -1160,7 +1160,7 @@ VM_OBJECT_LOCK(pmap->pm_pteobj); mem = vm_page_grab(pmap->pm_pteobj, - MIPS_PMAP_SEGSIZE, + va >> SEGSHIFT, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | \ VM_ALLOC_WIRED | VM_ALLOC_ZERO); @@ -1172,6 +1172,10 @@ pmap_segmap(pmap, va) = (pt_entry_t *)MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(mem)); + + /* Fill new segment with invalid pte's */ + bzero((caddr_t) pmap_segmap(pmap, va), + MIPS_PMAP_SEGSIZE * sizeof(pt_entry_t *)); } }