From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 13 Sep 2007 09:38:49 +0200 Subject: [U-Boot-Users] MIPS cache management (and build) questions. In-Reply-To: <760873.90830.qm@web54005.mail.re2.yahoo.com> References: <760873.90830.qm@web54005.mail.re2.yahoo.com> Message-ID: <200709130938.49606.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================