summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-12-23 21:43:31 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-12-23 21:43:31 +0000
commitdbf0766302753f00e09e1f22d9d1c15201a43379 (patch)
tree99d72bf1fe1c42bcb2d749827c455e36c0984cb6 /sys/arch
parent2942b54c71a23e7b911959a4ab867ab8cf3fe9ff (diff)
In pmap_dumpmmu(), account for the fact that we use 4MB mappings for text and
data segments. This makes the complete mappings available in kernel dumps.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index 0986433d932..307476cfe68 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.48 2007/12/05 19:43:15 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.49 2007/12/23 21:43:30 kettenis Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -2321,12 +2321,12 @@ pmap_dumpmmu(dump, blkno)
/* Describe the locked text segment */
kcpu->ktextbase = (u_int64_t)ktext;
kcpu->ktextp = (u_int64_t)ktextp;
- kcpu->ktextsz = (u_int64_t)ektextp - ktextp;
+ kcpu->ktextsz = (u_int64_t)(roundup(ektextp, 4*MEG) - ktextp);
/* Describe locked data segment */
kcpu->kdatabase = (u_int64_t)kdata;
kcpu->kdatap = (u_int64_t)kdatap;
- kcpu->kdatasz = (u_int64_t)ekdatap - kdatap;
+ kcpu->kdatasz = (u_int64_t)(roundup(ekdatap, 4*MEG) - kdatap);
/* Now the memsegs */
kcpu->nmemseg = memsize;