Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/src/mm.c

    rae86f89 rb5a3b50  
    5656        else
    5757                return 1;
    58 #elif defined MACHINE_beagleboardxm
    59         const unsigned long address = section << PTE_SECTION_SHIFT;
    60         if (address >= BBXM_RAM_START && address < BBXM_RAM_END)
    61                 return 1;
     58#else
     59        return 0;
    6260#endif
    63         return 0;
    6461}
    6562
     
    133130                "mcr p15, 0, r0, c3, c0, 0\n"
    134131               
    135 #ifdef PROCESSOR_ARCH_armv7_a
    136                 /* armv7 no longer requires cache entries to be invalid
    137                  * upon reset, do this manually */
    138                 /* Invalidate ICache */
    139                 "mcr p15, 0, r0, c7, c5, 6\n"
    140                 //TODO: Invalidate data cache
     132#ifdef PROCESSOR_armv7_a
     133                /* Read Auxiliary control register */
     134                "mrc p15, 0, r0, c1, c0, 1\n"
     135                /* Mask to enable L2 cache */
     136                "ldr r1, =0x00000002\n"
     137                "orr r0, r0, r1\n"
     138                /* Store Auxiliary control register */
     139                "mrc p15, 0, r0, c1, c0, 1\n"
    141140#endif
    142 
    143141                /* Current settings */
    144142                "mrc p15, 0, r0, c1, c0, 0\n"
    145143               
    146 #if defined(PROCESSOR_cortex_a8) | defined(MACHINE_gta02)
    147                 /* Mask to enable paging, I-cache D-cache and branch predict
    148                  * See kernel/arch/arm32/include/regutils.h for bit values.
    149                  * It's safe because Cortex-A8 implements IVIPT extension
    150                  * See Cortex-A8 TRM ch. 7.2.6 p. 7-4 (PDF 245).
    151                  * It's safe for gta02 too because we turn the caches off
    152                  * before switching to kernel. */
    153                 "ldr r1, =0x00001805\n"
    154 #elif defined(PROCESSOR_ARCH_armv7_a) | defined(PROCESSOR_ARCH_armv6)
    155                 /* Enable paging, data cache and branch prediction
    156                  * see arch/arm32/src/cpu/cpu.c for reasoning */
    157                 "ldr r1, =0x00000805\n"
     144#ifdef PROCESSOR_armv7_a
     145                /* Mask to enable paging, caching */
     146                "ldr r1, =0x00000005\n"
     147#else
     148#ifdef MACHINE_gta02
     149                /* Mask to enable paging (bit 0),
     150                   D-cache (bit 2), I-cache (bit 12) */
     151                "ldr r1, =0x00001005\n"
    158152#else
    159153                /* Mask to enable paging */
    160154                "ldr r1, =0x00000001\n"
     155#endif
    161156#endif
    162157                "orr r0, r0, r1\n"
Note: See TracChangeset for help on using the changeset viewer.