Changeset ff381a7 in mainline for kernel/arch/arm32/src
- Timestamp:
- 2015-11-02T20:54:19Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d8513177
- Parents:
- 3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/arch/arm32/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/cpu/cpu.c
r3feeab2 rff381a7 130 130 { 131 131 uint32_t control_reg = SCTLR_read(); 132 132 133 dcache_invalidate(); 134 read_barrier(); 135 133 136 /* Turn off tex remap, RAZ/WI prior to armv7 */ 134 137 control_reg &= ~SCTLR_TEX_REMAP_EN_FLAG; … … 322 325 void icache_invalidate(void) 323 326 { 327 #if defined(PROCESSOR_ARCH_armv7_a) 324 328 ICIALLU_write(0); 329 #else 330 ICIALL_write(0); 331 #endif 332 } 333 334 #if !defined(PROCESSOR_ARCH_armv7_a) 335 static bool cache_is_unified(void) 336 { 337 if (MIDR_read() != CTR_read()) { 338 /* We have the CTR register */ 339 return (CTR_read() & CTR_SEP_FLAG) != CTR_SEP_FLAG; 340 } else { 341 panic("Unknown cache type"); 342 } 343 } 344 #endif 345 346 void 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 358 void dcache_clean_mva_pou(uintptr_t mva) 359 { 360 #if defined(PROCESSOR_ARCH_armv7_a) 361 DCCMVAU_write(mva); 362 #else 363 if (cache_is_unified()) 364 CCMVA_write(mva); 365 else 366 DCCMVA_write(mva); 367 #endif 325 368 } 326 369 -
kernel/arch/arm32/src/mm/tlb.c
r3feeab2 rff381a7 79 79 static inline void invalidate_page(uintptr_t page) 80 80 { 81 //TODO: What about TLBIMVAA? 81 #if defined(PROCESSOR_ARCH_armv6) || defined(PROCESSOR_ARCH_armv7_a) 82 if (TLBTR_read() & TLBTR_SEP_FLAG) { 83 ITLBIMVA_write(page); 84 DTLBIMVA_write(page); 85 } else { 86 TLBIMVA_write(page); 87 } 88 #elif defined(PROCESSOR_arm920t) 89 ITLBIMVA_write(page); 90 DTLBIMVA_write(page); 91 #elif defined(PROCESSOR_arm926ej_s) 82 92 TLBIMVA_write(page); 93 #else 94 #error Unknown TLB type 95 #endif 96 83 97 /* 84 98 * "A TLB maintenance operation is only guaranteed to be complete after
Note:
See TracChangeset
for help on using the changeset viewer.
