summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mips64/mips64/pmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c
index fce96132e20..c6b4bcce8d6 100644
--- a/sys/arch/mips64/mips64/pmap.c
+++ b/sys/arch/mips64/mips64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.66 2012/10/03 22:46:07 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.67 2014/01/08 17:12:18 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -1172,7 +1172,10 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
rv = FALSE;
else {
pte += uvtopte(va);
- pa = pfn_to_pad(*pte) | (va & PAGE_MASK);
+ if (*pte & PG_V)
+ pa = pfn_to_pad(*pte) | (va & PAGE_MASK);
+ else
+ rv = FALSE;
}
}
if (rv != FALSE)