Skip to content
Snippets Groups Projects
Commit c5b8412d authored by Paul Burton's avatar Paul Burton Committed by Daniel Schwierzeck
Browse files

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: default avatarPaul Burton <paul.burton@imgtec.com>
parent 566ce04d
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,7 @@ reset:
and t0, t0, MIPS_CONF_IMPL
or t0, t0, CONF_CM_UNCACHED
mtc0 t0, CP0_CONFIG
ehb
#endif
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment