From: Paul Burton Date: Wed, 21 Sep 2016 10:18:57 +0000 (+0100) Subject: MIPS: Ensure Config.K0=2 applies before any memory accesses X-Git-Tag: v2016.11-rc1~120^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5b8412d60e22b49348a63848cbf7b6ab5ccb16e;p=platform%2Fkernel%2Fu-boot.git MIPS: Ensure Config.K0=2 applies before any memory accesses During boot we set Config.K0=2 (uncached) such that any accesses to the kseg0 memory region are performed uncached before the caches are initialised. This write to the Config register introduces an execution hazard between it & any following memory accesses (such as the load of _gp), which we need to clear in order to ensure those memory accesses are actually performed uncached. Clear this execution hazard with the insertion of an ehb execution hazard barrier instruction. Signed-off-by: Paul Burton --- diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S index c157d03..8f85ede 100644 --- a/arch/mips/cpu/start.S +++ b/arch/mips/cpu/start.S @@ -127,6 +127,7 @@ reset: and t0, t0, MIPS_CONF_IMPL or t0, t0, CONF_CM_UNCACHED mtc0 t0, CP0_CONFIG + ehb #endif /*