FreeBSD/sys/arm64/arm64/pmap.c
/*
 * This routine tears out page mappings from the
 * kernel -- it is meant only for temporary mappings.
 */
This routine tears out page mappings from the
kernel -- it is meant only for temporary mappings.
This routine tears out page mappings from the kernel -- it is meant only for temporary mappings .
void
pmap_qremove(vm_offset_t sva, int count)
{
	pt_entry_t *pte;
	vm_offset_t va;
	int lvl;
	KASSERT(sva >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", sva));
	va = sva;
	while (count-- > 0) {
		pte = pmap_pte(kernel_pmap, va, &lvl);
		KASSERT(lvl == 3,
		    ("Invalid device pagetable level: %d != 3", lvl));
		if (pte != NULL) {
			if (pmap_l3_valid_cacheable(pmap_load(pte)))
				cpu_dcache_wb_range(va, L3_SIZE);
			pmap_load_clear(pte);
			PTE_SYNC(pte);
		}
		va += PAGE_SIZE;
	}
	pmap_invalidate_range(kernel_pmap, sva, va);
}
void pmap_qremove ( vm_offset_t sva , int count ) { pt_entry_t * pte ; vm_offset_t va ; int lvl ; KASSERT ( sva >= VM_MIN_KERNEL_ADDRESS , ( " " , sva ) ) ; va = sva ; while ( count -- > 0 ) { pte = pmap_pte ( kernel_pmap , va , & lvl ) ; KASSERT ( lvl == 3 , ( " " , lvl ) ) ; if ( pte != NULL ) { if ( pmap_l3_valid_cacheable ( pmap_load ( pte ) ) ) cpu_dcache_wb_range ( va , L3_SIZE ) ; pmap_load_clear ( pte ) ; PTE_SYNC ( pte ) ; } va += PAGE_SIZE ; } pmap_invalidate_range ( kernel_pmap , sva , va ) ; }
This routine tears out page mappings from the
 kernel -- it is meant only for temporary mappings.
This routine tears out page mappings from the kernel -- it is meant only for temporary mappings .