diff options
author | ian <ian@FreeBSD.org> | 2014-05-14 01:16:05 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-14 01:16:05 +0000 |
commit | 147aa314a7ea59fab69a92349cee312e49cae2bb (patch) | |
tree | b553b4077fe2c8c6098e20d3d69729a8bc8e9c11 /sys/powerpc/aim | |
parent | 2963fd0dfbdafac049cadecf0774e0c027b28c88 (diff) | |
download | FreeBSD-src-147aa314a7ea59fab69a92349cee312e49cae2bb.zip FreeBSD-src-147aa314a7ea59fab69a92349cee312e49cae2bb.tar.gz |
MFC r257180, r257195, r257196, r257198, r257209, r257295
Add some extra sanity checking and checks to printf format specifiers.
Try even harder to find a console before giving up.
Make devices with registers into the KVA region work reliably.
Turn on VM_KMEM_SIZE_SCALE on 32-bit as well as 64-bit PowerPC.
Return NOKEY instead of 0 if there are no more key presses queued.
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/mmu_oea64.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index a470ded..0669f66 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -501,15 +501,7 @@ moea64_add_ofw_mappings(mmu_t mmup, phandle_t mmu, size_t sz) qsort(translations, sz, sizeof (*translations), om_cmp); for (i = 0; i < sz; i++) { - CTR3(KTR_PMAP, "translation: pa=%#x va=%#x len=%#x", - (uint32_t)(translations[i].om_pa_lo), translations[i].om_va, - translations[i].om_len); - - if (translations[i].om_pa_lo % PAGE_SIZE) - panic("OFW translation not page-aligned!"); - pa_base = translations[i].om_pa_lo; - #ifdef __powerpc64__ pa_base += (vm_offset_t)translations[i].om_pa_hi << 32; #else @@ -517,6 +509,14 @@ moea64_add_ofw_mappings(mmu_t mmup, phandle_t mmu, size_t sz) panic("OFW translations above 32-bit boundary!"); #endif + if (pa_base % PAGE_SIZE) + panic("OFW translation not page-aligned (phys)!"); + if (translations[i].om_va % PAGE_SIZE) + panic("OFW translation not page-aligned (virt)!"); + + CTR3(KTR_PMAP, "translation: pa=%#zx va=%#x len=%#x", + pa_base, translations[i].om_va, translations[i].om_len); + /* Now enter the pages for this mapping */ DISABLE_TRANS(msr); @@ -693,9 +693,9 @@ moea64_early_bootstrap(mmu_t mmup, vm_offset_t kernelstart, vm_offset_t kernelen hwphyssz = 0; TUNABLE_ULONG_FETCH("hw.physmem", (u_long *) &hwphyssz); for (i = 0, j = 0; i < regions_sz; i++, j += 2) { - CTR3(KTR_PMAP, "region: %#x - %#x (%#x)", regions[i].mr_start, - regions[i].mr_start + regions[i].mr_size, - regions[i].mr_size); + CTR3(KTR_PMAP, "region: %#zx - %#zx (%#zx)", + regions[i].mr_start, regions[i].mr_start + + regions[i].mr_size, regions[i].mr_size); if (hwphyssz != 0 && (physsz + regions[i].mr_size) >= hwphyssz) { if (physsz < hwphyssz) { |