Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2013 15:47:14 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256914 - head/sys/powerpc/powerpc
Message-ID:  <201310221547.r9MFlEtu084228@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Tue Oct 22 15:47:13 2013
New Revision: 256914
URL: http://svnweb.freebsd.org/changeset/base/256914

Log:
  Ignore registers on devices where the reg property is malformed. Issue a
  warning if this happens under bootverbose. This prevents some
  strange-looking entries in dmesg for SMU devices on Apple G5 systems.

Modified:
  head/sys/powerpc/powerpc/nexus.c

Modified: head/sys/powerpc/powerpc/nexus.c
==============================================================================
--- head/sys/powerpc/powerpc/nexus.c	Tue Oct 22 15:46:21 2013	(r256913)
+++ head/sys/powerpc/powerpc/nexus.c	Tue Oct 22 15:47:13 2013	(r256914)
@@ -567,6 +567,12 @@ nexus_setup_dinfo(device_t dev, phandle_
 	nreg = OF_getprop_alloc(node, "reg", sizeof(*reg), (void **)&reg);
 	if (nreg == -1)
 		nreg = 0;
+	if (nreg % (sc->acells + sc->scells) != 0) {
+		if (bootverbose)
+			device_printf(dev, "Malformed reg property on <%s>\n",
+			    ndi->ndi_obdinfo.obd_name);
+		nreg = 0;
+	}
 
 	for (i = 0; i < nreg; i += sc->acells + sc->scells) {
 		phys = size = 0;



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