FreeBSD/sys/arm/arm/pmap-v6.c
/*
 *  Sync instruction cache range which is not mapped yet.
 */
Sync instruction cache range which is not mapped yet.
Sync instruction cache range which is not mapped yet .
void
cache_icache_sync_fresh(vm_offset_t va, vm_paddr_t pa, vm_size_t size)
{
	uint32_t len, offset;
	vm_page_t m;
	offset = pa & PAGE_MASK;
	for ( ; size != 0; size -= len, pa += len, offset = 0) {
		len = min(PAGE_SIZE - offset, size);
		m = PHYS_TO_VM_PAGE(pa);
		KASSERT(m != NULL, ("%s: vm_page_t is null for %#x",
		  __func__, pa));
		pmap_dcache_wb_pou(pa, len, vm_page_pte2_attr(m));
	}
	icache_inv_all();
}
void cache_icache_sync_fresh ( vm_offset_t va , vm_paddr_t pa , vm_size_t size ) { uint32_t len , offset ; vm_page_t m ; offset = pa & PAGE_MASK ; for ( ; size != 0 ; size -= len , pa += len , offset = 0 ) { len = min ( PAGE_SIZE - offset , size ) ; m = PHYS_TO_VM_PAGE ( pa ) ; KASSERT ( m != NULL , ( " " , __func__ , pa ) ) ; pmap_dcache_wb_pou ( pa , len , vm_page_pte2_attr ( m ) ) ; } icache_inv_all ( ) ; }
Sync instruction cache range which is not mapped yet.
Sync instruction cache range which is not mapped yet .
/* Write back d-cache on given address range. */ /*
	 * I-cache is VIPT. Only way how to flush all virtual mappings
	 * on given physical address is to invalidate all i-cache.
	 */