From patchwork Tue Jun 5 01:22:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 162973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 38030B6F77 for ; Tue, 5 Jun 2012 13:35:13 +1000 (EST) Received: from localhost ([::1]:35667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiW4-000473-H6 for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2012 21:25:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiVI-0003KD-U4 for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:24:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbiVH-0008Mg-5Y for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:24:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52748 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiVG-0008MG-Uv for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:24:11 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id D5E5F8738D for ; Tue, 5 Jun 2012 03:24:09 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 5 Jun 2012 03:22:14 +0200 Message-Id: <1338859366-20689-43-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1338859366-20689-1-git-send-email-afaerber@suse.de> References: <1338859366-20689-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 42/74] mips_mipssim: Use cpu_mips_init() to obtain MIPSCPU X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Needed for main_cpu_reset(). Signed-off-by: Andreas Färber --- hw/mips_mipssim.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c index 1ea7b58..7c510da 100644 --- a/hw/mips_mipssim.c +++ b/hw/mips_mipssim.c @@ -140,6 +140,7 @@ mips_mipssim_init (ram_addr_t ram_size, MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *bios = g_new(MemoryRegion, 1); + MIPSCPU *cpu; CPUMIPSState *env; ResetData *reset_info; int bios_size; @@ -152,11 +153,13 @@ mips_mipssim_init (ram_addr_t ram_size, cpu_model = "24Kf"; #endif } - env = cpu_init(cpu_model); - if (!env) { + cpu = cpu_mips_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env = &cpu->env; + reset_info = g_malloc0(sizeof(ResetData)); reset_info->env = env; reset_info->vector = env->active_tc.PC;