From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Joel Stanley" <joel@jms.id.au>
Cc: "Cédric Le Goater" <clg@kaod.org>,
"Frédéric Barrat" <fbarrat@linux.ibm.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] ppc/pnv: Add QME region for P10
Date: Wed, 12 Jul 2023 12:21:13 +1000 [thread overview]
Message-ID: <CTZU2K7ZUGT5.1OWRLPBN4PE1O@wheely> (raw)
In-Reply-To: <CACPK8Xd_qdxy1Z28X70fcDE9xOtBORuqRD23d6VmAOuAKy=_LQ@mail.gmail.com>
On Mon Jul 10, 2023 at 10:25 AM AEST, Joel Stanley wrote:
> On Sat, 8 Jul 2023 at 01:17, Nicholas Piggin <npiggin@gmail.com> wrote:
>
> > > --- a/include/hw/ppc/pnv_xscom.h
> > > +++ b/include/hw/ppc/pnv_xscom.h
> > > @@ -127,6 +127,17 @@ struct PnvXScomInterfaceClass {
> > > #define PNV10_XSCOM_EC(proc) \
> > > ((0x2 << 16) | ((1 << (3 - (proc))) << 12))
> > >
> > > +#define PNV10_XSCOM_QME(chiplet) \
> > > + (PNV10_XSCOM_EQ(chiplet) | (0xE << 16))
> > > +
> > > +/*
> > > + * Make the region larger by 0x1000 (instead of starting at an offset) so the
> > > + * modelled addresses start from 0
> > > + */
> > > +#define PNV10_XSCOM_QME_BASE(core) \
> > > + ((uint64_t) PNV10_XSCOM_QME(PNV10_XSCOM_EQ_CHIPLET(core)))
> > > +#define PNV10_XSCOM_QME_SIZE (0x8000 + 0x1000)
> >
> > I couldn't work out this comment.
>
> I was trying to describe why we have the + 0x1000.
>
> Each core sets a bit in the xscom address space, with the first core
> setting bit 12, second bit 13, etc. So there's actually no registers
> at PNV10_XSCOM_QME_BASE, but so the addressing is easier to follow, I
> chose to start the base where we do, and make the region 0x1000
> bigger.
>
> That was my understanding at least.
Ah okay that does make sense. Because you have the core number in the
address and core number encoding is one-hot, you don't start at zero
or end at 0x4000.
It makes sense after you stare at QME model, but maybe could comment
the scheme briefly there... and now I think about it, I wonder if QME
can actually do broadcast ops to the cores. We don't use that in
skiboot but ISTR it could be done, so size might be 0x10000.
Thanks,
Nick
next prev parent reply other threads:[~2023-07-12 2:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 7:12 [PATCH v2] ppc/pnv: Add QME region for P10 Joel Stanley
2023-07-07 7:30 ` Cédric Le Goater
2023-07-07 7:55 ` Joel Stanley
2023-07-07 11:08 ` Daniel Henrique Barboza
2023-07-08 1:16 ` Nicholas Piggin
2023-07-10 0:25 ` Joel Stanley
2023-07-12 2:21 ` Nicholas Piggin [this message]
2023-07-10 9:32 ` Daniel Henrique Barboza
2023-07-10 9:33 ` Daniel Henrique Barboza
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=CTZU2K7ZUGT5.1OWRLPBN4PE1O@wheely \
--to=npiggin@gmail.com \
--cc=clg@kaod.org \
--cc=fbarrat@linux.ibm.com \
--cc=joel@jms.id.au \
--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).