Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Dec 2009 07:48:47 +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: r200352 - head/sys/i386/i386
Message-ID:  <200912100748.nBA7mlKq054943@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Thu Dec 10 07:48:47 2009
New Revision: 200352
URL: http://svn.freebsd.org/changeset/base/200352

Log:
  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

Modified:
  head/sys/i386/i386/minidump_machdep.c

Modified: head/sys/i386/i386/minidump_machdep.c
==============================================================================
--- head/sys/i386/i386/minidump_machdep.c	Thu Dec 10 06:42:28 2009	(r200351)
+++ head/sys/i386/i386/minidump_machdep.c	Thu Dec 10 07:48:47 2009	(r200352)
@@ -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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912100748.nBA7mlKq054943>