diff options
author | cognet <cognet@FreeBSD.org> | 2006-08-08 20:59:38 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2006-08-08 20:59:38 +0000 |
commit | 2d628bb4d98b991fc187a29462ce204e463b7166 (patch) | |
tree | 04b496f0b265f6f59af71e0fdad414f440d96983 /sys/arm/at91 | |
parent | e813d81ecb6ebb4e3e75ac0c94d25e4e4c92bdad (diff) | |
download | FreeBSD-src-2d628bb4d98b991fc187a29462ce204e463b7166.zip FreeBSD-src-2d628bb4d98b991fc187a29462ce204e463b7166.tar.gz |
Rewrite ARM_USE_SMALL_ALLOC so that instead of the current behavior, it maps
whole the physical memory, cached, using 1MB section mappings. This reduces
the address space available for user processes a bit, but given the amount of
memory a typical arm machine has, it is not (yet) a big issue.
It then provides a uma_small_alloc() that works as it does for architectures
which have a direct mapping.
Diffstat (limited to 'sys/arm/at91')
-rw-r--r-- | sys/arm/at91/kb920x_machdep.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/arm/at91/kb920x_machdep.c b/sys/arm/at91/kb920x_machdep.c index f7d9c8b..43cf488 100644 --- a/sys/arm/at91/kb920x_machdep.c +++ b/sys/arm/at91/kb920x_machdep.c @@ -465,6 +465,15 @@ initarm(void *arg, void *arg2) arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL); pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1); + /* + * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before + * calling pmap_bootstrap. + */ + dump_avail[0] = KERNPHYSADDR; + dump_avail[1] = KERNPHYSADDR + memsize; + dump_avail[2] = 0; + dump_avail[3] = 0; + pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt); @@ -473,10 +482,6 @@ initarm(void *arg, void *arg2) mutex_init(); i = 0; - dump_avail[0] = KERNPHYSADDR; - dump_avail[1] = KERNPHYSADDR + memsize; - dump_avail[2] = 0; - dump_avail[3] = 0; phys_avail[0] = virtual_avail - KERNVIRTADDR + KERNPHYSADDR; phys_avail[1] = KERNPHYSADDR + memsize; |