Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 May 2012 18:05:48 +0000 (UTC)
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236325 - head/sys/powerpc/booke
Message-ID:  <201205301805.q4UI5mTg066488@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: raj
Date: Wed May 30 18:05:48 2012
New Revision: 236325
URL: http://svn.freebsd.org/changeset/base/236325

Log:
  Panic openly if we cannot retrieve memory information from the device tree.
  This is a critical condition and can lead to all sorts of misterious hangs if
  not handled.
  
  Obtained from:	Semihalf
  Also reported by: thompsa

Modified:
  head/sys/powerpc/booke/platform_bare.c

Modified: head/sys/powerpc/booke/platform_bare.c
==============================================================================
--- head/sys/powerpc/booke/platform_bare.c	Wed May 30 17:34:40 2012	(r236324)
+++ head/sys/powerpc/booke/platform_bare.c	Wed May 30 18:05:48 2012	(r236325)
@@ -76,7 +76,7 @@ static int bare_smp_start_cpu(platform_t
 static void booke_reset(platform_t);
 
 static platform_method_t bare_methods[] = {
-	PLATFORMMETHOD(platform_probe, 		bare_probe),
+	PLATFORMMETHOD(platform_probe,		bare_probe),
 	PLATFORMMETHOD(platform_mem_regions,	bare_mem_regions),
 	PLATFORMMETHOD(platform_timebase_freq,	bare_timebase_freq),
 
@@ -143,9 +143,9 @@ bare_mem_regions(platform_t plat, struct
 	int i, rv;
 
 	rv = fdt_get_mem_regions(avail_regions, availsz, &memsize);
-
 	if (rv != 0)
-		return;
+		panic("%s: could not retrieve mem regions from the 'memory' "
+		    "node, error: %d", __func__, rv);
 
 	for (i = 0; i < *availsz; i++) {
 		if (avail_regions[i].mr_start < 1048576) {



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