From: Wolfgang Denk Date: Fri, 17 May 2013 00:13:50 +0200 Subject: [U-Boot] ARM v7: Flush icache when executing a program with go In-Reply-To: <1368718669.25965.14.camel@localhost> References: <1368540962.4464.9.camel@localhost> <20130515171111.481eb3de@lilith> <1368635647.3991.18.camel@localhost> <20130515184410.26e34874@lilith> <20130515165121.GG29196@bill-the-cat> <20130515193959.69aa9d64@lilith> <1368669278.27007.43.camel@localhost> <20130516071406.6AD19380635@gemini.denx.de> <20130516133754.GF32163@bill-the-cat> <1368718669.25965.14.camel@localhost> Message-ID: <20130516221350.49FAA3811D7@gemini.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 Dear Henrik, In message <1368718669.25965.14.camel@localhost> you wrote: > > I do not like having these things arch specific. I implemented it as an > ARMv7 hook only because there is no general cross-platform u-boot > function for clearing the icache. I'd much rather have a generic > function call for invalidating the cache and leave it up to the arches > to get it implemented where needed. There is a common, architecture-independent C API that implements cache flushing/invalidation; please re-read the summary at [1] [1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/158101/focus=158559 > Or maybe just punt it. If you are on an arch with incoherent caches then > make sure to make use of the cache command to flush caches and maybe > even disable caches before using go. The cache commands currently do not support subcommands for flushing / invalidating the caches. See again [1]. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Roses are red Violets are blue Some poems rhyme