提交 f9d1465f 编写于 作者: A Andreas Färber

sun4u: Let cpu_devinit() return SPARCCPU

Needed for main_cpu_reset().
Signed-off-by: NAndreas Färber <afaerber@suse.de>
Acked-by: NBlue Swirl <blauwirbel@gmail.com>
上级 8ebdf9dc
...@@ -752,7 +752,7 @@ static TypeInfo ram_info = { ...@@ -752,7 +752,7 @@ static TypeInfo ram_info = {
.class_init = ram_class_init, .class_init = ram_class_init,
}; };
static CPUSPARCState *cpu_devinit(const char *cpu_model, const struct hwdef *hwdef) static SPARCCPU *cpu_devinit(const char *cpu_model, const struct hwdef *hwdef)
{ {
SPARCCPU *cpu; SPARCCPU *cpu;
CPUSPARCState *env; CPUSPARCState *env;
...@@ -786,7 +786,7 @@ static CPUSPARCState *cpu_devinit(const char *cpu_model, const struct hwdef *hwd ...@@ -786,7 +786,7 @@ static CPUSPARCState *cpu_devinit(const char *cpu_model, const struct hwdef *hwd
reset_info->prom_addr = hwdef->prom_addr; reset_info->prom_addr = hwdef->prom_addr;
qemu_register_reset(main_cpu_reset, reset_info); qemu_register_reset(main_cpu_reset, reset_info);
return env; return cpu;
} }
static void sun4uv_init(MemoryRegion *address_space_mem, static void sun4uv_init(MemoryRegion *address_space_mem,
...@@ -796,6 +796,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, ...@@ -796,6 +796,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
const char *initrd_filename, const char *cpu_model, const char *initrd_filename, const char *cpu_model,
const struct hwdef *hwdef) const struct hwdef *hwdef)
{ {
SPARCCPU *cpu;
CPUSPARCState *env; CPUSPARCState *env;
M48t59State *nvram; M48t59State *nvram;
unsigned int i; unsigned int i;
...@@ -808,7 +809,8 @@ static void sun4uv_init(MemoryRegion *address_space_mem, ...@@ -808,7 +809,8 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
void *fw_cfg; void *fw_cfg;
/* init CPUs */ /* init CPUs */
env = cpu_devinit(cpu_model, hwdef); cpu = cpu_devinit(cpu_model, hwdef);
env = &cpu->env;
/* set up devices */ /* set up devices */
ram_init(0, RAM_size); ram_init(0, RAM_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册