From 62181629ffb40993f74f44382538e67b8ecfd7ef Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Mon, 21 Oct 2013 22:25:54 +0000 Subject: Make hard-wired TLB allocations be at minimum one page. This is required by some implementations, most notably (in my case) QEMU's e500 emulation. --- sys/powerpc/booke/pmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/powerpc/booke/pmap.c') diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index 7b9a5d3..9406a4a 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -2613,6 +2613,8 @@ mmu_booke_mapdev(mmu_t mmu, vm_paddr_t pa, vm_size_t size) va = (pa >= 0x80000000) ? pa : (0xe2000000 + pa); res = (void *)va; + if (size < PAGE_SIZE) + size = PAGE_SIZE; do { sz = 1 << (ilog2(size) & ~1); -- cgit v1.1