Received: from eggs.gnu.org ([2001:4830:134:3::10]:54259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywj7R-0005M6-Q7 for qemu-devel@nongnu.org; Sun, 24 May 2015 23:32:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ywj7O-0005Tx-KC for qemu-devel@nongnu.org; Sun, 24 May 2015 23:32:01 -0400 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]:33545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywj7O-0005Sn-Dv for qemu-devel@nongnu.org; Sun, 24 May 2015 23:31:58 -0400 Received: by padbw4 with SMTP id bw4so61935853pad.0 for ; Sun, 24 May 2015 20:31:57 -0700 (PDT) From: Peter Crosthwaite Date: Sun, 24 May 2015 20:31:40 -0700 Message-Id: <1432524700-5058-1-git-send-email-crosthwaite.peter@gmail.com> Subject: [Qemu-devel] [PATCH] microblaze: s3adsp: Instantiate CPU using QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite , alistair.francis@xilinx.com, afaerber@suse.de, egdar.iglesias@gmail.com Instantiate and realise the CPU directly, rather than using cpu_mb_init. Microblazes cpu_model argument is a dummy so remove the default cpu_model set logic. Signed-off-by: Peter Crosthwaite --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index 84f6e74..4dbbd1e 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -62,7 +62,6 @@ static void petalogix_s3adsp1800_init(MachineState *machine) { ram_addr_t ram_size = machine->ram_size; - const char *cpu_model = machine->cpu_model; DeviceState *dev; MicroBlazeCPU *cpu; DriveInfo *dinfo; @@ -73,11 +72,8 @@ petalogix_s3adsp1800_init(MachineState *machine) qemu_irq irq[32]; MemoryRegion *sysmem = get_system_memory(); - /* 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, -- 1.9.1