Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Feb 2014 21:21:11 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r261690 - head/sys/arm/at91
Message-ID:  <201402092121.s19LLBxw033490@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402092121.s19LLBxw033490>