From: David Gibson <david@gibson.dropbear.id.au>
To: Balamuruhan S <bala24@linux.ibm.com>
Cc: groug@kaod.org, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, clg@kaod.org
Subject: Re: [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes
Date: Wed, 20 Nov 2019 09:00:32 +1100 [thread overview]
Message-ID: <20191119220032.GV5582@umbus.fritz.box> (raw)
In-Reply-To: <20191119215618.GU5582@umbus.fritz.box>
[-- Attachment #1: Type: text/plain, Size: 2618 bytes --]
On Wed, Nov 20, 2019 at 08:56:18AM +1100, David Gibson wrote:
> On Tue, Nov 19, 2019 at 11:20:53PM +0530, Balamuruhan S wrote:
> > homer/occ sizes are calculated in skiboot with `(mask | 0xfffff) + 1`,
> > and from xscom access should return correct mask values instead of actual
> > sizes.
> >
> > Signed-off-by: Cédric Le Goater <clg@kaod.org>
> > Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
> > ---
> > hw/ppc/pnv_xscom.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c
> > index f01d788a65..cdd5fa356e 100644
> > --- a/hw/ppc/pnv_xscom.c
> > +++ b/hw/ppc/pnv_xscom.c
> > @@ -46,6 +46,10 @@
> > #define P9_PBA_BARMASK0 0x5012b04
> > #define P9_PBA_BARMASK2 0x5012b06
> >
> > +/* Mask to calculate Homer/Occ size */
> > +#define HOMER_SIZE_MASK 0x0000000000300000ull
> > +#define OCC_SIZE_MASK 0x0000000000700000ull
>
> Uuuhhhhh... AFAICT these defines have identical values to
> PNV_HOMER_SIZE and PNV_OCC_COMMON_AREA_SIZE, so I don't see what this
> patch is actually changing.
Oh, sorry, missed that the values were changed in 1/5. Would have
been easier to follow if the two patches were folded together, but
never mind. Applied.
>
>
> > static void xscom_complete(CPUState *cs, uint64_t hmer_bits)
> > {
> > /*
> > @@ -90,9 +94,8 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba)
> > return PNV_HOMER_BASE(chip);
> >
> > case P9_PBA_BARMASK0: /* P9 homer region size */
> > - return PNV9_HOMER_SIZE;
> > case P8_PBA_BARMASK0: /* P8 homer region size */
> > - return PNV_HOMER_SIZE;
> > + return HOMER_SIZE_MASK;
> >
> > case P9_PBA_BAR2: /* P9 occ common area */
> > return PNV9_OCC_COMMON_AREA(chip);
> > @@ -100,9 +103,8 @@ static uint64_t xscom_read_default(PnvChip *chip, uint32_t pcba)
> > return PNV_OCC_COMMON_AREA(chip);
> >
> > case P9_PBA_BARMASK2: /* P9 occ common area size */
> > - return PNV9_OCC_COMMON_AREA_SIZE;
> > case P8_PBA_BARMASK2: /* P8 occ common area size */
> > - return PNV_OCC_COMMON_AREA_SIZE;
> > + return OCC_SIZE_MASK;
> >
> > case 0x1010c00: /* PIBAM FIR */
> > case 0x1010c03: /* PIBAM FIR MASK */
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-11-19 22:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 17:50 [PATCH 0/5] ppc/pnv: fix Homer/Occ mappings on multichip systems Balamuruhan S
2019-11-19 17:50 ` [PATCH 1/5] hw/ppc/pnv: incorrect homer and occ common area size Balamuruhan S
2019-11-20 7:13 ` Cédric Le Goater
2019-11-21 8:32 ` Balamuruhan S
2019-11-19 17:50 ` [PATCH 2/5] hw/ppc/pnv_xscom: PBA bar mask values are incorrect with homer/occ sizes Balamuruhan S
2019-11-19 21:56 ` David Gibson
2019-11-19 22:00 ` David Gibson [this message]
2019-11-19 22:02 ` David Gibson
2019-11-20 3:01 ` Balamuruhan S
2019-11-20 3:16 ` Balamuruhan S
2019-11-20 7:59 ` Greg Kurz
2019-11-21 8:34 ` Balamuruhan S
2019-11-20 7:18 ` Cédric Le Goater
2019-11-21 8:37 ` Balamuruhan S
2019-11-19 17:50 ` [PATCH 3/5] hw/ppc/pnv_xscom: Power8 occ common area is in PBA BAR 3 Balamuruhan S
2019-11-20 7:20 ` Cédric Le Goater
2019-11-21 8:39 ` Balamuruhan S
2019-11-19 17:50 ` [PATCH 4/5] hw/ppc/pnv_xscom: occ common area to be mapped only once Balamuruhan S
2019-11-20 7:30 ` Cédric Le Goater
2019-11-21 8:49 ` Balamuruhan S
2019-11-19 17:50 ` [PATCH 5/5] hw/ppc/pnv_xscom: add PBA BARs for Power8 slw image Balamuruhan S
2019-11-20 7:31 ` Cédric Le Goater
2019-11-21 8:50 ` Balamuruhan S
2019-11-20 7:46 ` [PATCH 0/5] ppc/pnv: fix Homer/Occ mappings on multichip systems Cédric Le Goater
2019-11-21 9:11 ` Balamuruhan S
2019-11-21 10:00 ` Cédric Le Goater
2019-11-22 16:41 ` Balamuruhan S
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=20191119220032.GV5582@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=bala24@linux.ibm.com \
--cc=clg@kaod.org \
--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 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.