qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: David Gibson <david@gibson.dropbear.id.au>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH] hw/ppc/ppc400_bamboo: Set dcr-base correctly when creating UIC
Date: Mon, 11 Jan 2021 21:10:20 +0000	[thread overview]
Message-ID: <CAFEAcA-npFT=-ZQevChci7Ru=ZnBL+mKPP7371EJnxqKjACixg@mail.gmail.com> (raw)
In-Reply-To: <alpine.LMD.2.03.2101112015580.7627@eik.bme.hu>

On Mon, 11 Jan 2021 at 19:19, BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> On Mon, 11 Jan 2021, Peter Maydell wrote:
> > In commit 0270d74ef8862350 we switched from ppcuic_init() to directly
> > creating the UIC device, but I missed that the Bamboo's UIC has a
> > non-standard DCR base register value (0xc0 rather than the default
> > of 0x30). This made Linux panic early in the boot process.
> >
> > Specify the correct dcr-base property value when creating the UIC.
> >
> > Fixes: 0270d74ef8862350
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> Reported-by?

Yes, sorry --

Reported-by: Nathan Chancellor <natechancellor@gmail.com>

> > diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
> > index b156bcb9990..2c7a578ba73 100644
> > --- a/hw/ppc/ppc440_bamboo.c
> > +++ b/hw/ppc/ppc440_bamboo.c
> > @@ -198,6 +198,7 @@ static void bamboo_init(MachineState *machine)
> >     uicdev = qdev_new(TYPE_PPC_UIC);
> >     uicsbd = SYS_BUS_DEVICE(uicdev);
> >
> > +    qdev_prop_set_uint32(uicdev, "dcr-base", 0xc0);
>
> This fixes Bamboo but not virtex and 405 which seem to have same problem
> as I've just shown in replies to those patches. So maybe this is better
> fixed by changing default value in ppc-uic.c to 0xc0 then. You say in
> commit message that 0xc0 is non-standard but most boards seem to use that
> than the default you have now. I don't know if there's a standard by the
> way or every CPU implementation just puts DCRs where they want.

My intention when I wrote the code was just to set the default value of
the property on the device to the value that most of the users seemed to
need -- I don't know if there's any actual standard. It sounds
like the actual bug is that I put in the wrong default value by
accident.

For the QEMU boards we have with UICs, they all use 0xc0 --
the only special case is sam460ex because it has four UICs,
so they go at 0xc0, 0xd0, 0xe0, 0xf0.

New patch coming up that fixes the default property value.

thanks
-- PMM


      reply	other threads:[~2021-01-11 21:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 17:16 [PATCH] hw/ppc/ppc400_bamboo: Set dcr-base correctly when creating UIC Peter Maydell
2021-01-11 19:19 ` BALATON Zoltan
2021-01-11 21:10   ` Peter Maydell [this message]

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='CAFEAcA-npFT=-ZQevChci7Ru=ZnBL+mKPP7371EJnxqKjACixg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --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 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).