diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-12-10 07:48:47 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-12-10 07:48:47 +0000 |
commit | 9361b02cf62c686ccce9f0420b62f527c15ccfe8 (patch) | |
tree | 4f03d58a2115a328afceb407515c681c2ef4eeb5 /sys/i386 | |
parent | 4cc001f60b95737eaf4334d899e190f9dbee86c9 (diff) | |
download | FreeBSD-src-9361b02cf62c686ccce9f0420b62f527c15ccfe8.zip FreeBSD-src-9361b02cf62c686ccce9f0420b62f527c15ccfe8.tar.gz |
for PV XEN translate page table entries from machine (real) to physical (logical) addresses so that kgdb can
translate them to the correct coredump offsets
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/minidump_machdep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/i386/i386/minidump_machdep.c b/sys/i386/i386/minidump_machdep.c index 8d9db0c..92c0b8f 100644 --- a/sys/i386/i386/minidump_machdep.c +++ b/sys/i386/i386/minidump_machdep.c @@ -313,7 +313,23 @@ minidumpsys(struct dumperinfo *di) } if ((pd[j] & PG_V) == PG_V) { pa = xpmap_mtop(pd[j] & PG_FRAME); +#ifndef XEN error = blk_write(di, 0, pa, PAGE_SIZE); +#else + pt = pmap_kenter_temporary(pa, 0); + memcpy(fakept, pt, PAGE_SIZE); + for (i = 0; i < NPTEPG; i++) + fakept[i] = xpmap_mtop(fakept[i]); + error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE); + if (error) + goto fail; + /* flush, in case we reuse fakept in the same block */ + error = blk_flush(di); + if (error) + goto fail; + bzero(fakept, sizeof(fakept)); +#endif + if (error) goto fail; } else { |