svn commit: r261690 - head/sys/arm/at91
Ian Lepore
ian at FreeBSD.org
Sun Feb 9 21:21:11 UTC 2014
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
More information about the svn-src-head
mailing list