Skip to contentSkip to conversation

Why no cache flushing in do_go_exec()

U-Boot Charles Manning 2 participants 2 messages Aug 10, 2012

lore
Share & tools
lore
#0 lore raw

Hi All

I'm helping to work through an issue where some code is loaded into RAM 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?

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

Thanks

Charles

#1 lore raw
Quoted 1 line · 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.

Quoted 9 lines

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".

Quoted 2 lines

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>