From owner-svn-src-head@FreeBSD.ORG Mon Feb 18 01:02:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 68F60985; Mon, 18 Feb 2013 01:02:50 +0000 (UTC) (envelope-from alc@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 5B573186; Mon, 18 Feb 2013 01:02:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1I12oRk049215; Mon, 18 Feb 2013 01:02:50 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1I12nMX049209; Mon, 18 Feb 2013 01:02:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201302180102.r1I12nMX049209@svn.freebsd.org> From: Alan Cox Date: Mon, 18 Feb 2013 01:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246926 - in head/sys: arm/arm arm/include vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 01:02:50 -0000 Author: alc Date: Mon Feb 18 01:02:48 2013 New Revision: 246926 URL: http://svnweb.freebsd.org/changeset/base/246926 Log: On arm, like sparc64, the end of the kernel map varies from one type of machine to another. Therefore, VM_MAX_KERNEL_ADDRESS can't be a constant. Instead, #define it to be a variable, vm_max_kernel_address, just like we do on sparc64. Reviewed by: kib Tested by: ian Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/arm/include/vmparam.h head/sys/vm/vm_kern.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Mon Feb 18 00:38:40 2013 (r246925) +++ head/sys/arm/arm/machdep.c Mon Feb 18 01:02:48 2013 (r246926) @@ -1178,7 +1178,6 @@ initarm(struct arm_boot_params *abp) struct pv_addr kernel_l1pt; struct pv_addr dpcpu; vm_offset_t dtbp, freemempos, l2_start, lastaddr; - vm_offset_t pmap_bootstrap_lastaddr; uint32_t memsize, l2size; char *env; void *kmdp; @@ -1288,7 +1287,7 @@ initarm(struct arm_boot_params *abp) availmem_regions_sz = curr; /* Platform-specific initialisation */ - pmap_bootstrap_lastaddr = initarm_lastaddr(); + vm_max_kernel_address = initarm_lastaddr(); pcpu0_init(); @@ -1477,7 +1476,7 @@ initarm(struct arm_boot_params *abp) arm_intrnames_init(); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0])); - pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt); + pmap_bootstrap(freemempos, vm_max_kernel_address, &kernel_l1pt); msgbufp = (void *)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Feb 18 00:38:40 2013 (r246925) +++ head/sys/arm/arm/pmap-v6.c Mon Feb 18 01:02:48 2013 (r246926) @@ -231,6 +231,8 @@ vm_paddr_t kernel_l1pa; vm_offset_t kernel_vm_end = 0; +vm_offset_t vm_max_kernel_address; + struct pmap kernel_pmap_store; static pt_entry_t *csrc_pte, *cdst_pte; Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Mon Feb 18 00:38:40 2013 (r246925) +++ head/sys/arm/arm/pmap.c Mon Feb 18 01:02:48 2013 (r246926) @@ -220,6 +220,8 @@ vm_paddr_t kernel_l1pa; vm_offset_t kernel_vm_end = 0; +vm_offset_t vm_max_kernel_address; + struct pmap kernel_pmap_store; static pt_entry_t *csrc_pte, *cdst_pte; Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Mon Feb 18 00:38:40 2013 (r246925) +++ head/sys/arm/include/vmparam.h Mon Feb 18 01:02:48 2013 (r246926) @@ -133,7 +133,7 @@ #define VM_MIN_KERNEL_ADDRESS KERNBASE #endif -#define VM_MAX_KERNEL_ADDRESS 0xffffffff +#define VM_MAX_KERNEL_ADDRESS (vm_max_kernel_address) /* * Virtual size (bytes) for various kernel submaps. @@ -166,6 +166,8 @@ #define UMA_MD_SMALL_ALLOC #endif /* ARM_USE_SMALL_ALLOC */ +extern vm_offset_t vm_max_kernel_address; + #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ #endif /* _MACHINE_VMPARAM_H_ */ Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Mon Feb 18 00:38:40 2013 (r246925) +++ head/sys/vm/vm_kern.c Mon Feb 18 01:02:48 2013 (r246926) @@ -98,7 +98,7 @@ SYSCTL_ULONG(_vm, OID_AUTO, min_kernel_a NULL, VM_MIN_KERNEL_ADDRESS, "Min kernel address"); SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLAG_RD, -#ifdef __sparc64__ +#if defined(__arm__) || defined(__sparc64__) &vm_max_kernel_address, 0, #else NULL, VM_MAX_KERNEL_ADDRESS,