From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAGHt-0001wG-54 for qemu-devel@nongnu.org; Mon, 03 Feb 2014 04:58:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAGHo-00037c-BM for qemu-devel@nongnu.org; Mon, 03 Feb 2014 04:57:57 -0500 Received: from mail-qa0-x229.google.com ([2607:f8b0:400d:c00::229]:32943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAGHo-00037V-6N for qemu-devel@nongnu.org; Mon, 03 Feb 2014 04:57:52 -0500 Received: by mail-qa0-f41.google.com with SMTP id w8so9834562qac.0 for ; Mon, 03 Feb 2014 01:57:51 -0800 (PST) From: "Edgar E. Iglesias" Date: Mon, 3 Feb 2014 19:44:49 +1000 Message-Id: <1391420690-23745-22-git-send-email-edgar.iglesias@gmail.com> In-Reply-To: <1391420690-23745-1-git-send-email-edgar.iglesias@gmail.com> References: <1391420690-23745-1-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v4 21/22] petalogix-ml605: Create the CPU with object_new() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, blauwirbel@gmail.com, aliguori@amazon.com, pcrost@xilinx.com, pbonzini@redhat.com, afaerber@suse.de, aurelien@aurel32.net, rth@twiddle.net From: "Edgar E. Iglesias" This is to allow future patches to set properties before cpu::realize(). Reviewed-by: Andreas Färber Signed-off-by: Edgar E. Iglesias --- hw/microblaze/petalogix_ml605_mmu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index 1a87756..37cbbfd 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", -- 1.8.1.2