summaryrefslogtreecommitdiffstats
path: root/hw/microblaze
diff options
context:
space:
mode:
authorEdgar E. Iglesias2013-12-16 03:44:20 +0100
committerEdgar E. Iglesias2014-02-11 13:57:57 +0100
commita4550442b947d2c2b346bd2efc8fe3da16425f4d (patch)
tree0b6b459e5e7b96ff204f71436353932b5a8f301b /hw/microblaze
parentexec: Make cpu_memory_rw_debug use the CPUs AS (diff)
downloadqemu-a4550442b947d2c2b346bd2efc8fe3da16425f4d.tar.gz
qemu-a4550442b947d2c2b346bd2efc8fe3da16425f4d.tar.xz
qemu-a4550442b947d2c2b346bd2efc8fe3da16425f4d.zip
petalogix-ml605: Create the CPU with object_new()
This is to allow future patches to set properties before cpu::realize(). Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'hw/microblaze')
-rw-r--r--hw/microblaze/petalogix_ml605_mmu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index 1a87756246..37cbbfd592 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -75,7 +75,6 @@ static void
petalogix_ml605_init(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
- const char *cpu_model = args->cpu_model;
MemoryRegion *address_space_mem = get_system_memory();
DeviceState *dev, *dma, *eth0;
Object *ds, *cs;
@@ -89,10 +88,8 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
qemu_irq irq[32];
/* init CPUs */
- if (cpu_model == NULL) {
- cpu_model = "microblaze";
- }
- cpu = cpu_mb_init(cpu_model);
+ cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
+ object_property_set_bool(OBJECT(cpu), true, "realized", &error_abort);
/* Attach emulated BRAM through the LMB. */
memory_region_init_ram(phys_lmb_bram, NULL, "petalogix_ml605.lmb_bram",