diff options
author | Igor Mammedov <imammedo@redhat.com> | 2017-10-05 15:50:43 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-10-27 16:03:54 +0200 |
commit | 201c160e943327305af61e96915bbd982162a758 (patch) | |
tree | a4f8fa181db5ce1c3a5fedd86706a9e74073846e /hw/lm32 | |
parent | c6678108ba2c427d2cac19a5e1ec4c5c58e10fcb (diff) | |
download | qemu-201c160e943327305af61e96915bbd982162a758.zip qemu-201c160e943327305af61e96915bbd982162a758.tar.gz qemu-201c160e943327305af61e96915bbd982162a758.tar.bz2 |
lm32: milkymist: use generic cpu_model parsing
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Michael Walle <michael@walle.cc>
Message-Id: <1507211474-188400-10-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/lm32')
-rw-r--r-- | hw/lm32/milkymist.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c index 4db4d2d..d4e765f 100644 --- a/hw/lm32/milkymist.c +++ b/hw/lm32/milkymist.c @@ -80,7 +80,6 @@ static void main_cpu_reset(void *opaque) static void milkymist_init(MachineState *machine) { - 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; @@ -108,10 +107,7 @@ milkymist_init(MachineState *machine) reset_info = g_malloc0(sizeof(ResetInfo)); - if (cpu_model == NULL) { - cpu_model = "lm32-full"; - } - cpu = LM32_CPU(cpu_generic_init(TYPE_LM32_CPU, cpu_model)); + cpu = LM32_CPU(cpu_create(machine->cpu_type)); env = &cpu->env; reset_info->cpu = cpu; @@ -216,6 +212,7 @@ static void milkymist_machine_init(MachineClass *mc) mc->desc = "Milkymist One"; mc->init = milkymist_init; mc->is_default = 0; + mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full"); } DEFINE_MACHINE("milkymist", milkymist_machine_init) |