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

Function pmap_qremove

freebsd/arm64/arm64/pmap.c:1598–1619  ·  view source on GitHub ↗

* This routine tears out page mappings from the * kernel -- it is meant only for temporary mappings. */

Source from the content-addressed store, hash-verified

1596 * kernel -- it is meant only for temporary mappings.
1597 */
1598void
1599pmap_qremove(vm_offset_t sva, int count)
1600{
1601 pt_entry_t *pte;
1602 vm_offset_t va;
1603 int lvl;
1604
1605 KASSERT(sva >= VM_MIN_KERNEL_ADDRESS, ("usermode va %lx", sva));
1606
1607 va = sva;
1608 while (count-- > 0) {
1609 pte = pmap_pte(kernel_pmap, va, &lvl);
1610 KASSERT(lvl == 3,
1611 ("Invalid device pagetable level: %d != 3", lvl));
1612 if (pte != NULL) {
1613 pmap_clear(pte);
1614 }
1615
1616 va += PAGE_SIZE;
1617 }
1618 pmap_invalidate_range(kernel_pmap, sva, va);
1619}
1620
1621/***************************************************
1622 * Page table page management routines.....

Callers

nothing calls this directly

Calls 2

pmap_pteFunction · 0.70
pmap_invalidate_rangeFunction · 0.70

Tested by

no test coverage detected