Date: Thu, 10 Dec 2009 03:09:35 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200346 - in head/sys/i386: i386 xen Message-ID: <200912100309.nBA39Zvk048982@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Thu Dec 10 03:09:35 2009 New Revision: 200346 URL: http://svn.freebsd.org/changeset/base/200346 Log: - revert pmap_kenter_temporary to taking a physical address - make minidump work Modified: head/sys/i386/i386/dump_machdep.c head/sys/i386/i386/minidump_machdep.c head/sys/i386/xen/pmap.c Modified: head/sys/i386/i386/dump_machdep.c ============================================================================== --- head/sys/i386/i386/dump_machdep.c Thu Dec 10 02:51:40 2009 (r200345) +++ head/sys/i386/i386/dump_machdep.c Thu Dec 10 03:09:35 2009 (r200346) @@ -182,11 +182,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr } for (i = 0; i < chunk; i++) { a = pa + i * PAGE_SIZE; -#ifdef XEN - va = pmap_kenter_temporary(xpmap_ptom(trunc_page(a)), i); -#else va = pmap_kenter_temporary(trunc_page(a), i); -#endif } error = dump_write(di, va, 0, dumplo, sz); if (error) Modified: head/sys/i386/i386/minidump_machdep.c ============================================================================== --- head/sys/i386/i386/minidump_machdep.c Thu Dec 10 02:51:40 2009 (r200345) +++ head/sys/i386/i386/minidump_machdep.c Thu Dec 10 03:09:35 2009 (r200346) @@ -65,6 +65,11 @@ static void *dump_va; static uint64_t counter, progress; CTASSERT(sizeof(*vm_page_dump) == 4); +#ifndef XEN +#define xpmap_mtop(x) (x) +#define xpmap_ptom(x) (x) +#endif + static int is_dumpable(vm_paddr_t pa) @@ -194,7 +199,7 @@ minidumpsys(struct dumperinfo *di) j = va >> PDRSHIFT; if ((pd[j] & (PG_PS | PG_V)) == (PG_PS | PG_V)) { /* This is an entire 2M page. */ - pa = pd[j] & PG_PS_FRAME; + pa = xpmap_mtop(pd[j] & PG_PS_FRAME); for (k = 0; k < NPTEPG; k++) { if (is_dumpable(pa)) dump_add_page(pa); @@ -204,10 +209,10 @@ minidumpsys(struct dumperinfo *di) } if ((pd[j] & PG_V) == PG_V) { /* set bit for each valid page in this 2MB block */ - pt = pmap_kenter_temporary(pd[j] & PG_FRAME, 0); + pt = pmap_kenter_temporary(xpmap_mtop(pd[j] & PG_FRAME), 0); for (k = 0; k < NPTEPG; k++) { if ((pt[k] & PG_V) == PG_V) { - pa = pt[k] & PG_FRAME; + pa = xpmap_mtop(pt[k] & PG_FRAME); if (is_dumpable(pa)) dump_add_page(pa); } @@ -307,7 +312,7 @@ minidumpsys(struct dumperinfo *di) continue; } if ((pd[j] & PG_V) == PG_V) { - pa = pd[j] & PG_FRAME; + pa = xpmap_mtop(pd[j] & PG_FRAME); error = blk_write(di, 0, pa, PAGE_SIZE); if (error) goto fail; Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Dec 10 02:51:40 2009 (r200345) +++ head/sys/i386/xen/pmap.c Thu Dec 10 03:09:35 2009 (r200346) @@ -3101,9 +3101,10 @@ void * pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; + vm_paddr_t ma = xpmap_ptom(pa); va = (vm_offset_t)crashdumpmap + (i * PAGE_SIZE); - PT_SET_MA(va, (pa & ~PAGE_MASK) | PG_V | pgeflag); + PT_SET_MA(va, (ma & ~PAGE_MASK) | PG_V | pgeflag); invlpg(va); return ((void *)crashdumpmap); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912100309.nBA39Zvk048982>