[U-Boot-Users] MIPS cache management (and build) questions.

Stefan Roese sr at denx.de
Thu Sep 13 09:38:49 CEST 2007


Hi Paul,

On Thursday 13 September 2007, Paul Marciano wrote:
> 2. I'm using do_bootelf() to invoke my image.  The
> lines:
>     addr = load_elf_image(addr);
>     ...
>     if (dcache_status())
>         dcache_disable();
>     ...
>     (function call through addr)
>
> The comment embedded in the code says the dcache is
> flushed already, but in cpu/mips/cpu.c, the function
> flush_cache() is empty so the dcache isn't flushed.
>
> As it's not flushed, and dcache_disable() just turns
> it off, if the run address is somewhere that hasn't
> naturally spilled out of the dcache during the load,
> the CPU will fetch garbage.

On PPC platforms, dcache_disable() first flushed the dcache and then disables 
it. If this flushing is missing in your MIPS implementation you should 
probably add this.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================




More information about the U-Boot mailing list