Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2013-07-29 Thread Michael Spang
On Mon, Jul 29, 2013 at 10:09 AM, Albert ARIBAUD wrote: > Hi Michael, > > On Mon, 29 Jul 2013 08:57:53 -0400, Michael Spang > wrote: > >> Albert, >> >> That's not a correct characterization of the bug. >> >> The incoherent cache lines are from before the relocation stage. If >> U-Boot is relocati

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2013-07-29 Thread Michael Spang
Albert, That's not a correct characterization of the bug. The incoherent cache lines are from before the relocation stage. If U-Boot is relocating from RAM, and later copies the OS there without invalidating those lines, then that's a bug in U-Boot. Michael On Mon, Jul 29, 2013 at 3:19 AM, Albe

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2013-07-29 Thread Albert ARIBAUD
Hi Michael, On Mon, 29 Jul 2013 08:57:53 -0400, Michael Spang wrote: > Albert, > > That's not a correct characterization of the bug. > > The incoherent cache lines are from before the relocation stage. If > U-Boot is relocating from RAM, and later copies the OS there without > invalidating tho

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2013-07-29 Thread Albert ARIBAUD
(although this patch is more than two *years* old, it never got properly answered to. I am doing so here to make sure future readers know why it was not applied and won't be.) Hi Michael, On Thu, 17 Mar 2011 15:46:55 -0400, Michael Spang wrote: > If U-Boot is loaded from RAM and the OS is loade

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-21 Thread arden jay
Hi Michael, Thanks, it is the key point: "The problem is that it hits, but returns the wrong instructions." Hi Aneesh, Thanks for your sharing, it makes sense to check that way. 2011/3/21 Aneesh V : > Hi Arden, > > On Sunday 20 March 2011 08:00 AM, arden jay wrote: >> >> Hi Michael, >> Curiously,

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-20 Thread Aneesh V
Hi Arden, On Sunday 20 March 2011 08:00 AM, arden jay wrote: > Hi Michael, > Curiously, have any idea how to test cache stuff? Recently I did some cache testing. Here is the technique I used for data-cache: To test flush: * Write a known pattern to a region of memory * Flush the region * Invalid

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-20 Thread Michael Spang
On 3/20/11, arden jay wrote: > Hi Michael, > > I still have question. :) > > When ARM fetch instruction, it firstly try cache. > It then should have cache miss, and forces to reload the instruction > from memory? > > Why it will have problem while U-boot & Kernel at the same memory location? If t

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-20 Thread arden jay
Hi Albert, I got it, thanks your explaination. 2011/3/20 Albert ARIBAUD : > Le 03/20/11 06:36, arden jay a écrit : >> >> Hi Michael, >> >> I still have question. :) >> >> When ARM fetch instruction, it firstly try cache. >> It then should have cache miss, and forces to reload the instruction >> f

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-20 Thread Albert ARIBAUD
Le 03/20/11 06:36, arden jay a écrit : > Hi Michael, > > I still have question. :) > > When ARM fetch instruction, it firstly try cache. > It then should have cache miss, and forces to reload the instruction > from memory? > Why it will have problem while U-boot& Kernel at the same memory location

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-19 Thread arden jay
Hi Michael, I still have question. :) When ARM fetch instruction, it firstly try cache. It then should have cache miss, and forces to reload the instruction from memory? Why it will have problem while U-boot & Kernel at the same memory location? 2011/3/20 Michael Spang : > On 3/19/11, arden jay

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-19 Thread Michael Spang
On 3/19/11, arden jay wrote: > Hi Michael, > Curiously, have any idea how to test cache stuff? I don't have any good suggestions for testing cache stuff in general, but this one is pretty easy to test if you have the board in question. Because U-Boot is loaded *as if it were linux* by the manufac

Re: [U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-19 Thread arden jay
Hi Michael, Curiously, have any idea how to test cache stuff? 2011/3/18 Michael Spang : > If U-Boot is loaded from RAM and the OS is loaded into an overlapping > region, the instruction cache is not coherent when that OS is started. > We must therefore invalidate the instruction cache in addition

[U-Boot] [PATCH 1/9] arm926ej-s: Invalidate instruction cache in flush_cache

2011-03-17 Thread Michael Spang
If U-Boot is loaded from RAM and the OS is loaded into an overlapping region, the instruction cache is not coherent when that OS is started. We must therefore invalidate the instruction cache in addition to cleaning the data cache. Signed-off-by: Michael Spang --- arch/arm/lib/cache.c |2 ++