u-boot/arch/mips
Paul Burton d263cda5ae MIPS: Fix cache maintenance in relocate_code & simplify
The relocate_code function was handling cache maintenance incorrectly.
It copied U-Boot to its new location, flushed the caches & then
proceeded to apply relocations & jump to the new code without flushing
the caches again. This is problematic as the instruction cache could
potentially have already fetched instructions that hadn't had relocs
applied.

Rework this to perform the flush_cache call using the code in the
original copy of U-Boot, after having applied relocations to the new
copy of U-Boot. The new U-Boot can then be jumped to safely once that
cache flush has been performed.

As part of this, since the old U-Boot is used up until after that cache
flush, complexity around loading values from the GOT using a jump & link
instruction & loads from a table is removed. Instead we can simply load
the needed values with PTR_LA fromt the original GOT.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2016-09-21 16:25:43 +02:00
..
cpu MIPS: Fix cache maintenance in relocate_code & simplify 2016-09-21 16:25:43 +02:00
dts boston: Introduce support for the MIPS Boston development board 2016-09-21 16:24:36 +02:00
include/asm MIPS: Join the coherent domain when a CM is present 2016-09-21 15:04:04 +02:00
lib MIPS: Ensure cache ops complete in mips_cache_reset 2016-09-21 15:04:04 +02:00
mach-ath79 MIPS: ath79: Use mach_cpu_init instead of arch_cpu_init 2016-09-21 15:04:04 +02:00
mach-au1x00 net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
mach-pic32 clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
config.mk MIPS: provide a default u-boot-spl.lds 2016-05-31 09:38:11 +02:00
Kconfig boston: Introduce support for the MIPS Boston development board 2016-09-21 16:24:36 +02:00
Makefile MIPS: add tune for MIPS 34kc 2016-05-31 09:38:11 +02:00