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

Function pmap_sync_icache

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

Source from the content-addressed store, hash-verified

6360}
6361
6362void
6363pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t size)
6364{
6365
6366 /* Write back d-cache on given address range. */
6367 if (va >= VM_MIN_KERNEL_ADDRESS) {
6368 dcache_wb_pou(va, size);
6369 } else {
6370 uint32_t len, offset;
6371 vm_paddr_t pa;
6372 vm_page_t m;
6373
6374 offset = va & PAGE_MASK;
6375 for ( ; size != 0; size -= len, va += len, offset = 0) {
6376 pa = pmap_extract(pmap, va); /* offset is preserved */
6377 len = min(PAGE_SIZE - offset, size);
6378 m = PHYS_TO_VM_PAGE(pa);
6379 KASSERT(m != NULL, ("%s: vm_page_t is null for %#x",
6380 __func__, pa));
6381 pmap_dcache_wb_pou(pa, len, vm_page_pte2_attr(m));
6382 }
6383 }
6384 /*
6385 * I-cache is VIPT. Only way how to flush all virtual mappings
6386 * on given physical address is to invalidate all i-cache.
6387 */
6388 icache_inv_all();
6389}
6390
6391/*
6392 * The implementation of pmap_fault() uses IN_RANGE2() macro which

Callers

nothing calls this directly

Calls 7

dcache_wb_pouFunction · 0.85
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
pmap_extractFunction · 0.70

Tested by

no test coverage detected