From owner-svn-src-stable@FreeBSD.ORG Sun Jan 18 23:34:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A2211065672; Sun, 18 Jan 2009 23:34:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF178FC1A; Sun, 18 Jan 2009 23:34:18 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0INYInP091316; Sun, 18 Jan 2009 23:34:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0INYIFD091315; Sun, 18 Jan 2009 23:34:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901182334.n0INYIFD091315@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 23:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187414 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 23:34:19 -0000 Author: alc Date: Sun Jan 18 23:34:17 2009 New Revision: 187414 URL: http://svn.freebsd.org/changeset/base/187414 Log: MFC rev 180362 Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture: Rev 180333, ``Change create_pagetables() and pmap_init() so that many fewer page table pages have to be preallocated ...'', violates an assumption made by minidumpsys(): kernel_vm_end is the highest virtual address that has ever been used by the kernel. Now, however, the kernel code, data, and bss may reside at addresses beyond kernel_vm_end. This revision modifies the upper bound on minidumpsys()'s two page table traversals to account for this possibility. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/minidump_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/minidump_machdep.c Sun Jan 18 23:21:04 2009 (r187413) +++ stable/7/sys/amd64/amd64/minidump_machdep.c Sun Jan 18 23:34:17 2009 (r187414) @@ -202,7 +202,8 @@ minidumpsys(struct dumperinfo *di) /* Walk page table pages, set bits in vm_page_dump */ ptesize = 0; pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys); - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) { + for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR, + kernel_vm_end); va += NBPDR) { i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); /* * We always write a page, even if it is zero. Each @@ -308,7 +309,8 @@ minidumpsys(struct dumperinfo *di) /* Dump kernel page table pages */ pdp = (uint64_t *)PHYS_TO_DMAP(KPDPphys); - for (va = VM_MIN_KERNEL_ADDRESS; va < kernel_vm_end; va += NBPDR) { + for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + NKPT * NBPDR, + kernel_vm_end); va += NBPDR) { i = (va >> PDPSHIFT) & ((1ul << NPDPEPGSHIFT) - 1); /* We always write a page, even if it is zero */ if ((pdp[i] & PG_V) == 0) {