in vmapbuf(), use pmap_enter() instead of poking PTEs directly.

This commit is contained in:
chs 1999-05-05 05:25:32 +00:00
parent 39a7993efb
commit 9528f61050

View File

@ -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;
}
}