Index: sys/powerpc/aim/slb.c =================================================================== --- sys/powerpc/aim/slb.c +++ sys/powerpc/aim/slb.c @@ -416,6 +416,7 @@ struct slbtnode *root; root = uma_zalloc(slbt_zone, M_NOWAIT | M_ZERO); + KASSERT(root != NULL, ("unhandled NULL case")); root->ua_level = UAD_ROOT_LEVEL; return (root); Index: sys/powerpc/pseries/platform_chrp.c =================================================================== --- sys/powerpc/pseries/platform_chrp.c +++ sys/powerpc/pseries/platform_chrp.c @@ -141,8 +141,16 @@ if (!(mfmsr() & PSL_HV)) { struct mem_region *phys, *avail; int nphys, navail; + vm_offset_t off; + mem_regions(&phys, &nphys, &avail, &navail); - realmaxaddr = phys[0].mr_size; + + realmaxaddr = 0; + for (i = 0; i < nphys; i++) { + off = phys[i].mr_start + phys[i].mr_size; + if (off > realmaxaddr) + realmaxaddr = off; + } pmap_mmu_install("mmu_phyp", BUS_PROBE_SPECIFIC); cpu_idle_hook = phyp_cpu_idle;