From: kettenis Date: Fri, 24 Apr 2015 19:41:58 +0000 (+0000) Subject: Make sure we keep the whole recursive mapping of the PDP instead of just the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bcd62fcc1b032293f0004d06a059fbc56db15ea8;p=openbsd Make sure we keep the whole recursive mapping of the PDP instead of just the mapping for the first page when tearing things down. Seems to fix the last bug mlarkin@ has been chasing for a while. ok mlarkin@ --- diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c index af1331225dc..44fab2f05ee 100644 --- a/sys/arch/i386/i386/pmapae.c +++ b/sys/arch/i386/i386/pmapae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmapae.c,v 1.34 2015/04/24 12:52:38 kettenis Exp $ */ +/* $OpenBSD: pmapae.c,v 1.35 2015/04/24 19:41:58 kettenis Exp $ */ /* * Copyright (c) 2006-2008 Michael Shalayeff @@ -1081,7 +1081,7 @@ pmap_do_remove_pae(struct pmap *pmap, vaddr_t sva, vaddr_t eva, int flags) * be VM_MAX_ADDRESS. */ - if (pdei(va) == PDSLOT_PTE) + if (pdei(va) >= PDSLOT_PTE && pdei(va) <= (PDSLOT_PTE + 3)) /* XXXCDC: ugly hack to avoid freeing PDP here */ continue; @@ -1344,7 +1344,7 @@ pmap_write_protect_pae(struct pmap *pmap, vaddr_t sva, vaddr_t eva, */ /* XXXCDC: ugly hack to avoid freeing PDP here */ - if (pdei(va) == PDSLOT_PTE) + if (pdei(va) >= PDSLOT_PTE && pdei(va) <= (PDSLOT_PTE + 3)) continue; /* empty block? */