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

xtensa_sim: Use cpu_xtensa_init() to obtain XtensaCPU

Needed for sim_reset().
Signed-off-by: NAndreas Färber <afaerber@suse.de>
Acked-by: NMax Filippov <jcmvbkbc@gmail.com>
上级 15be3171
......@@ -47,16 +47,19 @@ static void sim_init(ram_addr_t ram_size,
const char *kernel_filename, const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
XtensaCPU *cpu = NULL;
CPUXtensaState *env = NULL;
MemoryRegion *ram, *rom;
int n;
for (n = 0; n < smp_cpus; n++) {
env = cpu_init(cpu_model);
if (!env) {
cpu = cpu_xtensa_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
env = &cpu->env;
env->sregs[PRID] = n;
qemu_register_reset(sim_reset, env);
/* Need MMU initialized prior to ELF loading,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册