[U-Boot] ARM v7: Flush icache when executing a program with go

Henrik Nordström henrik at henriknordstrom.net
Tue May 21 23:57:21 CEST 2013


tis 2013-05-21 klockan 14:26 +0200 skrev Wolfgang Denk:

> > but imho the user shouldn't really need to care for these and is why I
> > hooked into the go command.
> 
> In this case you should use the common C API.

Unfortunately the go command do now know what range(s) it needs to
flush.

> No.  bootm  knows exactly the location and size of the image, so it is
> sufficient to flush / invalidate a part of the memory, usually a
> pretty small one compared to the total RAM size.

See arch/arm/cpu/armv7/cpu.c cleaup_before_linux() for what I am talking
about regarding bootm.

> > And I do not think there needs to be commands for flushing specific
> > regions other than for testing. Region based flushing is better done by
> > code which knows what is needed. It's hard for users to get this right
> > as most times it works anyway.
> 
> The code should know which ranges need flushing, not the user.

Agreed. But I don't see how this can be done for go.

Should we instrument all the load commands to remember which ranges
something have been loaded into since last flush?

Regards
Henrik



More information about the U-Boot mailing list