u-boot-brain/arch/arm/lib
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
..
_ashldi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
_ashrdi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
_divsi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
_lshrdi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
_modsi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
_udivsi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
_umodsi3.S Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
board.c ARM: introduce arch_early_init_r() 2012-07-07 14:07:44 +02:00
bootm.c arm: restore fdt_fixup_ethernet call to do_bootm_linux 2012-04-23 22:11:18 +02:00
cache-cp15.c ARM: cache: Move the cp15 CR register read before flushing the cache. 2012-07-07 14:07:44 +02:00
cache-pl310.c armv7: cache: remove flush on un-aligned invalidate 2011-09-04 11:36:16 +02:00
cache.c arm: do not force d-cache enable on all boards 2011-09-04 11:36:16 +02:00
div0.c Move lib_$ARCH directories to arch/$ARCH/lib 2010-04-13 09:13:03 +02:00
eabi_compat.c arm: Don't use printf() in SPL builds 2012-07-07 14:07:43 +02:00
interrupts.c Drop support for CONFIG_SYS_ARM_WITHOUT_RELOC 2010-10-29 21:39:59 +02:00
Makefile Add cache functions to SPL for armv7 2012-03-27 22:05:29 +02:00
memcpy.S arm: lib: memcpy: Do not copy to same address 2011-09-03 22:40:45 +02:00
memset.S arm: Use optimized memcpy and memset from linux 2011-04-27 19:38:07 +02:00
reset.c Make sure that argv[] argument pointers are not modified. 2010-07-04 23:55:42 +02:00