mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-13 08:27:23 +00:00
d8b326976a
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 |
||
---|---|---|
.. | ||
mach-generic | ||
addrspace.h | ||
asm-offsets.h | ||
asm.h | ||
bitops.h | ||
byteorder.h | ||
cache.h | ||
cachectl.h | ||
cacheops.h | ||
cm.h | ||
config.h | ||
const.h | ||
cpu-features.h | ||
global_data.h | ||
gpio.h | ||
io.h | ||
isadep.h | ||
linkage.h | ||
malta.h | ||
mipsregs.h | ||
pgtable-bits.h | ||
posix_types.h | ||
processor.h | ||
ptrace.h | ||
reboot.h | ||
reg.h | ||
regdef.h | ||
relocs.h | ||
sections.h | ||
sgidefs.h | ||
string.h | ||
system.h | ||
types.h | ||
u-boot-mips.h | ||
u-boot.h | ||
unaligned.h |