Changes in boot/arch/arm32/src/mm.c [ae86f89:b5a3b50] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/src/mm.c
rae86f89 rb5a3b50 56 56 else 57 57 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; 62 60 #endif 63 return 0;64 61 } 65 62 … … 133 130 "mcr p15, 0, r0, c3, c0, 0\n" 134 131 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" 141 140 #endif 142 143 141 /* Current settings */ 144 142 "mrc p15, 0, r0, c1, c0, 0\n" 145 143 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" 158 152 #else 159 153 /* Mask to enable paging */ 160 154 "ldr r1, =0x00000001\n" 155 #endif 161 156 #endif 162 157 "orr r0, r0, r1\n"
Note:
See TracChangeset
for help on using the changeset viewer.