Module Name:    src
Committed By:   phx
Date:           Sun Jan 17 16:47:17 UTC 2010

Modified Files:
        src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
Heed modeldata.ranges_offset while constructing the ranges bitmap.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/oea/ofwoea_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.17 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.18
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.17	Fri Feb 13 22:41:03 2009
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Sun Jan 17 16:47:17 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.17 2009/02/13 22:41:03 apb Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.18 2010/01/17 16:47:17 phx Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.17 2009/02/13 22:41:03 apb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.18 2010/01/17 16:47:17 phx Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -349,7 +349,7 @@
 
 
 /*
- * Scan the device tree for ranges, and batmap them.
+ * Scan the device tree for ranges, and return them as bitmap 0..15
  */
 
 static u_int16_t
@@ -373,7 +373,11 @@
 		if (j == -1)
 			goto noranges;
 
+#ifdef ofppc
+		reclen = acells + modeldata.ranges_offset + scells;
+#else
 		reclen = acells + 1 + scells;
+#endif
 
 		for (i=0; i < (mlen/4)/reclen; i++) {
 			addr = map[reclen * i + acells];

Reply via email to