[RFC 5/7] MIPS: malta: make KSEG0 uncached

Antony Pavlov antonynpavlov at gmail.com
Fri Jul 20 04:47:37 EDT 2012


On MIPS as usual KSEG0 segment used for cached memory access,
and Linux kernel linked to KSEG0.

As just now we don't have cache memory support on MIPS,
we can change the KSEG0 mode (make it uncached) and
use it without any danger.

Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 arch/mips/mach-malta/lowlevel_init.S |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/mach-malta/lowlevel_init.S b/arch/mips/mach-malta/lowlevel_init.S
index a0134f8..368c2fe 100644
--- a/arch/mips/mach-malta/lowlevel_init.S
+++ b/arch/mips/mach-malta/lowlevel_init.S
@@ -62,6 +62,10 @@ LEAF(mach_init_lowlevel)
 	lui	t0, 0x5e00
 	sw	t0, 136(t1) /* GT_PCI0M1HD */
 
+	/* make KSEG0 uncached */
+	li	t0, CONF_CM_UNCACHED
+	mtc0	t0, CP0_CONFIG
+
 	/* return */
 	b	mach_init_lowlevel_return
 	 nop
-- 
1.7.10




More information about the barebox mailing list