From owner-svn-src-all@FreeBSD.ORG Tue Sep 17 17:31:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 966D6230; Tue, 17 Sep 2013 17:31:53 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82BDA259E; Tue, 17 Sep 2013 17:31:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8HHVr8f078997; Tue, 17 Sep 2013 17:31:53 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8HHVrRW078996; Tue, 17 Sep 2013 17:31:53 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309171731.r8HHVrRW078996@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 17 Sep 2013 17:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255642 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 17:31:53 -0000 Author: nwhitehorn Date: Tue Sep 17 17:31:53 2013 New Revision: 255642 URL: http://svnweb.freebsd.org/changeset/base/255642 Log: Only attach if properties we need (address, in particular) are present. This is the correct version of r255420. Approved by: re (kib) Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Tue Sep 17 17:30:49 2013 (r255641) +++ head/sys/powerpc/ofw/ofw_syscons.c Tue Sep 17 17:31:53 2013 (r255642) @@ -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,