summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hw/ppc/e500.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index feb712e5a9..d23f9b2f60 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -362,6 +362,10 @@ static void mmubooke_create_initial_mapping(CPUPPCState *env)
        the device tree top */
     dt_end = bi->dt_base + bi->dt_size;
     ps = booke206_page_size_to_tlb(dt_end) + 1;
+    if (ps & 1) {
+        /* e500v2 can only do even TLB size bits */
+        ps++;
+    }
     size = (ps << MAS1_TSIZE_SHIFT);
     tlb->mas1 = MAS1_VALID | size;
     tlb->mas2 = 0;