diff options
author | cognet <cognet@FreeBSD.org> | 2004-11-10 22:09:39 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2004-11-10 22:09:39 +0000 |
commit | 1cf3104ff5402bf800a992978631a216d5ebe38f (patch) | |
tree | 27432e35a143ce0cac7aa8e53426ec7f4dfb455b /sys | |
parent | 735956cb8e06e7cf19d53ddd127800a862eacc64 (diff) | |
download | FreeBSD-src-1cf3104ff5402bf800a992978631a216d5ebe38f.zip FreeBSD-src-1cf3104ff5402bf800a992978631a216d5ebe38f.tar.gz |
Convert the IQ31244 code to use ARM32_NEW_VM_LAYOUT.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/conf/IQ31244 | 1 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/iq31244_machdep.c | 21 |
2 files changed, 16 insertions, 6 deletions
diff --git a/sys/arm/conf/IQ31244 b/sys/arm/conf/IQ31244 index c309500..105d4f9 100644 --- a/sys/arm/conf/IQ31244 +++ b/sys/arm/conf/IQ31244 @@ -25,6 +25,7 @@ options KERNPHYSADDR=0xa0200000 options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm options STARTUP_PAGETABLE_ADDR=0xa0000000 +options ARM32_NEW_VM_LAYOUT include "../xscale/i80321/std.iq31244" #To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" #Default places to look for devices. diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c index 53e9096..0f9093b 100644 --- a/sys/arm/xscale/i80321/iq31244_machdep.c +++ b/sys/arm/xscale/i80321/iq31244_machdep.c @@ -105,7 +105,7 @@ __FBSDID("$FreeBSD$"); #define KERNEL_PT_IOPXS (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM) #define KERNEL_PT_VMDATA (KERNEL_PT_IOPXS + 1) -#define KERNEL_PT_VMDATA_NUM 4 +#define KERNEL_PT_VMDATA_NUM 10 #define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) /* Define various stack sizes in pages */ @@ -262,8 +262,17 @@ initarm(void *arg, void *arg2) freemempos -= PAGE_SIZE; valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE); for (loop = 0; loop < NUM_KERNEL_PTS; ++loop) { - valloc_pages(kernel_pt_table[loop], - L2_TABLE_SIZE / PAGE_SIZE); + if (!(loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL))) { + valloc_pages(kernel_pt_table[loop], + L2_TABLE_SIZE / PAGE_SIZE); + } else { + kernel_pt_table[loop].pv_pa = freemempos - + (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) * + L2_TABLE_SIZE_REAL; + kernel_pt_table[loop].pv_va = + kernel_pt_table[loop].pv_pa + 0x20000000; + } + i++; } /* @@ -301,14 +310,14 @@ initarm(void *arg, void *arg2) /* Map the L2 pages tables in the L1 page table */ - pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH & ~(0x00400000 - 1), + pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH & ~(0x00100000 - 1), &kernel_pt_table[KERNEL_PT_SYS]); for (i = 0; i < KERNEL_PT_KERNEL_NUM; i++) { - pmap_link_l2pt(l1pagetable, KERNBASE + i * 0x00400000, + pmap_link_l2pt(l1pagetable, KERNBASE + i * 0x00100000, &kernel_pt_table[KERNEL_PT_KERNEL + i]); } for (loop = 0; loop < KERNEL_PT_VMDATA_NUM; ++loop) - pmap_link_l2pt(l1pagetable, KERNBASE + (i + loop) * 0x00400000, + pmap_link_l2pt(l1pagetable, KERNBASE + (i + loop) * 0x00100000, &kernel_pt_table[KERNEL_PT_VMDATA + loop]); pmap_link_l2pt(l1pagetable, IQ80321_IOPXS_VBASE, &kernel_pt_table[KERNEL_PT_IOPXS]); |