* Returns true if every page table entry in the specified page table is * zero. */
| 4241 | * zero. |
| 4242 | */ |
| 4243 | static bool |
| 4244 | pmap_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 |