MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cache_icache_sync_fresh

Function cache_icache_sync_fresh

freebsd/arm/arm/pmap-v6.c:6340–6360  ·  view source on GitHub ↗

* Sync instruction cache range which is not mapped yet. */

Source from the content-addressed store, hash-verified

6338 * Sync instruction cache range which is not mapped yet.
6339 */
6340void
6341cache_icache_sync_fresh(vm_offset_t va, vm_paddr_t pa, vm_size_t size)
6342{
6343 uint32_t len, offset;
6344 vm_page_t m;
6345
6346 /* Write back d-cache on given address range. */
6347 offset = pa & PAGE_MASK;
6348 for ( ; size != 0; size -= len, pa += len, offset = 0) {
6349 len = min(PAGE_SIZE - offset, size);
6350 m = PHYS_TO_VM_PAGE(pa);
6351 KASSERT(m != NULL, ("%s: vm_page_t is null for %#x",
6352 __func__, pa));
6353 pmap_dcache_wb_pou(pa, len, vm_page_pte2_attr(m));
6354 }
6355 /*
6356 * I-cache is VIPT. Only way how to flush all virtual mappings
6357 * on given physical address is to invalidate all i-cache.
6358 */
6359 icache_inv_all();
6360}
6361
6362void
6363pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t size)

Callers 3

pmap_enterFunction · 0.85
pmap_enter_quick_lockedFunction · 0.85
pmap_enter_pte1Function · 0.85

Calls 5

minFunction · 0.85
PHYS_TO_VM_PAGEFunction · 0.85
pmap_dcache_wb_pouFunction · 0.85
vm_page_pte2_attrFunction · 0.85
icache_inv_allFunction · 0.85

Tested by

no test coverage detected