diff options
author | Alexander Graf <agraf@suse.de> | 2013-04-04 18:45:07 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 23:02:41 +0200 |
commit | 20f649dd22dae13301c906c27a8768a318591ae8 (patch) | |
tree | 295b312a70ae192bf992547ebf75bf912a0a43f5 | |
parent | 31f2cb8ff415e376b05335dcf63ba38c00f29e5e (diff) | |
download | qemu-20f649dd22dae13301c906c27a8768a318591ae8.tar.gz qemu-20f649dd22dae13301c906c27a8768a318591ae8.tar.bz2 qemu-20f649dd22dae13301c906c27a8768a318591ae8.zip |
PPC: mac newworld: fix cpu NIP reset value
On -M mac99, we can run 970 CPUs. However, these CPUs define the initial
instruction pointer they start execution at as part of their bootup protocol,
so effectively it's up to the board to decide where they start.
This went unnoticed, because they used to boot at the same location our flash
was mapped to, but due to the recent reset changes our 970 CPUs want to reset
to 0x100 now, which is always a 0 instruction.
Set the initial IP to something reasonable for -M mac99.
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Fabien Chouteau <chouteau@adacore.com>
-rw-r--r-- | hw/ppc/mac_newworld.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 4a9b8837e3..ce44e95d53 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -126,6 +126,8 @@ static void ppc_core99_reset(void *opaque) PowerPCCPU *cpu = opaque; cpu_reset(CPU(cpu)); + /* 970 CPUs want to get their initial IP as part of their boot protocol */ + cpu->env.nip = PROM_ADDR + 0x100; } /* PowerPC Mac99 hardware initialisation */ |