[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 28/40] unicore32: use generic cpu_model parsing
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 28/40] unicore32: use generic cpu_model parsing |
Date: |
Thu, 5 Oct 2017 15:51:02 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
CC: Guan Xuetao <address@hidden>
---
hw/unicore32/puv3.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index 504ea46..1b39cc0 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -112,7 +112,6 @@ static void puv3_load_kernel(const char *kernel_filename)
static void puv3_init(MachineState *machine)
{
ram_addr_t ram_size = machine->ram_size;
- const char *cpu_model = machine->cpu_model;
const char *kernel_filename = machine->kernel_filename;
const char *initrd_filename = machine->initrd_filename;
CPUUniCore32State *env;
@@ -123,11 +122,7 @@ static void puv3_init(MachineState *machine)
exit(1);
}
- if (!cpu_model) {
- cpu_model = "UniCore-II";
- }
-
- cpu = UNICORE32_CPU(cpu_generic_init(TYPE_UNICORE32_CPU, cpu_model));
+ cpu = UNICORE32_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
puv3_soc_init(env);
@@ -140,6 +135,7 @@ static void puv3_machine_init(MachineClass *mc)
mc->desc = "PKUnity Version-3 based on UniCore32";
mc->init = puv3_init;
mc->is_default = 1;
+ mc->default_cpu_type = UNICORE32_CPU_TYPE_NAME("UniCore-II");
}
DEFINE_MACHINE("puv3", puv3_machine_init)
--
2.7.4
- Re: [Qemu-devel] [PATCH v2 22/40] sh4: simplify superh_cpu_class_by_name(), (continued)
- [Qemu-devel] [PATCH v2 23/40] sh4: remove SuperHCPUClass::name field, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 20/40] sh4: shix: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 24/40] xtensa: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 21/40] sh4: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 25/40] xtensa: sim: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 26/40] xtensa: lx60/lx200/ml605/kc705: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 29/40] tricore: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 28/40] unicore32: use generic cpu_model parsing,
Igor Mammedov <=
- [Qemu-devel] [PATCH v2 27/40] unicore32: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 31/40] sparc: cleanup cpu type name composition, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 30/40] tricore: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 32/40] sparc: sun4u/sun4v/niagara: use generic cpu_model parsing, Igor Mammedov, 2017/10/05
- [Qemu-devel] [PATCH v2 33/40] sparc: sparc: use generic cpu_model parsing, Igor Mammedov, 2017/10/05