From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNpVj-0003RK-SU for qemu-devel@nongnu.org; Thu, 04 Apr 2013 15:07:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNpVe-0004Kd-8I for qemu-devel@nongnu.org; Thu, 04 Apr 2013 15:07:47 -0400 Message-ID: <515DCF52.50304@suse.de> Date: Thu, 04 Apr 2013 21:06:58 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1365094053-1635-1-git-send-email-agraf@suse.de> In-Reply-To: <1365094053-1635-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] PPC: mac newworld: fix cpu NIP reset value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-ppc@nongnu.org" , qemu-devel , Fabien Chouteau Am 04.04.2013 18:47, schrieb Alexander Graf: > On -M mac99, we can run 970 CPUs. However, these CPUs define the initia= l > instruction pointer they start execution at as part of their bootup pro= tocol, > so effectively it's up to the board to decide where they start. >=20 > This went unnoticed, because they used to boot at the same location our= flash > was mapped to, but due to the recent reset changes our 970 CPUs want to= reset > to 0x100 now, which is always a 0 instruction. >=20 > Set the initial IP to something reasonable for -M mac99. >=20 > Signed-off-by: Alexander Graf > --- > hw/ppc/mac_newworld.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) >=20 > diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c > index a08a6b2..ca7d98f 100644 > --- a/hw/ppc/mac_newworld.c > +++ b/hw/ppc/mac_newworld.c > @@ -126,6 +126,8 @@ static void ppc_core99_reset(void *opaque) > PowerPCCPU *cpu =3D opaque; > =20 > cpu_reset(CPU(cpu)); > + /* 970 CPUs want to get their initial IP as part of their boot pro= tocol */ > + cpu->env.nip =3D PROM_ADDR + 0x100; > } > =20 > /* PowerPC Mac99 hardware initialisation */ That is lacking a restriction to 970... :) There's probably some -cpu to make it start from -4 instead, no? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg