mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 03:13:44 +08:00
user: move CPU reset call to main.c for x86/PPC/Sparc
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
d84bda46de
commit
b55a37c981
@ -891,6 +891,9 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
}
|
||||
#if defined(TARGET_I386) || defined(TARGET_SPARC) || defined(TARGET_PPC)
|
||||
cpu_reset(env);
|
||||
#endif
|
||||
thread_env = env;
|
||||
|
||||
if (getenv("QEMU_STRACE")) {
|
||||
|
@ -846,6 +846,7 @@ int main(int argc, char **argv)
|
||||
/* NOTE: we need to init the CPU at this stage to get
|
||||
qemu_host_page_size */
|
||||
env = cpu_init(cpu_model);
|
||||
cpu_reset(env);
|
||||
|
||||
printf("Starting %s with qemu\n----------------\n", filename);
|
||||
|
||||
|
@ -2618,6 +2618,10 @@ int main(int argc, char **argv, char **envp)
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
}
|
||||
#if defined(TARGET_I386) || defined(TARGET_SPARC) || defined(TARGET_PPC)
|
||||
cpu_reset(env);
|
||||
#endif
|
||||
|
||||
thread_env = env;
|
||||
|
||||
if (getenv("QEMU_STRACE")) {
|
||||
|
@ -1885,9 +1885,6 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
|
||||
return NULL;
|
||||
}
|
||||
mce_init(env);
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
cpu_reset(env);
|
||||
#endif
|
||||
|
||||
qemu_init_vcpu(env);
|
||||
|
||||
|
@ -2810,9 +2810,6 @@ CPUPPCState *cpu_ppc_init (const char *cpu_model)
|
||||
ppc_translate_init();
|
||||
env->cpu_model_str = cpu_model;
|
||||
cpu_ppc_register_internal(env, def);
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
cpu_reset(env);
|
||||
#endif
|
||||
|
||||
qemu_init_vcpu(env);
|
||||
|
||||
|
@ -762,9 +762,6 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model)
|
||||
cpu_sparc_close(env);
|
||||
return NULL;
|
||||
}
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
cpu_reset(env);
|
||||
#endif
|
||||
qemu_init_vcpu(env);
|
||||
|
||||
return env;
|
||||
|
Loading…
Reference in New Issue
Block a user