All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Alexander Graf <agraf@suse.de>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Fabien Chouteau <chouteau@adacore.com>
Subject: Re: [Qemu-devel] [PATCH] PPC: mac newworld: fix cpu NIP reset value
Date: Thu, 04 Apr 2013 21:06:58 +0200	[thread overview]
Message-ID: <515DCF52.50304@suse.de> (raw)
In-Reply-To: <1365094053-1635-1-git-send-email-agraf@suse.de>

Am 04.04.2013 18:47, schrieb Alexander Graf:
> On -M mac99, we can run 970 CPUs. However, these CPUs define the initial
> instruction pointer they start execution at as part of their bootup protocol,
> so effectively it's up to the board to decide where they start.
> 
> 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.
> 
> Set the initial IP to something reasonable for -M mac99.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
>  hw/ppc/mac_newworld.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> 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 = opaque;
>  
>      cpu_reset(CPU(cpu));
> +    /* 970 CPUs want to get their initial IP as part of their boot protocol */
> +    cpu->env.nip = PROM_ADDR + 0x100;
>  }
>  
>  /* 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

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-04-04 19:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 16:47 [Qemu-devel] [PATCH] PPC: mac newworld: fix cpu NIP reset value Alexander Graf
2013-04-04 19:06 ` Andreas Färber [this message]
2013-04-04 22:25   ` Alexander Graf
2013-04-05  9:09 ` Fabien Chouteau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515DCF52.50304@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=chouteau@adacore.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.