summaryrefslogtreecommitdiff
path: root/include/configs/pcm052.h
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2016-09-21 11:11:06 +0100
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2016-09-21 16:25:43 +0200
commitd263cda5ae41279208d9576eab1c5215a57252a6 (patch)
tree287efea0e6b14588278c579a20a522c6feb64a7a /include/configs/pcm052.h
parentad8783cb1cb258b71d81800f72cd64eb44081653 (diff)
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>
Diffstat (limited to 'include/configs/pcm052.h')
0 files changed, 0 insertions, 0 deletions