From owner-svn-src-all@FreeBSD.ORG Mon Feb 25 02:41:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D26C7BC8; Mon, 25 Feb 2013 02:41:39 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4C2705; Mon, 25 Feb 2013 02:41:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1P2fdsE088248; Mon, 25 Feb 2013 02:41:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1P2fc2h088244; Mon, 25 Feb 2013 02:41:38 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201302250241.r1P2fc2h088244@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 25 Feb 2013 02:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r247251 - in head/sys/ia64: ia64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 02:41:39 -0000 Author: marcel Date: Mon Feb 25 02:41:38 2013 New Revision: 247251 URL: http://svnweb.freebsd.org/changeset/base/247251 Log: kernacc() expects all KVAs to be covered in the kernel map. With the introduction of the PBVM, this stopped being the case. Redefine the VM parameters so that the PBVM is included in the kernel map. In particular this introduces VM_INIT_KERNEL_ADDRESS to point to the base of region 5 now that VM_MIN_KERNEL_ADDRESS points to the base of region 4 to include the PBVM. While here define KERNBASE to the actual link address of the kernel as is intended. PR: 169926 Modified: head/sys/ia64/ia64/pmap.c head/sys/ia64/include/vmparam.h Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Mon Feb 25 01:50:04 2013 (r247250) +++ head/sys/ia64/ia64/pmap.c Mon Feb 25 02:41:38 2013 (r247251) @@ -387,7 +387,7 @@ pmap_bootstrap() */ ia64_kptdir = ia64_physmem_alloc(PAGE_SIZE, PAGE_SIZE); nkpt = 0; - kernel_vm_end = VM_MIN_KERNEL_ADDRESS; + kernel_vm_end = VM_INIT_KERNEL_ADDRESS; /* * Determine a valid (mappable) VHPT size. @@ -425,7 +425,7 @@ pmap_bootstrap() ia64_set_pta(base + (1 << 8) + (pmap_vhpt_log2size << 2) + 1); ia64_srlz_i(); - virtual_avail = VM_MIN_KERNEL_ADDRESS; + virtual_avail = VM_INIT_KERNEL_ADDRESS; virtual_end = VM_MAX_KERNEL_ADDRESS; /* @@ -1383,7 +1383,7 @@ pmap_kextract(vm_offset_t va) /* Region 5 is our KVA. Bail out if the VA is beyond our limits. */ if (va >= kernel_vm_end) goto err_out; - if (va >= VM_MIN_KERNEL_ADDRESS) { + if (va >= VM_INIT_KERNEL_ADDRESS) { pte = pmap_find_kpte(va); pa = pmap_present(pte) ? pmap_ppn(pte) | (va & PAGE_MASK) : 0; goto out; @@ -2746,7 +2746,7 @@ DB_COMMAND(kpte, db_kpte) db_printf("usage: kpte \n"); return; } - if (addr < VM_MIN_KERNEL_ADDRESS) { + if (addr < VM_INIT_KERNEL_ADDRESS) { db_printf("kpte: error: invalid \n"); return; } Modified: head/sys/ia64/include/vmparam.h ============================================================================== --- head/sys/ia64/include/vmparam.h Mon Feb 25 01:50:04 2013 (r247250) +++ head/sys/ia64/include/vmparam.h Mon Feb 25 02:41:38 2013 (r247251) @@ -181,12 +181,13 @@ /* user/kernel map constants */ #define VM_MIN_ADDRESS 0 #define VM_MAXUSER_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION) -#define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1) -#define VM_MAX_KERNEL_ADDRESS \ - (VM_MIN_KERNEL_ADDRESS + IA64_REGION_GAP_START - 1) +#define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS +#define VM_INIT_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1) +#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1) #define VM_MAX_ADDRESS ~0UL -#define KERNBASE VM_MAXUSER_ADDRESS +/* We link the kernel at IA64_PBVM_BASE. */ +#define KERNBASE IA64_PBVM_BASE /* * USRSTACK is the top (end) of the user stack. Immediately above the user