diff options
author | neel <neel@FreeBSD.org> | 2010-01-23 03:19:13 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2010-01-23 03:19:13 +0000 |
commit | bd8fb9e267b92921fd7d5fbe27514ec3c1957171 (patch) | |
tree | 22f56da705538b97231a5045f5c218ebe2418fbc /sys/mips/sibyte | |
parent | db8e82befbfbb9e2d14e59030809a3dbd6244f38 (diff) | |
download | FreeBSD-src-bd8fb9e267b92921fd7d5fbe27514ec3c1957171.zip FreeBSD-src-bd8fb9e267b92921fd7d5fbe27514ec3c1957171.tar.gz |
Remove Sibyte specific code from locore.S that sets the k0seg coherency.
Move it to platform_start() instead.
Approved by: imp (mentor)
Diffstat (limited to 'sys/mips/sibyte')
-rw-r--r-- | sys/mips/sibyte/sb_machdep.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/mips/sibyte/sb_machdep.c b/sys/mips/sibyte/sb_machdep.c index 8bb265c..4e4d81a 100644 --- a/sys/mips/sibyte/sb_machdep.c +++ b/sys/mips/sibyte/sb_machdep.c @@ -230,12 +230,29 @@ platform_trap_exit(void) } +static void +kseg0_map_coherent(void) +{ + uint32_t config; + const int CFG_K0_COHERENT = 5; + + config = mips_rd_config(); + config &= ~CFG_K0_MASK; + config |= CFG_K0_COHERENT; + mips_wr_config(config); +} + void platform_start(__register_t a0, __register_t a1, __register_t a2, __register_t a3) { vm_offset_t kernend; + /* + * Make sure that kseg0 is mapped cacheable-coherent + */ + kseg0_map_coherent(); + /* clear the BSS and SBSS segments */ memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); kernend = round_page((vm_offset_t)&end); |