[U-Boot] Why no cache flushing in do_go_exec()

Mike Frysinger vapier at gentoo.org
Fri Aug 10 17:57:06 CEST 2012


On Thursday 09 August 2012 22:38:09 Charles Manning wrote:
> I'm helping to work through an issue where some code is loaded into RAM

this is generally where cache is supposed to be flushed.  you didn't describe 
how exactly the code is being loaded into RAM though.

> and "go xxx" is issued to then launch the code.
> 
> Sometimes this works and sometimes it does not, which makes me suspect that
> there might be a cache flushing issue.
> 
> I looked at do_exec_go() and it does not flush caches before jumping to the
> entry point.
> 
> Is there a good reason for this or is it an oversight?

the caches should generally be in sync before you get a chance to execute 
`go`, so the current behavior is "as designed".

> Would it help to add a call to cleanup_before_linux() to do_go_exec() to
> make sure the right thing is happening?

you cannot assume "go" is being used to execute Linux, so that would obviously 
be wrong.  the assumption on the list is that "go" is really only used for u-
boot standalone applications.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120810/533c3fe1/attachment.pgp>


More information about the U-Boot mailing list