mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 01:50:43 +00:00
mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
This changes the order between cpu_mips_realize_env() and cpu_exec_initfn(), but cpu_exec_initfn() don't have anything that depends on cpu_mips_realize_env() being called first. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Igor Mammedov <imammedo@redhat.com> Tested-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
This commit is contained in:
parent
27e38392ca
commit
df4dc10284
@ -123,6 +123,7 @@ static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info) {
|
|||||||
static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
|
static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||||
{
|
{
|
||||||
CPUState *cs = CPU(dev);
|
CPUState *cs = CPU(dev);
|
||||||
|
MIPSCPU *cpu = MIPS_CPU(dev);
|
||||||
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
|
MIPSCPUClass *mcc = MIPS_CPU_GET_CLASS(dev);
|
||||||
Error *local_err = NULL;
|
Error *local_err = NULL;
|
||||||
|
|
||||||
@ -132,6 +133,8 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cpu_mips_realize_env(&cpu->env);
|
||||||
|
|
||||||
cpu_reset(cs);
|
cpu_reset(cs);
|
||||||
qemu_init_vcpu(cs);
|
qemu_init_vcpu(cs);
|
||||||
|
|
||||||
|
@ -20535,7 +20535,6 @@ MIPSCPU *cpu_mips_init(const char *cpu_model)
|
|||||||
cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));
|
cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));
|
||||||
env = &cpu->env;
|
env = &cpu->env;
|
||||||
env->cpu_model = def;
|
env->cpu_model = def;
|
||||||
cpu_mips_realize_env(env);
|
|
||||||
|
|
||||||
object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
|
object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user