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

Function pmap_every_pte_zero

freebsd/arm64/arm64/pmap.c:4243–4255  ·  view source on GitHub ↗

* Returns true if every page table entry in the specified page table is * zero. */

Source from the content-addressed store, hash-verified

4241 * zero.
4242 */
4243static bool
4244pmap_every_pte_zero(vm_paddr_t pa)
4245{
4246 pt_entry_t *pt_end, *pte;
4247
4248 KASSERT((pa & PAGE_MASK) == 0, ("pa is misaligned"));
4249 pte = (pt_entry_t *)PHYS_TO_DMAP(pa);
4250 for (pt_end = pte + Ln_ENTRIES; pte < pt_end; pte++) {
4251 if (*pte != 0)
4252 return (false);
4253 }
4254 return (true);
4255}
4256
4257/*
4258 * Tries to create the specified 2MB page mapping. Returns KERN_SUCCESS if

Callers 1

pmap_enter_l2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected