Skip to contentSkip to conversation

PPC: 405: Fix ppc405ep initialization

PATCH New Alexander Graf 1 participant 1 message Feb 21, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PPC: 405: Fix ppc405ep initialization

When trying to run a ppc405 guest, it segfaults quite quickly, trying to access timers that weren't initialized. Initialize them properly instead.

---
 hw/ppc405_uc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
hw/ppc405_uc.c +2 -0
index 98079fa..1f4efbf 100644
@@ -2483,6 +2483,8 @@ CPUState *ppc405ep_init(MemoryRegion *address_space_mem,
     ppc4xx_pob_init(env);
     /* OBP arbitrer */
     ppc4xx_opba_init(0xef600600);
+    /* Initialize timers */
+    ppc_booke_timers_init(env, sysclk, 0);
     /* Universal interrupt controller */
     irqs = g_malloc0(sizeof(qemu_irq) * PPCUIC_OUTPUT_NB);
     irqs[PPCUIC_OUTPUT_INT] =
Signature · 1 line
1.6.0.2