svn commit: r215158 - head/sys/powerpc/aim

Nathan Whitehorn nwhitehorn at FreeBSD.org
Fri Nov 12 04:13:49 UTC 2010


Author: nwhitehorn
Date: Fri Nov 12 04:13:48 2010
New Revision: 215158
URL: http://svn.freebsd.org/changeset/base/215158

Log:
  Fix an error in r215067. An existing /chosen/mmu but missing translations
  property just means we shouldn't add any translations, not that we should
  panic.

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

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c	Fri Nov 12 03:43:22 2010	(r215157)
+++ head/sys/powerpc/aim/mmu_oea64.c	Fri Nov 12 04:13:48 2010	(r215158)
@@ -1126,14 +1126,14 @@ moea64_bootstrap(mmu_t mmup, vm_offset_t
 		ofw_pmap.pm_sr[i] = kernel_pmap->pm_sr[i];
 	    #endif
 
-	    if ((mmu = OF_instance_to_package(mmui)) == -1)
-		panic("moea64_bootstrap: can't get mmu package");
-	    if ((sz = OF_getproplen(mmu, "translations")) == -1)
-		panic("moea64_bootstrap: can't get ofw translation count");
+	    mmu = OF_instance_to_package(mmui);
+	    if (mmu == -1 || (sz = OF_getproplen(mmu, "translations")) == -1)
+		sz = 0;
 	    if (sz > 6144 /* tmpstksz - 2 KB headroom */)
 		panic("moea64_bootstrap: too many ofw translations");
 
-	    moea64_add_ofw_mappings(mmup, mmu, sz);
+	    if (sz > 0)
+		moea64_add_ofw_mappings(mmup, mmu, sz);
 	}
 
 #ifdef SMP


More information about the svn-src-head mailing list