Subject: Re: Panic during dump
To: None <Richard.Earnshaw@buzzard.freeserve.co.uk>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-arm
Date: 05/06/2002 22:00:09
--TKYYegg/GYAC5JIZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, May 06, 2002 at 12:57:17AM +0100, Richard Earnshaw wrote:

 > Yep, that's where it's coming from.
 > 
 > 	pmap_kenter_pa
 > from	pmap_map

Ok, please try the attached patch.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

--TKYYegg/GYAC5JIZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=arm-patch

Index: pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.96
diff -u -r1.96 pmap.c
--- pmap.c	2002/04/24 17:35:10	1.96
+++ pmap.c	2002/05/07 04:56:29
@@ -938,12 +938,20 @@
  *
  *	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;
 		va += NBPG;
 		spa += NBPG;
 	}

--TKYYegg/GYAC5JIZ--