aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 03:14:37 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:45 +0200
commit8968f588e3e42183a49802f1fa18af0f95cf5ba5 (patch)
tree1deeefe53c06544f6b252e9d53c1c335c8123293
parente59be77a5b88510ceca87335ee9f241ded566ae2 (diff)
downloadqemu-8968f588e3e42183a49802f1fa18af0f95cf5ba5.zip
qemu-8968f588e3e42183a49802f1fa18af0f95cf5ba5.tar.gz
qemu-8968f588e3e42183a49802f1fa18af0f95cf5ba5.tar.bz2
sun4m: Use cpu_sparc_init() to obtain SPARCCPU
Needed for {main,secondary}_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--hw/sun4m.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 34088ad..c5d2e40 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -809,13 +809,15 @@ static TypeInfo ram_info = {
static void cpu_devinit(const char *cpu_model, unsigned int id,
uint64_t prom_addr, qemu_irq **cpu_irqs)
{
+ SPARCCPU *cpu;
CPUSPARCState *env;
- env = cpu_init(cpu_model);
- if (!env) {
+ cpu = cpu_sparc_init(cpu_model);
+ if (cpu == NULL) {
fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n");
exit(1);
}
+ env = &cpu->env;
cpu_sparc_set_id(env, id);
if (id == 0) {