From 9528f6105095523068922c4bfe571315d8860fb9 Mon Sep 17 00:00:00 2001 From: chs Date: Wed, 5 May 1999 05:25:32 +0000 Subject: [PATCH] in vmapbuf(), use pmap_enter() instead of poking PTEs directly. --- sys/arch/i386/i386/vm_machdep.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c index 41540995afbd..ab913cb10706 100644 --- a/sys/arch/i386/i386/vm_machdep.c +++ b/sys/arch/i386/i386/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.75 1999/03/24 05:51:02 mrg Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.76 1999/05/05 05:25:32 chs Exp $ */ /*- * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -409,7 +409,6 @@ vmapbuf(bp, len) { vaddr_t faddr, taddr, off; paddr_t fpa; - pt_entry_t *tpte; if ((bp->b_flags & B_PHYS) == 0) panic("vmapbuf"); @@ -430,13 +429,13 @@ vmapbuf(bp, len) * where we we just allocated (TLB will be flushed when our * mapping is removed). */ - tpte = PTE_BASE + i386_btop(taddr); while (len) { fpa = pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map), faddr); - *tpte = fpa | PG_RW | PG_V | pmap_pg_g; - tpte++; + pmap_enter(vm_map_pmap(phys_map), taddr, fpa, + VM_PROT_READ|VM_PROT_WRITE, TRUE, 0); faddr += PAGE_SIZE; + taddr += PAGE_SIZE; len -= PAGE_SIZE; } }