In pmap_enter(), seed referenced and modified bits from access type passed in.

This commit is contained in:
bjh21 2000-12-23 23:06:51 +00:00
parent cd483dd854
commit f1fc4edf08

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.7 2000/09/23 12:54:47 bjh21 Exp $ */
/* $NetBSD: pmap.c,v 1.8 2000/12/23 23:06:51 bjh21 Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 Ben Harris
* All rights reserved.
@ -85,7 +85,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.7 2000/09/23 12:54:47 bjh21 Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.8 2000/12/23 23:06:51 bjh21 Exp $");
#include <sys/kernel.h> /* for cold */
#include <sys/malloc.h>
@ -591,6 +591,10 @@ pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
pv->pv_pflags = 0;
if (flags & PMAP_WIRED)
pv->pv_vflags |= PV_WIRED;
if (flags & VM_PROT_WRITE)
pv->pv_pflags |= PV_REFERENCED | PV_MODIFIED;
else if (flags & (VM_PROT_ALL))
pv->pv_pflags |= PV_REFERENCED;
pv_update(pv);
pmap->pm_entries[lpn] = pv;
splx(s);