Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Don't use pmap_kenter_pa() in pmap_map(); ...



details:   https://anonhg.NetBSD.org/src/rev/fa3b7f8301eb
branches:  trunk
changeset: 534605:fa3b7f8301eb
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jul 30 16:07:23 2002 +0000

description:
Don't use pmap_kenter_pa() in pmap_map(); doing so causes an assertion
failure in pmap_kenter_pa().

diffstat:

 sys/arch/arm/arm32/pmap.c |  17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 29e28cea2401 -r fa3b7f8301eb sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Tue Jul 30 15:01:15 2002 +0000
+++ b/sys/arch/arm/arm32/pmap.c Tue Jul 30 16:07:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.99 2002/06/02 14:44:42 drochner Exp $       */
+/*     $NetBSD: pmap.c,v 1.100 2002/07/30 16:07:23 thorpej Exp $       */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -143,7 +143,7 @@
 #include <machine/param.h>
 #include <arm/arm32/katelib.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.99 2002/06/02 14:44:42 drochner Exp $");        
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.100 2002/07/30 16:07:23 thorpej Exp $");        
 #ifdef PMAP_DEBUG
 #define        PDEBUG(_lev_,_stat_) \
        if (pmap_debug_level >= (_lev_)) \
@@ -938,12 +938,21 @@
  *
  *     For now, VM is already on, we only need to map the
  *     specified memory.
+ *
+ *     XXX This routine should eventually go away; it's only used
+ *     XXX by machine-dependent crash dump code.
  */
 vaddr_t
 pmap_map(vaddr_t va, paddr_t spa, paddr_t epa, vm_prot_t prot)
 {
+       pt_entry_t *pte;
+
        while (spa < epa) {
-               pmap_kenter_pa(va, spa, prot);
+               pte = vtopte(va);
+
+               *pte = L2_S_PROTO | spa |
+                   L2_S_PROT(PTE_KERNEL, prot) | pte_l2_s_cache_mode;
+               cpu_tlb_flushID_SE(va);
                va += NBPG;
                spa += NBPG;
        }
@@ -988,7 +997,7 @@
        TAILQ_INIT(&(pmap_kernel()->pm_obj.memq));
        pmap_kernel()->pm_obj.uo_npages = 0;
        pmap_kernel()->pm_obj.uo_refs = 1;
-       
+
        /*
         * Initialize PAGE_SIZE-dependent variables.
         */



Home | Main Index | Thread Index | Old Index