@@ -76,7 +76,7 @@ static void
petalogix_ml605_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
- const char *cpu_model = args->cpu_model;
+ Error *err = NULL;
MemoryRegion *address_space_mem = get_system_memory();
DeviceState *dev, *dma, *eth0;
Object *ds, *cs;
@@ -91,10 +91,13 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
qemu_irq irq[32], *cpu_irq;
/* init CPUs */
- if (cpu_model == NULL) {
- cpu_model = "microblaze";
+ cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ object_property_set_bool(OBJECT(cpu), true, "realized", &err);
+ if (err) {
+ error_report("%s", error_get_pretty(err));
+ exit(EXIT_FAILURE);
}
- cpu = cpu_mb_init(cpu_model);
+
env = &cpu->env;
/* Attach emulated BRAM through the LMB. */