diff options
author | Valentin Plotkin <caliborn@sdf.org> | 2017-01-26 10:15:59 +0000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-02-02 09:30:06 +1100 |
commit | 00469dc3731e3d08536cd119c14dbdf149fed3e4 (patch) | |
tree | 0ffad7e96bfdb06f244010fcf43cc6f61ce2ca8b /hw/ppc/ppc440_bamboo.c | |
parent | 25e6a11832bcd0715068f0cc24fb46ec03de676e (diff) |
target-ppc: Add MMU model check for booke machines
Machines bamboo, e500 and virtex-ml507 assume a certain MMU model,
otherwise resulting in unpredictable behavior. Add apropriate checks
into *_init functions.
Signed-off-by: Valentin Plotkin <caliborn@sdf.org>
[regarding virtex parts]
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/ppc440_bamboo.c')
-rw-r--r-- | hw/ppc/ppc440_bamboo.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 5c535b18a2..9d997bf743 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -193,6 +193,12 @@ static void bamboo_init(MachineState *machine) } env = &cpu->env; + if (env->mmu_model != POWERPC_MMU_BOOKE) { + fprintf(stderr, "MMU model %i not supported by this machine.\n", + env->mmu_model); + exit(1); + } + qemu_register_reset(main_cpu_reset, cpu); ppc_booke_timers_init(cpu, 400000000, 0); ppc_dcr_init(env, NULL, NULL); |