[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v2 05/24] ppc: mac_newworld: use generic cpu_model par
From: |
Igor Mammedov |
Subject: |
[Qemu-ppc] [PATCH v2 05/24] ppc: mac_newworld: use generic cpu_model parsing |
Date: |
Mon, 9 Oct 2017 21:50:52 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: David Gibson <address@hidden>
---
hw/ppc/mac_newworld.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 6d0ace2..3fa7c42 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -174,16 +174,8 @@ static void ppc_core99_init(MachineState *machine)
linux_boot = (kernel_filename != NULL);
/* init CPUs */
- if (machine->cpu_model == NULL) {
-#ifdef TARGET_PPC64
- machine->cpu_model = "970fx";
-#else
- machine->cpu_model = "G4";
-#endif
- }
for (i = 0; i < smp_cpus; i++) {
- cpu = POWERPC_CPU(cpu_generic_init(TYPE_POWERPC_CPU,
- machine->cpu_model));
+ cpu = POWERPC_CPU(cpu_create(machine->cpu_type));
env = &cpu->env;
/* Set time-base frequency to 100 Mhz */
@@ -520,6 +512,11 @@ static void core99_machine_class_init(ObjectClass *oc,
void *data)
mc->max_cpus = MAX_CPUS;
mc->default_boot_order = "cd";
mc->kvm_type = core99_kvm_type;
+#ifdef TARGET_PPC64
+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("970fx_v3.1");
+#else
+ mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("7400_v2.9");
+#endif
}
static const TypeInfo core99_machine_info = {
--
2.7.4
- [Qemu-ppc] [PATCH v2 00/24] generalize parsing of cpu_model (part 3/PPC), Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 01/24] qom: update doc comment for type_register[_static](), Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 03/24] qom: add helper macro DEFINE_TYPES(), Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 04/24] ppc: mpc8544ds/e500plat: use generic cpu_model parsing, Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 02/24] qom: introduce type_register_static_array(), Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 05/24] ppc: mac_newworld: use generic cpu_model parsing,
Igor Mammedov <=
- [Qemu-ppc] [PATCH v2 06/24] ppc: mac_oldworld: use generic cpu_model parsing, Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 08/24] ppc: replace cpu_model with cpu_type on ref405ep, taihu boards, Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 07/24] ppc: bamboo: use generic cpu_model parsing, Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 10/24] ppc: 40p/prep: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 11/24] ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model(), Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 09/24] ppc: virtex-ml507: replace cpu_model with cpu_type, Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 12/24] ppc: move '-cpu foo, compat=xxx' parsing into ppc_cpu_parse_featurestr(), Igor Mammedov, 2017/10/09
- [Qemu-ppc] [PATCH v2 13/24] ppc: spapr: define core types statically, Igor Mammedov, 2017/10/09