svn commit: r222327 - head/sys/powerpc/booke

Marcel Moolenaar marcel at FreeBSD.org
Thu May 26 20:47:05 UTC 2011


Author: marcel
Date: Thu May 26 20:47:05 2011
New Revision: 222327
URL: http://svn.freebsd.org/changeset/base/222327

Log:
  Don't assume we have a valid bootinfo pointer.

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

Modified: head/sys/powerpc/booke/platform_bare.c
==============================================================================
--- head/sys/powerpc/booke/platform_bare.c	Thu May 26 20:32:33 2011	(r222326)
+++ head/sys/powerpc/booke/platform_bare.c	Thu May 26 20:47:05 2011	(r222327)
@@ -166,8 +166,11 @@ bare_timebase_freq(platform_t plat, stru
 	phandle_t cpus, child;
 	pcell_t freq;
 
-	/* Backward compatibility. See 8-STABLE. */
-	ticks = bootinfo[3] >> 3;
+	if (bootinfo != NULL) {
+		/* Backward compatibility. See 8-STABLE. */
+		ticks = bootinfo[3] >> 3;
+	} else
+		ticks = 0;
 
 	if ((cpus = OF_finddevice("/cpus")) == 0)
 		goto out;


More information about the svn-src-head mailing list