Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2014 21:01:34 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r265199 - projects/arm64/sys/arm64/arm64
Message-ID:  <201405012101.s41L1YuA047874@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405012101.s41L1YuA047874>