public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	"Leif Lindholm" <leif.lindholm@linaro.org>,
	"Jan Dąbroś" <jsd@semihalf.com>,
	"Grzegorz Jaszczyk" <jaz@semihalf.com>,
	"Kostya Porotchkin" <kostap@marvell.com>,
	"Jici Gao" <Jici.Gao@arm.com>,
	"Rebecca Cran" <rebecca@bluestop.org>,
	"Mark Kettenis" <kettenis@jive.eu>
Subject: Re: [edk2-platforms: PATCH v2 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation
Date: Fri, 24 May 2019 17:25:14 +0200	[thread overview]
Message-ID: <CAKv+Gu8Edh40jb4TCb1uSVQX0aQgtVL-Mk0L4boeyd+1UrHWLg@mail.gmail.com> (raw)
In-Reply-To: <CAPv3WKfEhQRmqpXed8h5O7+x81CtMvpEcSjvdGVqbFHurbSL+w@mail.gmail.com>

On Fri, 24 May 2019 at 16:28, Marcin Wojtas <mw@semihalf.com> wrote:
>
> pt., 24 maj 2019 o 15:08 Ard Biesheuvel <ard.biesheuvel@linaro.org> napisał(a):
> >
> > On Fri, 24 May 2019 at 15:03, Marcin Wojtas <mw@semihalf.com> wrote:
> > >
> > > pt., 24 maj 2019 o 14:50 Ard Biesheuvel <ard.biesheuvel@linaro.org> napisał(a):
> > > >
> > > > On Mon, 20 May 2019 at 17:27, Marcin Wojtas <mw@semihalf.com> wrote:
> > > > >
> > > > > From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > > > >
> > > > > Implement a special version of PciExpressLib that takes the quirky
> > > > > nature of the Synopsys Designware PCIe IP into account. In particular,
> > > > > we need to ignore config space accesses to all devices on the first
> > > > > bus except device 0, because the broadcast nature of type 0 configuration
> > > > > cycles will result in whatever device is in the slot to appear at each
> > > > > of the 32 device positions.
> > > > >
> > > >
> > > > I never bothered to implement multisegment support for this SoC, since
> > > > MacchiatoBin has only one segment wired up, but since your interest is
> > > > in generic support, it might make sense to drop this patch and
> > > > implement PciSegmentLib instead (without depending on any of the other
> > > > library classes that the generic PciExpressLib depends on)
> > > >
> > >
> > > This was (and still is) my plan, but I've been having some serious
> > > time shortages for extra development. In order not to postpone this
> > > support any longer I prefer to get merged, what I have and possibly
> > > rework on top.
> > >
> > > About depending on a generic PciExpressLib - do you mean I can filter
> > > out devices from bus0 in PciSegmentLib?
> > >
> >
> > Yes, please look at Silicon/Socionext/SynQuacer/Library/SynQuacerPciSegmentLib
> >
> > If you follow the same approach, you no longer need PciLib or
> > PciExpressLib, it is all flattened into PciSegmentLib.
>
> For PciLib I use MdePkg implementation, but if that could be dropped
> that's good. I saw your library and it would be perfect for reusing on
> Armada, with one difference: PciSegmentLibGetConfigBase.
>
> 1. As a first step I could reuse Synquacer library using single base
> in PciSegmentLibGetConfigBase (PcdPciExpressBaseAddress) as a stub,
> for extending later.
>
> 2. Afterwards (i.e. in some next patchset) I'd like to use my board
> description infrastructure for obtaining config space base addresses.
> How about following solution:
> - add PciSegmentLib constructor routine, where I'd create a global
> array with config space addesses
> - add dispatching for it in PciSegmentLibGetConfigBase?
>

This sounds like a reasonable approach, yes.


> Looking forward to your feedback. Other than that - do you have any
> remarks to the rest of the patches in v2?
>

The rest looks fine.

  reply	other threads:[~2019-05-24 15:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 15:27 [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 01/14] Marvell/Library: MvGpioLib: Extend GPIO pin description Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 03/14] Marvell/Library: ArmadaBoardDescLib: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 04/14] Marvell/Armada7k8k: Extend board description libraries with PCIE Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 05/14] Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation Marcin Wojtas
2019-05-24 12:50   ` Ard Biesheuvel
2019-05-24 13:03     ` Marcin Wojtas
2019-05-24 13:08       ` Ard Biesheuvel
2019-05-24 14:28         ` Marcin Wojtas
2019-05-24 15:25           ` Ard Biesheuvel [this message]
2019-05-24 15:32             ` Leif Lindholm
2019-05-24 15:43               ` Marcin Wojtas
2019-05-24 15:46                 ` Ard Biesheuvel
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 08/14] Marvell/Armada7k8k: Enable PCIE support Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 09/14] Marvell/Armada80x0McBin: Enable ACPI " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 10/14] Marvell/Armada80x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 11/14] Marvell/Armada70x0Db: " Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 12/14] Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 13/14] Marvell/Armada7k8k: Remove duplication in .dsc files Marcin Wojtas
2019-05-20 15:27 ` [edk2-platforms: PATCH v2 14/14] Marvell/Armada7k8: Add 'acpiview' shell command to build Marcin Wojtas
2019-05-23 13:27 ` [edk2-platforms: PATCH v2 00/14] Armada7k8k PCIE support Mark Kettenis
2019-05-23 14:14   ` Leif Lindholm
2019-05-23 18:01     ` kettenis
2019-05-23 18:13       ` Ard Biesheuvel
2019-05-23 20:11         ` Leif Lindholm
2019-05-23 20:24           ` Ard Biesheuvel
2019-05-24 13:08             ` Marcin Wojtas
2019-05-24 13:12               ` Ard Biesheuvel
2019-05-24 13:13                 ` Marcin Wojtas
2019-05-24 22:16         ` mark.kettenis
2019-05-25  9:47           ` Ard Biesheuvel

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-list 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=CAKv+Gu8Edh40jb4TCb1uSVQX0aQgtVL-Mk0L4boeyd+1UrHWLg@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /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