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.
This commit is contained in:
parent
e0414fcda4
commit
71d461451d
@ -567,6 +567,12 @@ nexus_setup_dinfo(device_t dev, phandle_t node)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user