From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiUi-0001nz-Rs for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbiUg-00084v-Ng for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52658 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbiUg-00084d-Hn for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:23:34 -0400 Received: from relay1.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 74AD8914CD for ; Tue, 5 Jun 2012 03:23:33 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 5 Jun 2012 03:21:36 +0200 Message-Id: <1338859366-20689-5-git-send-email-afaerber@suse.de> 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 04/74] armv7m: Use cpu_arm_init() to obtain ARMCPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Needed for armv7m_reset(). Signed-off-by: Andreas F=C3=A4rber Acked-by: Peter Maydell --- hw/armv7m.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/armv7m.c b/hw/armv7m.c index 4aac076..4e5971c 100644 --- a/hw/armv7m.c +++ b/hw/armv7m.c @@ -160,6 +160,7 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_mem= , int flash_size, int sram_size, const char *kernel_filename, const char *cpu_model= ) { + ARMCPU *cpu; CPUARMState *env; DeviceState *nvic; /* FIXME: make this local state. */ @@ -177,13 +178,15 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_m= em, flash_size *=3D 1024; sram_size *=3D 1024; =20 - if (!cpu_model) + if (cpu_model =3D=3D NULL) { cpu_model =3D "cortex-m3"; - env =3D cpu_init(cpu_model); - if (!env) { + } + cpu =3D cpu_arm_init(cpu_model); + if (cpu =3D=3D NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env =3D &cpu->env; =20 #if 0 /* > 32Mb SRAM gets complicated because it overlaps the bitband area= . --=20 1.7.7