diff options
author | peter <peter@FreeBSD.org> | 2003-07-09 22:53:45 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-07-09 22:53:45 +0000 |
commit | 26770348b8cb6bcc2c3e86a8073caab45ed74d58 (patch) | |
tree | 672784aedccf3072f72af1bbbb506241bcfa70ba /sys/amd64 | |
parent | 93d7f2a88079601803f360f55a7755528cbc07c4 (diff) | |
download | FreeBSD-src-26770348b8cb6bcc2c3e86a8073caab45ed74d58.zip FreeBSD-src-26770348b8cb6bcc2c3e86a8073caab45ed74d58.tar.gz |
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".
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 691993d..cfd30e2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -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)]); } |