Ignore:
File:
1 edited

Legend:

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

    rb5a3b50 rae86f89  
    5656        else
    5757                return 1;
    58 #else
     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;
     62#endif
    5963        return 0;
    60 #endif
    6164}
    6265
     
    130133                "mcr p15, 0, r0, c3, c0, 0\n"
    131134               
    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"
     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
    140141#endif
     142
    141143                /* Current settings */
    142144                "mrc p15, 0, r0, c1, c0, 0\n"
    143145               
    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"
     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"
    152158#else
    153159                /* Mask to enable paging */
    154160                "ldr r1, =0x00000001\n"
    155 #endif
    156161#endif
    157162                "orr r0, r0, r1\n"
Note: See TracChangeset for help on using the changeset viewer.