qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@penguinppc.org>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org, segher@kernel.crashing.org
Subject: Re: [Qemu-devel] [PATCH 2/2] target-ppc: fix interrupt vectors for MPC603 and e300
Date: Thu, 22 Apr 2010 12:40:05 -0700	[thread overview]
Message-ID: <i2ifb412d761004221240m15cc2e79o9730297cc8afd617@mail.gmail.com> (raw)
In-Reply-To: <4BCEF15B.7020204@suse.de>

On Wed, Apr 21, 2010 at 5:36 AM, Alexander Graf <agraf@suse.de> wrote:
> Thomas Monjalon wrote:
>> Alexander Graf wrote:
>>
>>>> --- a/target-ppc/translate_init.c
>>>> +++ b/target-ppc/translate_init.c
>>>> @@ -2853,7 +2853,16 @@ static void init_excp_603 (CPUPPCState *env)
>>>>     env->excp_vectors[POWERPC_EXCP_SMI]      = 0x00001400;
>>>>     env->hreset_excp_prefix = 0x00000000UL;
>>>>     /* Hardware reset vector */
>>>> -    env->hreset_vector = 0xFFFFFFFCUL;
>>>> +    env->hreset_vector = 0x00000100UL;
>>>>
>>> Are you 100% sure this is correct? IIRC the reset vector is dictated by the
>>> CPU initialization sequence, so there's no hardwired value here really.
>>>
>>
>> It is explained in [e300CORERM] at chapters 5.2.3, 5.5.1.1 and 8.3.3.
>> Clearly, the vector offset is 0x100 and the exception prefix can be 0 or
>> 0xFFF00000, depending of the MSR[IP] bit.
>>
>> So, yes, I'm sure the value of hreset_vector must be 0x100.
>> But hreset_excp_prefix can change. It could be another patch.
>>
>
> Interesting. That's different from 970.

Only Book E processors come out of reset with a PC of 0xfffffffc.
"Classic" PowerPC comes out with PC 0xfff00100 (the FFF part specified
by MSR[IP]).

970 may be a bad example in that it can't actually bring itself up --
it requires an external controller to configure it at power-up. So
whatever the external controller programs into the PC is where it
starts. I don't see any mention of an initial PC value in the 970 user
manuals.

Qemu ignores these details and pretends that all PowerPC start at
0xffffffc. As long as you have qemu-specific firmware that expects
this behavior, you're ok...

-Hollis

  parent reply	other threads:[~2010-04-22 19:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21  9:21 [Qemu-devel] [PATCH 0/2] some fixes for PPC e300 Thomas Monjalon
2010-04-21  9:21 ` [Qemu-devel] [PATCH 1/2] target-ppc: fix processor versions (PVR) for e300 Thomas Monjalon
2010-04-21  9:21 ` [Qemu-devel] [PATCH 2/2] target-ppc: fix interrupt vectors for MPC603 and e300 Thomas Monjalon
2010-04-21 10:14   ` Alexander Graf
2010-04-21 12:07     ` Thomas Monjalon
2010-04-21 12:36       ` Alexander Graf
2010-04-21 13:13         ` Thomas Monjalon
2010-04-22 19:40         ` Hollis Blanchard [this message]
2010-04-26 15:35           ` Segher Boessenkool
2010-04-26 15:02         ` Segher Boessenkool
2010-04-26 17:11           ` Blue Swirl
2010-05-02 14:19             ` Segher Boessenkool
2010-05-02 15:03               ` [Qemu-devel] VGA blank mode K D

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=i2ifb412d761004221240m15cc2e79o9730297cc8afd617@mail.gmail.com \
    --to=hollis@penguinppc.org \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=segher@kernel.crashing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).