Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 in vmapbuf(), use pmap_enter() instead of...



details:   https://anonhg.NetBSD.org/src/rev/4d928aeee531
branches:  trunk
changeset: 472705:4d928aeee531
user:      chs <chs%NetBSD.org@localhost>
date:      Wed May 05 05:25:32 1999 +0000

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

diffstat:

 sys/arch/i386/i386/vm_machdep.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 8d994b153542 -r 4d928aeee531 sys/arch/i386/i386/vm_machdep.c
--- a/sys/arch/i386/i386/vm_machdep.c   Wed May 05 05:21:13 1999 +0000
+++ b/sys/arch/i386/i386/vm_machdep.c   Wed May 05 05:25:32 1999 +0000
@@ -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 @@
 {
        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 @@
         * 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;
        }
 }



Home | Main Index | Thread Index | Old Index