u-boot-brain/arch
SRICHARAN R d702b0811d ARM: cache: Move the cp15 CR register read before flushing the cache.
The following is the cleanup sequence in arch/arm/cpu/armv7/cpu.c

int cleanup_before_linux(void)
{
 ...
 ...
 dcache_disable();
 v7_outer_cache_disable();
 invalidate_dcache_all();
}

 1) invalidate_dcache_all call expects that all the caches has been
 flushed, invalidated and there are no dirty entries prior to its
 execution.  In the above sequence dcache_disable() flushes, invalidates
 the caches and turns off the  mmu. But after it cleanups the cache
 and before the mmu is disabled  there is a cp_delay() function which
 has STR instruction. On certain cores like the cortex-a15, cache hit
 and a write can happen to a cache line even when the dcache is
 disabled. So the above mentioned STR instruction creates a dirty entry
 after cleaning. The mmu gets disabled after this.

 2) invalidate_dcache_all invalidates the cache lines. Again on
 cores like cortex-a15, invalidate instruction flushes the dirty
 line as well. So some times the dirty line from sequence 1
 can corrupt the memory resulting in a crash.

 Fixing this by moving the get_cr() and cp_delay() calls before
 cleaning up the cache, thus avoiding the dirty entry.

Signed-off-by: R Sricharan <r.sricharan@ti.com>
2012-07-07 14:07:44 +02:00
..
arm ARM: cache: Move the cp15 CR register read before flushing the cache. 2012-07-07 14:07:44 +02:00
avr32 avr32:board.c: fix compile warning 2012-06-04 09:21:34 +02:00
blackfin CONFIG_SYS_BAUDRATE_TABLE: Add <config_fallbacks.h>, place there 2012-06-20 20:26:16 +02:00
m68k net: move bootfile init into eth_initialize 2012-05-15 17:32:33 -05:00
microblaze net: move bootfile init into eth_initialize 2012-05-15 17:32:33 -05:00
mips MIPS: board.c: move extern declarations to u-boot-mips.h 2012-06-03 23:46:04 +02:00
nds32 net: move bootfile init into eth_initialize 2012-05-15 17:32:33 -05:00
nios2 net: punt bd->bi_ip_addr 2012-05-15 17:32:05 -05:00
openrisc net: punt bd->bi_ip_addr 2012-05-15 17:32:05 -05:00
powerpc MPC8xxx: Define cache ops for USB 2012-06-07 23:29:19 +02:00
sandbox net: punt bd->bi_ip_addr 2012-05-15 17:32:05 -05:00
sh sh: Add SH7269 device and RSK2+SH7269 board 2012-05-28 09:12:54 +09:00
sparc net: move bootfile init into eth_initialize 2012-05-15 17:32:33 -05:00
x86 net: move bootfile init into eth_initialize 2012-05-15 17:32:33 -05:00
.gitignore update include/asm/ gitignore after move 2010-05-07 00:17:30 +02:00