From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
"Greg Kurz" <groug@kaod.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH v2] pnv: add a physical mapping array describing MMIO ranges in each chip
Date: Wed, 13 Jun 2018 10:47:52 +1000 [thread overview]
Message-ID: <20180613004752.GN30690@umbus.fritz.box> (raw)
In-Reply-To: <87436236-09f6-9ee0-dbe6-00f0147050dc@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 3157 bytes --]
On Tue, Jun 12, 2018 at 08:13:49AM +0200, Cédric Le Goater wrote:
> On 06/12/2018 07:58 AM, David Gibson wrote:
> > On Wed, Jun 06, 2018 at 09:04:10AM +0200, Cédric Le Goater wrote:
> >> On 06/06/2018 08:39 AM, David Gibson wrote:
> >>> On Wed, May 30, 2018 at 12:07:54PM +0200, Cédric Le Goater wrote:
> >>>> Based on previous work done in skiboot, the physical mapping array
> >>>> helps in calculating the MMIO ranges of each controller depending on
> >>>> the chip id and the chip type. This is will be particularly useful for
> >>>> the P9 models which use less the XSCOM bus and rely more on MMIOs.
> >>>>
> >>>> A link on the chip is now necessary to calculate MMIO BARs and
> >>>> sizes. This is why such a link is introduced in the PSIHB model.
> >>>
> >>> I think this message needs some work. This says what it's for, but
> >>> what actually *is* this array, and how does it work?
> >>
> >> OK. It is relatively simple: each controller has an entry defining its
> >> MMIO range.
> >>
> >>> The outside-core differences between POWER8 and POWER9 are substantial
> >>> enough that I'm wondering if pnvP8 and pnvP9 would be better off as
> >>> different machine types (sharing some routines, of course).
> >>
> >> yes and no. I have survived using a common PnvChip framework but
> >> it is true that I had to add P9 classes for each: LPC, PSI, OCC
> >> They are very similar but not enough. P9 uses much more MMIOs than
> >> P8 which still uses a lot of XSCOM. I haven't looked at PHB4.
> >
> > Well, it's certainly *possible* to use the same machine type, I'm just
> > not convinced it's a good idea. It seems kind of dodgy to me that so
> > many peripherals on the system change as a side-effect of setting the
> > cpu. Compare to how x86 works where cpu really does change the CPU,
> > plugging it into the same virtual "chipset". Different chipsets *are*
> > different machine types there (pc vs. q35).
>
> OK, I agree, and we can use a set of common routines to instantiate the
> different chipset models.
>
> So we would have a common pnv_init() routine to initialize the different
> 'powernv8' and 'powernv9' machines and the PnvChip typename would be a
> machine class attribute ?
Well.. that's one option. Usually for these things, it works out
better to instead of parameterizing big high-level routines like
pnv_init(), you have separate versions of those calling a combination
of case-specific and common routines as necessary.
Mostly it just comes down to what is simplest to implement for you, though.
> Nevertheless we would still need to introduce "a physical mapping array
> describing MMIO ranges" but we can start by differentiating the chipsets
> first.
Well, maybe. I'm wondering if you can more easily encapsulate the
information in that array in a top-level init routine, that calls
common helpers with different addresses / device types / whatever.
--
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:[~2018-06-13 0:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 10:07 [Qemu-devel] [PATCH v2] pnv: add a physical mapping array describing MMIO ranges in each chip Cédric Le Goater
2018-05-30 10:23 ` Greg Kurz
2018-06-06 6:13 ` Cédric Le Goater
2018-06-06 6:39 ` David Gibson
2018-06-06 7:04 ` Cédric Le Goater
2018-06-12 5:58 ` David Gibson
2018-06-12 6:13 ` Cédric Le Goater
2018-06-13 0:47 ` David Gibson [this message]
2018-06-13 7:03 ` Cédric Le Goater
2018-06-14 6:44 ` David Gibson
2018-06-14 7:16 ` Cédric Le Goater
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=20180613004752.GN30690@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=f4bug@amsat.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 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).