From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] ARM v7: Flush icache when executing a program with go
Date: Wed, 15 May 2013 17:11:11 +0200 [thread overview]
Message-ID: <20130515171111.481eb3de@lilith> (raw)
In-Reply-To: <1368540962.4464.9.camel@localhost>
Hi Henrik,
On Tue, 14 May 2013 16:16:02 +0200, Henrik Nordstr?m
<henrik@henriknordstrom.net> wrote:
> Tom Rini wanted me to post this again. There is no change from previous
> version.
>
> I do agree with Wolfgang Denk that this really SHOULD NOT be arch
> specific. The only reason why I made this ARMv7 specific is because
> blindly calling invalidate_icache_all() from the go command will cause
> loud complains on other arches where the icache is not
> supported/enabled. The question is what is the correct solution
>
> - Doing it arch specific like this (or other arch aproach?)
>
> - Change invalidate_icache_all() to be silent if the icache is not
> enabled/supported?
>
> - Something else?
What is the rationale behind putting it in arch/ rather than in common/
by adding this to the existing common/cmd_boot.c file under ARMv7
conditionals?
Also:
> ARM v7 runs with icache enabled. For reliable results the go command
> needs to flush the icache before jumping or it may risk running
> cached instructions that differ from what currently is in memory.
IIUC, the issue is due to cache being enabled when doing the go, rather
than due to armv7 per se.
So, should we not have this icache flush conditioned at compile time on
cache being compiled in, and at run time on cache being enabled? This
way, we would automatically cater for the same issue appearing in other
ARM CPUs, and even more, in other architectures.
Amicalement,
--
Albert.
next prev parent reply other threads:[~2013-05-15 15:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 14:16 [U-Boot] ARM v7: Flush icache when executing a program with go Henrik Nordström
2013-05-15 15:11 ` Albert ARIBAUD [this message]
2013-05-15 16:34 ` Henrik Nordström
2013-05-15 16:44 ` Albert ARIBAUD
2013-05-15 16:51 ` Tom Rini
2013-05-15 17:39 ` Albert ARIBAUD
2013-05-16 1:54 ` Henrik Nordström
2013-05-16 7:14 ` Wolfgang Denk
2013-05-16 13:37 ` Tom Rini
2013-05-16 15:37 ` Henrik Nordström
2013-05-16 22:13 ` Wolfgang Denk
2013-05-17 12:16 ` Henrik Nordström
2013-05-20 0:55 ` Kuo-Jung Su
2013-05-21 12:37 ` Wolfgang Denk
2013-05-21 12:26 ` Wolfgang Denk
2013-05-21 21:57 ` Henrik Nordström
2013-05-21 12:38 ` Kees Jongenburger
2013-05-21 16:45 ` Albert ARIBAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130515171111.481eb3de@lilith \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox