PERFORCE change 41975 for review

Juli Mallett jmallett at FreeBSD.org
Tue Nov 11 00:15:17 PST 2003


http://perforce.freebsd.org/chv.cgi?CH=41975

Change 41975 by jmallett at jmallett_dalek on 2003/11/11 00:14:14

	Ignore obsessive-compulsive desire to sort includes and just
	commit something which further desorts and happens to make
	the kvtop command available.

Affected files ...

.. //depot/projects/mips/sys/mips/mips/db_interface.c#9 edit

Differences ...

==== //depot/projects/mips/sys/mips/mips/db_interface.c#9 (text+ko) ====

@@ -44,6 +44,9 @@
 #include <machine/locore.h>
 #include <machine/mips_opcode.h>
 
+#include <vm/vm.h>
+#include <vm/pmap.h>
+
 #include <machine/db_machdep.h>
 #include <ddb/ddb.h>
 #include <ddb/db_access.h>
@@ -301,23 +304,14 @@
 	}
 }
 
-#if 0 /* XXX notyet */
-DB_COMMAND(kvtob, db_kvtophys_cmd)
+DB_COMMAND(kvtop, db_kvtophys_cmd)
 {
 
 	if (!have_addr)
 		return;
-	if (MIPS_KSEG2_START <= addr) {
-		/*
-		 * Cast the physical address -- some platforms, while
-		 * being ILP32, may be using 64-bit paddr_t's.
-		 */
-		db_printf("0x%lx -> 0x%qx\n", addr,
-		    (unsigned long long) kvtophys(addr));
-	} else
-		printf("not a kernel virtual address\n");
+	db_printf("%#lx -> %#lx\n", (u_long)addr,
+		  (u_long)pmap_kextract(addr));
 }
-#endif
 
 #define	FLDWIDTH	10
 #define	SHOW32(reg, name)						\


More information about the p4-projects mailing list