From owner-svn-src-stable@FreeBSD.ORG Mon Jan 19 05:20:52 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 E7AF6106566B; Mon, 19 Jan 2009 05:20:52 +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 D5BAA8FC17; Mon, 19 Jan 2009 05:20:52 +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 n0J5Kq4x098767; Mon, 19 Jan 2009 05:20:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0J5KqTp098763; Mon, 19 Jan 2009 05:20:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901190520.n0J5KqTp098763@svn.freebsd.org> From: Alan Cox Date: Mon, 19 Jan 2009 05:20:52 +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: r187420 - in stable/7/sys/amd64: amd64 include 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: Mon, 19 Jan 2009 05:20:53 -0000 Author: alc Date: Mon Jan 19 05:20:52 2009 New Revision: 187420 URL: http://svn.freebsd.org/changeset/base/187420 Log: MFC partial merge of rev 179886 Make preparations for increasing the size of the kernel virtual address space on the amd64 architecture. Modified: stable/7/sys/amd64/amd64/mem.c stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/amd64/trap.c stable/7/sys/amd64/include/stack.h Modified: stable/7/sys/amd64/amd64/mem.c ============================================================================== --- stable/7/sys/amd64/amd64/mem.c Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/amd64/mem.c Mon Jan 19 05:20:52 2009 (r187420) @@ -119,7 +119,7 @@ kmemphys: addr = trunc_page(v); eaddr = round_page(v + c); - if (addr < (vm_offset_t)KERNBASE) + if (addr < VM_MIN_KERNEL_ADDRESS) return (EFAULT); for (; addr < eaddr; addr += PAGE_SIZE) if (pmap_extract(kernel_pmap, addr) == 0) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/amd64/pmap.c Mon Jan 19 05:20:52 2009 (r187420) @@ -1493,7 +1493,7 @@ pmap_release(pmap_t pmap) static int kvm_size(SYSCTL_HANDLER_ARGS) { - unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; + unsigned long ksize = VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS; return sysctl_handle_long(oidp, &ksize, 0, req); } @@ -1523,7 +1523,7 @@ pmap_growkernel(vm_offset_t addr) mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { - kernel_vm_end = KERNBASE; + kernel_vm_end = VM_MIN_KERNEL_ADDRESS; nkpt = 0; while ((*pmap_pde(kernel_pmap, kernel_vm_end) & PG_V) != 0) { kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); Modified: stable/7/sys/amd64/amd64/trap.c ============================================================================== --- stable/7/sys/amd64/amd64/trap.c Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/amd64/trap.c Mon Jan 19 05:20:52 2009 (r187420) @@ -610,7 +610,7 @@ trap_pfault(frame, usermode) vm_offset_t eva = frame->tf_addr; va = trunc_page(eva); - if (va >= KERNBASE) { + if (va >= VM_MIN_KERNEL_ADDRESS) { /* * Don't allow user-mode faults in kernel address space. */ Modified: stable/7/sys/amd64/include/stack.h ============================================================================== --- stable/7/sys/amd64/include/stack.h Mon Jan 19 04:31:18 2009 (r187419) +++ stable/7/sys/amd64/include/stack.h Mon Jan 19 05:20:52 2009 (r187420) @@ -33,7 +33,7 @@ * Stack trace. */ #define INKERNEL(va) (((va) >= DMAP_MIN_ADDRESS && (va) < DMAP_MAX_ADDRESS) \ - || ((va) >= KERNBASE && (va) < VM_MAX_KERNEL_ADDRESS)) + || ((va) >= VM_MIN_KERNEL_ADDRESS && (va) < VM_MAX_KERNEL_ADDRESS)) struct amd64_frame { struct amd64_frame *f_frame;