diff options
author | ian <ian@FreeBSD.org> | 2014-02-09 22:10:14 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-02-09 22:10:14 +0000 |
commit | 0b5f9c7142dec58f94b2f93de8c18c106d0b0238 (patch) | |
tree | 8aeff57d0a2504a0dc432f6cb61d3ea21e2ef1a6 /sys/arm/xscale/i80321/ep80219_machdep.c | |
parent | 01fe85d1ed6939183498272d46f1657950cdb53e (diff) | |
download | FreeBSD-src-0b5f9c7142dec58f94b2f93de8c18c106d0b0238.zip FreeBSD-src-0b5f9c7142dec58f94b2f93de8c18c106d0b0238.tar.gz |
Update legacy platforms to use new arm_physmem helper routines.
Diffstat (limited to 'sys/arm/xscale/i80321/ep80219_machdep.c')
-rw-r--r-- | sys/arm/xscale/i80321/ep80219_machdep.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c index 4a58f37..6211a7a 100644 --- a/sys/arm/xscale/i80321/ep80219_machdep.c +++ b/sys/arm/xscale/i80321/ep80219_machdep.c @@ -333,24 +333,27 @@ initarm(struct arm_boot_params *abp) /* Enable MMU, I-cache, D-cache, write buffer. */ arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); - pmap_curmaxkvaddr = afterkern + PAGE_SIZE; - dump_avail[0] = 0xa0000000; - dump_avail[1] = 0xa0000000 + memsize; - dump_avail[2] = 0; - dump_avail[3] = 0; - vm_max_kernel_address = 0xe0000000; pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt); msgbufp = (void*)msgbufpv.pv_va; msgbufinit(msgbufp, msgbufsize); mutex_init(); - i = 0; - phys_avail[i++] = round_page(virtual_avail - KERNBASE + IQ80321_SDRAM_START); - phys_avail[i++] = trunc_page(0xa0000000 + memsize - 1); - phys_avail[i++] = 0; - phys_avail[i] = 0; - + /* + * Add the physical ram we have available. + * + * Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_hardware_region(IQ80321_SDRAM_START, memsize); + arm_physmem_exclude_region(abp->abp_physaddr, + virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - |