From b13c7dec5fc04a9466cadd9e087c620ab7b2d5d0 Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Fri, 12 Nov 2010 04:13:48 +0000 Subject: [PATCH] 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. --- sys/powerpc/aim/mmu_oea64.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 3e336c9e6ab6..002754d71ca7 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -1126,14 +1126,14 @@ moea64_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelend) 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