diff options
author | Igor Mammedov | 2017-10-05 15:50:50 +0200 |
---|---|---|
committer | Eduardo Habkost | 2017-10-27 16:03:54 +0200 |
commit | b2c223571e1a4c0bc4cf559fbc433c0a2b83ae35 (patch) | |
tree | 34ce2ebc0c867a1878547ce3aff1510b44aa1416 /hw/moxie/moxiesim.c | |
parent | moxie: cleanup cpu type name composition (diff) | |
download | qemu-b2c223571e1a4c0bc4cf559fbc433c0a2b83ae35.tar.gz qemu-b2c223571e1a4c0bc4cf559fbc433c0a2b83ae35.tar.xz qemu-b2c223571e1a4c0bc4cf559fbc433c0a2b83ae35.zip |
moxie: use generic cpu_model parsing
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1507211474-188400-17-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/moxie/moxiesim.c')
-rw-r--r-- | hw/moxie/moxiesim.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c index 01b9f34f87..3ba58481d0 100644 --- a/hw/moxie/moxiesim.c +++ b/hw/moxie/moxiesim.c @@ -103,7 +103,6 @@ static void moxiesim_init(MachineState *machine) { MoxieCPU *cpu = NULL; ram_addr_t ram_size = machine->ram_size; - const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_filename = machine->initrd_filename; @@ -115,10 +114,7 @@ static void moxiesim_init(MachineState *machine) LoaderParams loader_params; /* Init CPUs. */ - if (cpu_model == NULL) { - cpu_model = "MoxieLite"; - } - cpu = MOXIE_CPU(cpu_generic_init(TYPE_MOXIE_CPU, cpu_model)); + cpu = MOXIE_CPU(cpu_create(machine->cpu_type)); env = &cpu->env; qemu_register_reset(main_cpu_reset, cpu); @@ -150,6 +146,7 @@ static void moxiesim_machine_init(MachineClass *mc) mc->desc = "Moxie simulator platform"; mc->init = moxiesim_init; mc->is_default = 1; + mc->default_cpu_type = MOXIE_CPU_TYPE_NAME("MoxieLite"); } DEFINE_MACHINE("moxiesim", moxiesim_machine_init) |