diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-09-17 17:31:53 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-09-17 17:31:53 +0000 |
commit | 63b8881f519564798e70d5133997c3fca3655076 (patch) | |
tree | fe61f5f8576e9d9d03983e6eab5f9cdff2041bf1 | |
parent | 549591b6f0a4477ce0467ae81ce538ea09d947af (diff) | |
download | FreeBSD-src-63b8881f519564798e70d5133997c3fca3655076.zip FreeBSD-src-63b8881f519564798e70d5133997c3fca3655076.tar.gz |
Only attach if properties we need (address, in particular) are present.
This is the correct version of r255420.
Approved by: re (kib)
-rw-r--r-- | sys/powerpc/ofw/ofw_syscons.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/powerpc/ofw/ofw_syscons.c b/sys/powerpc/ofw/ofw_syscons.c index 84ba302..1c1c4c1 100644 --- a/sys/powerpc/ofw/ofw_syscons.c +++ b/sys/powerpc/ofw/ofw_syscons.c @@ -264,6 +264,10 @@ ofwfb_configure(int flags) } else return (0); + if (OF_getproplen(node, "height") != sizeof(sc->sc_height) || + OF_getproplen(node, "width") != sizeof(sc->sc_width)) + return (0); + sc->sc_depth = depth; sc->sc_node = node; sc->sc_console = 1; @@ -278,6 +282,8 @@ ofwfb_configure(int flags) * * XXX We assume #address-cells is 1 at this point. */ + if (OF_getproplen(node, "address") != sizeof(fb_phys)) + return (0); OF_getprop(node, "address", &fb_phys, sizeof(fb_phys)); bus_space_map(&bs_be_tag, fb_phys, sc->sc_height * sc->sc_stride, |