From owner-svn-src-projects@FreeBSD.ORG Thu May 1 21:01:35 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EE785DC; Thu, 1 May 2014 21:01:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 132261C05; Thu, 1 May 2014 21:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s41L1Yxc047875; Thu, 1 May 2014 21:01:34 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s41L1YuA047874; Thu, 1 May 2014 21:01:34 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201405012101.s41L1YuA047874@svn.freebsd.org> From: Andrew Turner Date: Thu, 1 May 2014 21:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r265199 - projects/arm64/sys/arm64/arm64 X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2014 21:01:35 -0000 Author: andrew Date: Thu May 1 21:01:34 2014 New Revision: 265199 URL: http://svnweb.freebsd.org/changeset/base/265199 Log: Make physmap gobal so pmap_bootstrap can use it. While here make unsigned values unsigned. Modified: projects/arm64/sys/arm64/arm64/machdep.c Modified: projects/arm64/sys/arm64/arm64/machdep.c ============================================================================== --- projects/arm64/sys/arm64/arm64/machdep.c Thu May 1 20:49:02 2014 (r265198) +++ projects/arm64/sys/arm64/arm64/machdep.c Thu May 1 21:01:34 2014 (r265199) @@ -61,6 +61,8 @@ int cold = 1; long realmem = 0; #define PHYSMAP_SIZE (2 * (VM_PHYSSEG_MAX - 1)) +vm_paddr_t physmap[PHYSMAP_SIZE]; +u_int physmap_idx; void bzero(void *buf, size_t len) @@ -286,9 +288,9 @@ typedef struct { static int add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, - int *physmap_idxp) + u_int *physmap_idxp) { - int i, insert_idx, physmap_idx; + u_int i, insert_idx, physmap_idx; physmap_idx = *physmap_idxp; @@ -353,7 +355,7 @@ add_physmap_entry(uint64_t base, uint64_ static void add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, - int *physmap_idx) + u_int *physmap_idx) { struct efi_md *map, *p; const char *type; @@ -445,10 +447,8 @@ add_efi_map_entries(struct efi_map_heade void initarm(struct arm64_bootparams *abp) { - vm_paddr_t physmap[PHYSMAP_SIZE]; struct efi_map_header *efihdr; vm_offset_t lastaddr; - int physmap_idx; caddr_t kmdp; vm_paddr_t mem_len; int i; @@ -466,10 +466,6 @@ initarm(struct arm64_bootparams *abp) /* Find the address to start allocating from */ lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); - /* Bootstrap enough of pmap to enter the kernel proper */ - pmap_bootstrap(abp->kern_l1pt, KERNBASE - abp->kern_delta, - lastaddr - KERNBASE); - /* Load the physical memory ranges */ physmap_idx = 0; efihdr = (struct efi_map_header *)preload_search_info(kmdp, @@ -484,6 +480,11 @@ initarm(struct arm64_bootparams *abp) } printf("Total = %llx\n", mem_len); + /* Bootstrap enough of pmap to enter the kernel proper */ + pmap_bootstrap(abp->kern_l1pt, KERNBASE - abp->kern_delta, + lastaddr - KERNBASE); + + printf("End initarm\n"); }