svn commit: r256914 - head/sys/powerpc/powerpc
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Oct 22 15:47:14 UTC 2013
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 **)®);
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;
More information about the svn-src-head
mailing list