FreeBSD/sys/arm/arm/pmap-v6.c
/*
 *  Clean L1 data cache range by physical address.
 *  The range must be within a single page.
 */
Clean L1 data cache range by physical address.
The range must be within a single page.
Clean L1 data cache range by physical address . The range must be within a single page .
static void
pmap_dcache_wb_pou(vm_paddr_t pa, vm_size_t size, uint32_t attr)
{
	struct sysmaps *sysmaps;
	KASSERT(((pa & PAGE_MASK) + size) <= PAGE_SIZE,
	    ("%s: not on single page", __func__));
	sched_pin();
	sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)];
	mtx_lock(&sysmaps->lock);
	if (*sysmaps->CMAP3)
		panic("%s: CMAP3 busy", __func__);
	pte2_store(sysmaps->CMAP3, PTE2_KERN_NG(pa, PTE2_AP_KRW, attr));
	dcache_wb_pou((vm_offset_t)sysmaps->CADDR3 + (pa & PAGE_MASK), size);
	pte2_clear(sysmaps->CMAP3);
	tlb_flush((vm_offset_t)sysmaps->CADDR3);
	sched_unpin();
	mtx_unlock(&sysmaps->lock);
}
static void pmap_dcache_wb_pou ( vm_paddr_t pa , vm_size_t size , uint32_t attr ) { struct sysmaps * sysmaps ; KASSERT ( ( ( pa & PAGE_MASK ) + size ) <= PAGE_SIZE , ( " " , __func__ ) ) ; sched_pin ( ) ; sysmaps = & sysmaps_pcpu [ PCPU_GET ( cpuid ) ] ; mtx_lock ( & sysmaps -> lock ) ; if ( * sysmaps -> CMAP3 ) panic ( " " , __func__ ) ; pte2_store ( sysmaps -> CMAP3 , PTE2_KERN_NG ( pa , PTE2_AP_KRW , attr ) ) ; dcache_wb_pou ( ( vm_offset_t ) sysmaps -> CADDR3 + ( pa & PAGE_MASK ) , size ) ; pte2_clear ( sysmaps -> CMAP3 ) ; tlb_flush ( ( vm_offset_t ) sysmaps -> CADDR3 ) ; sched_unpin ( ) ; mtx_unlock ( & sysmaps -> lock ) ; }
Clean L1 data cache range by physical address.
Clean L1 data cache range by physical address .