duplicate the changes from arm/arm32/stubs.c's dumpsys to remove pmap_map

usage.
Seems this file should really be split into the hpcarm specific bits
so it shares stubs.c with the other arm32 ports.

Pointed out by Håvard
This commit is contained in:
chris 2003-03-25 10:41:39 +00:00
parent 9e3ba8326d
commit 42d1c259a4
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stubs.c,v 1.13 2002/10/05 17:12:10 chs Exp $ */
/* $NetBSD: stubs.c,v 1.14 2003/03/25 10:41:39 chris Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -130,6 +130,8 @@ dumpsys()
/* Save registers. */
savectx(&dumppcb);
/* flush everything out of caches */
cpu_dcache_wbinv_all();
if (dumpdev == NODEV)
return;
@ -168,9 +170,13 @@ dumpsys()
+ (bootconfig.dram[block].pages * NBPG)); addr += NBPG) {
if ((len % (1024*1024)) == 0)
printf("%d ", len / (1024*1024));
pmap_map(dumpspace, addr, addr + NBPG, VM_PROT_READ);
pmap_kenter_pa(dumpspace, addr, VM_PROT_READ);
pmap_update(pmap_kernel());
error = (*bdev->d_dump)(dumpdev,
blkno, (caddr_t) dumpspace, NBPG);
pmap_kremove(dumpspace, NBPG);
pmap_update(pmap_kernel());
if (error) break;
blkno += btodb(NBPG);
len += NBPG;