Changeset 429 for EcnlProtoTool/trunk/ntshell/src/syscall.c
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/ntshell/src/syscall.c
r331 r429 61 61 // https://os.mbed.com/users/dkato/code/FlashAccess/#652a093cf264 62 62 void flash_access_cache_control(void) { 63 unsigned int assoc; 64 65 /* ==== Cleaning and invalidation of the L1 data cache ==== */ 66 __v7_all_cache(2); 67 __DSB(); 68 69 /* ==== Cleaning and invalidation of the L2 cache ==== */ 70 if (PL310->AUX_CNT & (1<<16)) { 71 assoc = 16; 72 } else { 73 assoc = 8; 74 } 75 PL310->INV_WAY = (1 << assoc) - 1; 76 while(PL310->INV_WAY & ((1 << assoc) - 1)); // poll invalidate 77 PL310->CACHE_SYNC = 0x0; 78 79 /* ==== Invalidate all TLB entries ==== */ 80 __ca9u_inv_tlb_all(); 81 82 /* ==== Invalidate the L1 instruction cache ==== */ 83 __v7_inv_icache_all(); 84 __DSB(); 85 __ISB(); 63 unsigned int assoc; 64 65 /* ==== Cleaning and invalidation of the L1 data cache ==== */ 66 L1C_CleanInvalidateDCacheAll(); 67 __DSB(); 68 69 /* ==== Cleaning and invalidation of the L2 cache ==== */ 70 if (L2C_310->AUX_CNT & (1 << 16)) { 71 assoc = 16; 72 } 73 else { 74 assoc = 8; 75 } 76 L2C_310->INV_WAY = (1 << assoc) - 1; 77 while (L2C_310->INV_WAY & ((1 << assoc) - 1)); // poll invalidate 78 L2C_310->CACHE_SYNC = 0x0; 79 80 /* ==== Invalidate all TLB entries ==== */ 81 MMU_InvalidateTLB(); 82 83 /* ==== Invalidate the L1 instruction cache ==== */ 84 L1C_InvalidateICacheAll(); 85 __DSB(); 86 __ISB(); 86 87 } 87 88
Note:
See TracChangeset
for help on using the changeset viewer.