Don't use pmap_kenter_pa() in pmap_map(); doing so causes an assertion

failure in pmap_kenter_pa().
This commit is contained in:
thorpej 2002-07-30 16:07:23 +00:00
parent 0e796224d0
commit 3dcad9ac9e

View File

@ -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 @@ pmap_unmap_in_l1(struct pmap *pmap, vaddr_t va)
*
* 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 @@ pmap_bootstrap(pd_entry_t *kernel_l1pt, pv_addr_t kernel_ptpt)
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.
*/