do_bootm() and flush_cache()
I'm looking for some guidance:
On some processors (e.g. Nios-II), the instruction and data caches can't be disabled. The code for loadb, loads, etc. call flush_cache() ... so life is good.
But after reviewing do_bootm(), I don't see where the caches are flushed. A call to flush_cache() after moving/decompressing the image seems appropriate, but I'm not sure if this would break other architectures ...
... do I need to wrap an ifdef around a call to flush_cache() ?
Regards,
--Scott
Quoted 4 lines · In message <[email protected]> you wrote:
But after reviewing
do_bootm(), I don't see where the caches are flushed. A call toflush_cache()after moving/decompressing the image seems appropriate, but
Why?
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Open the pod bay doors, HAL." - Dave Bowman, 2001
Quoted 6 lines
Quoted 3 lines
But after reviewing
do_bootm(), I don't see where the caches are flushed. A call toflush_cache()after moving/decompressing the image seems appropriate, butWhy?
After the move/decompression, the data cache must be flushed to main memory ... otherwise an instruction cache miss (after jumping into the kernel) may read in a (potentially) stale line. (Neither cache can be disabled.)
Regards,
--Scott