public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/8] arm926ej-s: Invalidate instruction cache in flush_cache
@ 2011-01-29  1:00 Michael Spang
  2011-01-29  1:00 ` [U-Boot] [PATCH 2/8] orion5x: Fix wrong address in orion5x_sdram_bar Michael Spang
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Michael Spang @ 2011-01-29  1:00 UTC (permalink / raw)
  To: u-boot

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 <mspang@csclub.uwaterloo.ca>
---
 arch/arm/lib/cache.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 30686fe..047786a 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -37,6 +37,8 @@ void  flush_cache (unsigned long dummy1, unsigned long dummy2)
 	asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : : "memory");
 	/* disable write buffer as well (page 2-22) */
 	asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
+	/* invalidate icache for coherence with cleaned dcache */
+	asm("mcr p15, 0, %0, c7, c5, 0" : : "r" (0));
 #endif
 #ifdef CONFIG_OMAP34XX
 	void v7_flush_cache_all(void);
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-03-18  6:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-29  1:00 [U-Boot] [PATCH 1/8] arm926ej-s: Invalidate instruction cache in flush_cache Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 2/8] orion5x: Fix wrong address in orion5x_sdram_bar Michael Spang
2011-01-29  7:24   ` Albert ARIBAUD
2011-03-17 19:47     ` Michael Spang
2011-03-18  5:57     ` Rogan Dawes
2011-03-18  6:46       ` Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 3/8] orion5x: Increase maximum bank size to 128M Michael Spang
2011-01-29  7:26   ` Albert ARIBAUD
2011-01-29  1:00 ` [U-Boot] [PATCH 4/8] orion5x: Allow SDRAM initialization to be omitted Michael Spang
2011-01-29  7:36   ` Albert ARIBAUD
2011-03-17 19:52     ` Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 5/8] mvgbe: Support preserving the existing MAC address Michael Spang
2011-01-29  1:00 ` [U-Boot] [PATCH 6/8] Add board support for TS-7800 Michael Spang
2011-01-29  7:39   ` Albert ARIBAUD
2011-03-17 19:50     ` Michael Spang
2011-01-30 19:14   ` Wolfgang Denk
2011-01-29  1:00 ` [U-Boot] [PATCH 7/8] Add NAND " Michael Spang
2011-01-30 19:15   ` Wolfgang Denk
2011-01-29  1:00 ` [U-Boot] [PATCH 8/8] Add README " Michael Spang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox