summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke/pmap.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2013-10-21 22:25:54 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2013-10-21 22:25:54 +0000
commit62181629ffb40993f74f44382538e67b8ecfd7ef (patch)
tree78ceeca31cba2c70c64225343ae26c1efe0d3064 /sys/powerpc/booke/pmap.c
parent2470f9f00db07ec89ad8a5a86fd365ba49929a3a (diff)
downloadFreeBSD-src-62181629ffb40993f74f44382538e67b8ecfd7ef.zip
FreeBSD-src-62181629ffb40993f74f44382538e67b8ecfd7ef.tar.gz
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.
Diffstat (limited to 'sys/powerpc/booke/pmap.c')
-rw-r--r--sys/powerpc/booke/pmap.c2
1 files changed, 2 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud