Re: [U-Boot] [U-Boot,v2] cmd_boot: cleanup for 'go' command

2013-05-21 Thread Scott Wood

On 05/10/2013 07:06:47 AM, Tom Rini wrote:

On Sun, Apr 28, 2013 at 04:53:08PM -, Kuo-Jung Su wrote:

 From: Kuo-Jung Su dant...@faraday-tech.com

 With MMU/D-Cache enabled, data might be retained at d-cache
 rather than at DRAM when we execute 'go' command, and some
 of the bare-metal softwares would always invalidate the entire
 data cache at start-up, and then leads to a data lost issue.
 Furthermore, the U-Boot not only relocates itself but also
 updates symbol table at start-up, which means the i-cache
 might also be dirty, so it would be better to invalidates the
 i-cache alone with d-cache flush.

 This patch is designed to fix the issues above.
 It has been verified at ARM based systems, and should also work
 at other platforms.

This patch has a few not trivially solvable problems.  First, the only
weak version of invalidate_icache_all is in common/cmd_cache.c.  The
only defined version of the function is for ARMv7 CPUs.  So, everyone
that is not ARMv7 and does not have CONFIG_CMD_CACHE will not build  
now.


And I'm not seeing a globally defined CONFIG to say Yes, we are  
ARMv7

or Yes, we have icache to invalidate.

This actually seems related to the cache flush issue that Freescale
folks brought up a few weeks ago.  Or maybe that's my pre-coffee brain
talking.


Yes, it's the same issue that we were talking about.  mpc85xx does have  
flush_dcache() and invalidate_icache() which could be used for this,  
though they're currently missing the _all suffix.


-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2] cmd_boot: cleanup for 'go' command

2013-05-10 Thread Tom Rini
On Sun, Apr 28, 2013 at 04:53:08PM -, Kuo-Jung Su wrote:

 From: Kuo-Jung Su dant...@faraday-tech.com
 
 With MMU/D-Cache enabled, data might be retained at d-cache
 rather than at DRAM when we execute 'go' command, and some
 of the bare-metal softwares would always invalidate the entire
 data cache at start-up, and then leads to a data lost issue.
 Furthermore, the U-Boot not only relocates itself but also
 updates symbol table at start-up, which means the i-cache
 might also be dirty, so it would be better to invalidates the
 i-cache alone with d-cache flush.
 
 This patch is designed to fix the issues above.
 It has been verified at ARM based systems, and should also work
 at other platforms.

This patch has a few not trivially solvable problems.  First, the only
weak version of invalidate_icache_all is in common/cmd_cache.c.  The
only defined version of the function is for ARMv7 CPUs.  So, everyone
that is not ARMv7 and does not have CONFIG_CMD_CACHE will not build now.

And I'm not seeing a globally defined CONFIG to say Yes, we are ARMv7
or Yes, we have icache to invalidate.

This actually seems related to the cache flush issue that Freescale
folks brought up a few weeks ago.  Or maybe that's my pre-coffee brain
talking.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot