diff options
author | alc <alc@FreeBSD.org> | 2013-02-18 01:02:48 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2013-02-18 01:02:48 +0000 |
commit | 88b6705ed66e8e65890f043013d6a9781f8a6ddc (patch) | |
tree | d5b8faf2506eddd4321894bc7b4cd7f04c10df40 /sys/arm | |
parent | 4ec0049878981227b783e1722f6f3fc61897bbc1 (diff) | |
download | FreeBSD-src-88b6705ed66e8e65890f043013d6a9781f8a6ddc.zip FreeBSD-src-88b6705ed66e8e65890f043013d6a9781f8a6ddc.tar.gz |
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
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/machdep.c | 5 | ||||
-rw-r--r-- | sys/arm/arm/pmap-v6.c | 2 | ||||
-rw-r--r-- | sys/arm/arm/pmap.c | 2 | ||||
-rw-r--r-- | sys/arm/include/vmparam.h | 4 |
4 files changed, 9 insertions, 4 deletions
diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 5c4d92c..28d1902 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -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(); diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index d3e386d..f05f120 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -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; diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 7170a98..c9cb42c 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -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; diff --git a/sys/arm/include/vmparam.h b/sys/arm/include/vmparam.h index 267ba6e..50c575b 100644 --- a/sys/arm/include/vmparam.h +++ b/sys/arm/include/vmparam.h @@ -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_ */ |