Changeset 93d8022 in mainline for kernel/arch/arm32/src/cpu/cpu.c


Ignore:
Timestamp:
2015-10-26T21:12:57Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5783d10
Parents:
1a2a6e7
Message:

ARM cache handling fixes

  • boot: Use the normal outer and inner WBWA attribute also for ARMv6
  • kernel: Fix comment in page_armv6.h:set_pt_level0_flags(). TEX=5, C=0, B=1 encodes outer and inner WBWA normal memory.
  • Treat all normal memory as non shareable also on ARMv6.
  • Make sure D$ is invalidated in cpu_arch_init() before it is enabled.
  • For non-cacheable ARMv6+ memory, use device memory type instead of strongly-ordered.
  • For ARMv5-, use either cached/buffered (CB=0b11) or uncached/unbuffered (CB=0b00).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/cpu/cpu.c

    r1a2a6e7 r93d8022  
    130130{
    131131        uint32_t control_reg = SCTLR_read();
    132        
     132
     133        dcache_invalidate();
     134        read_barrier();
     135
    133136        /* Turn off tex remap, RAZ/WI prior to armv7 */
    134137        control_reg &= ~SCTLR_TEX_REMAP_EN_FLAG;
     
    341344#endif
    342345
     346void dcache_invalidate(void)
     347{
     348#if defined(PROCESSOR_ARCH_armv7_a)
     349        dcache_flush_invalidate();
     350#else
     351        if (cache_is_unified())
     352                CIALL_write(0);
     353        else
     354                DCIALL_write(0);
     355#endif
     356}
     357
    343358void dcache_clean_mva_pou(uintptr_t mva)
    344359{
Note: See TracChangeset for help on using the changeset viewer.