Ignore:
File:
1 edited

Legend:

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

    r46a6a5d r65871bb  
    9898void cpu_arch_init(void)
    9999{
     100#if defined(PROCESSOR_armv7_a) | defined(PROCESSOR_armv6)
    100101        uint32_t control_reg = 0;
    101102        asm volatile (
     
    104105        );
    105106       
    106         /* Turn off tex remap, RAZ/WI prior to armv7 */
     107        /* Turn off tex remap, RAZ ignores writes prior to armv7 */
    107108        control_reg &= ~CP15_R1_TEX_REMAP_EN;
    108         /* Turn off accessed flag, RAZ/WI prior to armv7 */
     109        /* Turn off accessed flag, RAZ ignores writes prior to armv7 */
    109110        control_reg &= ~(CP15_R1_ACCESS_FLAG_EN | CP15_R1_HW_ACCESS_FLAG_EN);
    110         /* Enable branch prediction RAZ/WI if not supported */
    111         control_reg |= CP15_R1_BRANCH_PREDICT_EN;
    112 
    113         /* Unaligned access is supported on armv6+ */
    114 #if defined(PROCESSOR_ARCH_armv7_a) | defined(PROCESSOR_ARCH_armv6)
    115         /* Enable unaligned access, RAZ/WI prior to armv6
    116          * switchable on armv6, RAO/WI writes on armv7,
     111        /* Enable unaligned access, RAZ ignores writes prior to armv6
     112         * switchable on armv6, RAO ignores writes on armv7,
    117113         * see ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition
    118114         * L.3.1 (p. 2456) */
     
    128124         *    ARM Architecture Reference Manual ARMv7-A and ARMv7-R Edition
    129125         *    B3.11.1 (p. 1383)
    130          * We are safe to turn this on. For arm v6 see ch L.6.2 (p. 2469)
    131          * L2 Cache for armv7 was enabled in boot code.
     126         * ICache coherency is elaborate on in barrier.h.
     127         * We are safe to turn these on.
    132128         */
    133         control_reg |= CP15_R1_CACHE_EN;
    134 #endif
    135 #ifdef PROCESSOR_cortex_a8
    136          /* ICache coherency is elaborate on in barrier.h.
    137           * Cortex-A8 implements IVIPT extension.
    138           * Cortex-A8 TRM ch. 7.2.6 p. 7-4 (PDF 245) */
    139         control_reg |= CP15_R1_INST_CACHE_EN;
    140 #endif
     129        control_reg |= CP15_R1_CACHE_EN | CP15_R1_INST_CACHE_EN;
    141130       
    142131        asm volatile (
     
    144133                :: [control_reg] "r" (control_reg)
    145134        );
     135#endif
    146136#ifdef CONFIG_FPU
    147137        fpu_setup();
Note: See TracChangeset for help on using the changeset viewer.