Have pmap_pte() on a 2MB mapped address return the 2MB pde itself

rather than a non-existing pte.  There is code elsewhere in i386/amd64
pmap that neglects to handle the large page cases because it knows that
it will see PG_PS in the returned "pte".
This commit is contained in:
Peter Wemm 2003-07-09 22:53:45 +00:00
parent 6fbddb9816
commit 436e1f203f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117367

View file

@ -330,6 +330,8 @@ pmap_pte(pmap_t pmap, vm_offset_t va)
pde = pmap_pde(pmap, va);
if (pde == NULL || (*pde & PG_V) == 0)
return NULL;
if ((*pde & PG_PS) != 0) /* compat with i386 pmap_pte() */
return ((pt_entry_t *)pde);
pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME);
return (&pte[pmap_pte_index(va)]);
}