aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2008-03-23 23:04:09 +0000
committerAlan Cox <alc@FreeBSD.org>2008-03-23 23:04:09 +0000
commit58680920e9399c367933fe1881a9b169d72c4d3d (patch)
tree16516855e15c86cfbba47621819fb03a77245ded /sys/amd64
parent22c0c6e9d3a61f8d2465811b65b4727ba4ac2b8c (diff)
Notes
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index a7c73a5a1fc8..025a1413be05 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -4370,10 +4370,10 @@ pmap_mincore(pmap_t pmap, vm_offset_t addr)
pdep = pmap_pde(pmap, addr);
if (pdep != NULL && (*pdep & PG_V)) {
if (*pdep & PG_PS) {
- KASSERT((*pdep & PG_FRAME & PDRMASK) == 0,
- ("pmap_mincore: bad pde"));
pte = *pdep;
- pa = (*pdep & PG_FRAME) | (addr & PDRMASK);
+ /* Compute the physical address of the 4KB page. */
+ pa = ((*pdep & PG_PS_FRAME) | (addr & PDRMASK)) &
+ PG_FRAME;
} else {
pte = *pmap_pde_to_pte(pdep, addr);
pa = pte & PG_FRAME;