Subject: port-amd64/37351: amd64 crash dumps do not work for PA > 4 GB
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <martin@duskware.de>
List: netbsd-bugs
Date: 11/09/2007 19:28:58
>Number:         37351
>Category:       port-amd64
>Synopsis:       amd64 crash dumps do not work for PA > 4 GB
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 09 19:28:58 +0000 2007
>Originator:     Martin Husemann
>Release:        NetBSD 4.99.35
>Organization:
>Environment:
System: NetBSD martins.aprisoft.de 4.99.35 NetBSD 4.99.35 (MARTINS) #15: Fri Nov 9 18:01:12 CET 2007 martin@martins.aprisoft.de:/usr/src/sys/arch/amd64/compile/MARTINS amd64
Architecture: x86_64
Machine: amd64
>Description:

When testing crash dumps, I found that my machine will start to dump, but
then hang later. I added the patch below to print physical addresses during
the dump, and sure enough it hangs as soon as it crosses the 4 GB barrier.
Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/machdep.c,v
retrieving revision 1.65
diff -u -r1.65 machdep.c
--- machdep.c	26 Oct 2007 13:24:39 -0000	1.65
+++ machdep.c	9 Nov 2007 18:04:48 -0000
@@ -787,8 +787,9 @@
 			(void) pmap_map(dumpspace, maddr, maddr + n,
 			    VM_PROT_READ);
 
+			printf("\rdumping PA %016lx .... %016lx, still to go: ", maddr, maddr+n);
 			error = (*dump)(dumpdev, blkno, (void *)dumpspace, n);
-			if (error)
+			if (error)				
 				goto err;
 			maddr += n;
 			blkno += btodb(n);		/* XXX? */


>How-To-Repeat:
Boot amd64 on a machine with 4GB or more, enter ddb, run: reboot 0x104.

>Fix:
n/a