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>
This commit is contained in:
Andreas Färber 2012-05-03 03:14:37 +02:00
parent e59be77a5b
commit 8968f588e3

View File

@ -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) {