71e26e2c0e
promotion within the kernel's address space. Specifically, pmap_promote_pde() is only called when the page table page (PTP) that is referenced by the given PDE has a full "use count", i.e., its wire_count is 512. Although this guarantees for a user address space that all 512 PTEs in the PTP hold valid mappings, the same is not true of the kernel's address space. A kernel PTP always has a use count of 512 regardless of the state of the PTEs. Therefore, pmap_promote_pde() should not assume (or assert) that the first PTE in the PTP is valid.