summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/mmu_oea64.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-11-12 04:13:48 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-11-12 04:13:48 +0000
commit3d8843cae15a79d5dd48c925dd352a875b214068 (patch)
treec0ee587229e6fae7320e0ef4f99b593d5f06e64e /sys/powerpc/aim/mmu_oea64.c
parentb60b3b77532b00e2d6d085b6d2cf1c55a94d6690 (diff)
downloadFreeBSD-src-3d8843cae15a79d5dd48c925dd352a875b214068.zip
FreeBSD-src-3d8843cae15a79d5dd48c925dd352a875b214068.tar.gz
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.
Diffstat (limited to 'sys/powerpc/aim/mmu_oea64.c')
-rw-r--r--sys/powerpc/aim/mmu_oea64.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 3e336c9..002754d 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
OpenPOWER on IntegriCloud