Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2010 03:18:11 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212597 - head/sys/powerpc/aim
Message-ID:  <201009140318.o8E3IBaj062962@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grehan
Date: Tue Sep 14 03:18:11 2010
New Revision: 212597
URL: http://svn.freebsd.org/changeset/base/212597

Log:
  Resurrect PSIM support by moving the cacheline size-detection warning
  printf outside of the MMU-disabled region. A call into OpenFirmware
  with the MMU off resulted in an internal PSIM assert.

Modified:
  head/sys/powerpc/aim/machdep.c

Modified: head/sys/powerpc/aim/machdep.c
==============================================================================
--- head/sys/powerpc/aim/machdep.c	Tue Sep 14 02:05:08 2010	(r212596)
+++ head/sys/powerpc/aim/machdep.c	Tue Sep 14 03:18:11 2010	(r212597)
@@ -258,6 +258,7 @@ powerpc_init(vm_offset_t startkernel, vm
         char		*env;
 	register_t	msr, scratch;
 	uint8_t		*cache_check;
+	int		cacheline_warn;
 	#ifndef __powerpc64__
 	int		ppc64;
 	#endif
@@ -265,6 +266,7 @@ powerpc_init(vm_offset_t startkernel, vm
 	end = 0;
 	kmdp = NULL;
 	trap_offset = 0;
+	cacheline_warn = 0;
 
 	/*
 	 * Parse metadata if present and fetch parameters.  Must be done
@@ -360,7 +362,8 @@ powerpc_init(vm_offset_t startkernel, vm
 
 	/*
 	 * Disable translation in case the vector area hasn't been
-	 * mapped (G5).
+	 * mapped (G5). Note that no OFW calls can be made until
+	 * translation is re-enabled.
 	 */
 
 	msr = mfmsr();
@@ -387,7 +390,7 @@ powerpc_init(vm_offset_t startkernel, vm
 
 	/* Work around psim bug */
 	if (cacheline_size == 0) {
-		printf("WARNING: cacheline size undetermined, setting to 32\n");
+		cacheline_warn = 1;
 		cacheline_size = 32;
 	}
 
@@ -496,6 +499,11 @@ powerpc_init(vm_offset_t startkernel, vm
 	mtmsr(msr);
 	isync();
 	
+	/* Warn if cachline size was not determined */
+	if (cacheline_warn == 1) {
+		printf("WARNING: cacheline size undetermined, setting to 32\n");
+	}
+
 	/*
 	 * Choose a platform module so we can get the physical memory map.
 	 */



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