u-boot-brain/arch
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
..
arc arc: Use -mcpu=XXX instead of obsolete -marcXXX 2016-09-16 12:12:26 +03:00
arm Merge branch 'master' of git://git.denx.de/u-boot-uniphier 2016-09-18 14:05:30 -04:00
avr32 avr32: Drop unused code in u-boot.h 2016-05-27 15:39:52 -04:00
blackfin configs: Re-sync almost all of cmd/Kconfig 2016-04-25 15:09:40 -04:00
m68k net: mii: Changes not made by spatch 2016-08-15 15:29:03 -05:00
microblaze Remove unneeded remnants of bcopy(). 2016-06-06 13:39:18 -04:00
mips MIPS: Fix cache maintenance in relocate_code & simplify 2016-09-21 16:25:43 +02:00
nds32 arm, nds32, sh: remove useless ioremap()/iounmap() defines 2016-07-14 18:22:25 -04:00
nios2 Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUP 2016-05-27 15:41:16 -04:00
openrisc openrisc: Drop the arch-specific board init 2016-05-27 15:39:50 -04:00
powerpc Convert CONFIG_SPL_DRIVERS_MISC_SUPPORT to Kconfig 2016-09-16 17:27:08 -04:00
sandbox cmd: Split 'bootz' and 'booti' out from 'bootm' 2016-08-20 11:35:07 -04:00
sh arm, nds32, sh: remove useless ioremap()/iounmap() defines 2016-07-14 18:22:25 -04:00
sparc Fix spelling of "transferred". 2016-03-22 12:16:16 -04:00
x86 x86: efi: Fix EFI 64-bit payload build warnings 2016-08-30 09:26:05 +08:00
xtensa xtensa: add support for the 'xtfpga' evaluation board 2016-08-15 18:46:40 -04:00
.gitignore
Kconfig xtensa: add support for the xtensa processor architecture [2/2] 2016-08-15 18:46:38 -04:00