From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 21:21:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B863DDE; Sun, 9 Feb 2014 21:21:11 +0000 (UTC) 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 5706518A6; Sun, 9 Feb 2014 21:21:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19LLBgq033519; Sun, 9 Feb 2014 21:21:11 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19LLBxw033490; Sun, 9 Feb 2014 21:21:11 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201402092121.s19LLBxw033490@svn.freebsd.org> From: Ian Lepore Date: Sun, 9 Feb 2014 21:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261690 - head/sys/arm/at91 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.17 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: Sun, 09 Feb 2014 21:21:11 -0000 Author: ian Date: Sun Feb 9 21:21:10 2014 New Revision: 261690 URL: http://svnweb.freebsd.org/changeset/base/261690 Log: If someone tries to boot a generic ATMEL kernel that has no board_init() routine compiled in, print a friendly error message about it rather than mysteriously hanging while trying to init 4GB of nonexistant ram. Modified: head/sys/arm/at91/at91_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Feb 9 21:02:46 2014 (r261689) +++ head/sys/arm/at91/at91_machdep.c Sun Feb 9 21:21:10 2014 (r261690) @@ -590,6 +590,11 @@ initarm(struct arm_boot_params *abp) printf("Warning: No soc support for %s found.\n", soc_info.name); memsize = board_init(); + if (memsize == -1) { + printf("board_init() failed, cannot determine ram size; " + "assuming 16MB\n"); + memsize = 16 * 1024 * 1024; + } /* * Pages were allocated during the secondary bootstrap for the