u-boot-brain/arch/mips/lib
Paul Burton d8b326976a MIPS: Clear instruction hazards in flush_cache()
When writing code, for example during relocation, we ensure that the
icache has a coherent view of the new instructions with a call to
flush_cache(). This handles the bulk of the work to ensure the new
instructions will execute as expected, however it does not ensure that
the CPU pipeline doesn't already contain instructions taken from a stale
view of the affected memory. This could theoretically be a problem for
relocation, but in practice typically isn't because we sync caches for
enough code after the entry point of the newly written code that by the
time the CPU pipeline might possibly fetch any of it we'll have long ago
written it back & invalidated any stale icache entries. This is however
a problem for shorter regions of code.

In preparation for later patches which write shorter segments of code,
ensure any instruction hazards are cleared by flush_cache() by
introducing & using a new instruction_hazard_barrier() function which
makes use of the jr.hb instruction to clear the hazard.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
2017-11-28 21:59:30 +01:00
..
ashldi3.c dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
ashrdi3.c dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
asm-offsets.c MIPS: add asm-offsets for struct pt_regs 2016-11-30 16:11:46 +01:00
bootm.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cache_init.S MIPS: Ensure cache ops complete in mips_cache_reset 2016-09-21 15:04:04 +02:00
cache.c MIPS: Clear instruction hazards in flush_cache() 2017-11-28 21:59:30 +01:00
genex.S MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00
libgcc.h dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
lshrdi3.c dm: mips: Import libgcc components from Linux 2012-08-17 20:13:48 +02:00
Makefile MIPS: Stop building position independent code 2017-07-25 20:44:00 +02:00
reloc.c MIPS: Stop building position independent code 2017-07-25 20:44:00 +02:00
stack.c MIPS: reserve space for exception vectors 2016-11-30 16:11:46 +01:00
traps.c MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00