From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VI-0000n7-De for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3VG-0000lw-KQ for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55344 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VG-0000lE-Ek for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:06 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 6 May 2012 17:34:39 +0200 Message-Id: <1336318514-30906-40-git-send-email-afaerber@suse.de> In-Reply-To: <1336318514-30906-1-git-send-email-afaerber@suse.de> References: <1336318514-30906-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 for-next 39/74] r2d: Use cpu_sh4_init() to obtain SuperHCPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori Needed for main_cpu_reset(). Signed-off-by: Andreas F=C3=A4rber --- hw/r2d.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/r2d.c b/hw/r2d.c index c55de01..1bd8df6 100644 --- a/hw/r2d.c +++ b/hw/r2d.c @@ -224,6 +224,7 @@ static void r2d_init(ram_addr_t ram_size, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { + SuperHCPU *cpu; CPUSH4State *env; ResetData *reset_info; struct SH7750State *s; @@ -235,14 +236,17 @@ static void r2d_init(ram_addr_t ram_size, SysBusDevice *busdev; MemoryRegion *address_space_mem =3D get_system_memory(); =20 - if (!cpu_model) + if (cpu_model =3D=3D NULL) { cpu_model =3D "SH7751R"; + } =20 - env =3D cpu_init(cpu_model); - if (!env) { + cpu =3D cpu_sh4_init(cpu_model); + if (cpu =3D=3D NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env =3D &cpu->env; + reset_info =3D g_malloc0(sizeof(ResetData)); reset_info->env =3D env; reset_info->vector =3D env->pc; --=20 1.7.7