public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: chandni cherukuri <ch.chandni@gmail.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	khasim.mohammed@arm.com,  Sami Mujawar <Sami.Mujawar@arm.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Leif Lindholm <leif@nuviainc.com>,
	Pierre <pierre.gondois@arm.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 07/11] Platform/ARM/Morello: Port PCI Express library
Date: Fri, 10 Dec 2021 11:41:58 +0100	[thread overview]
Message-ID: <CAMj1kXFfmG7+rS8iiOiEBXDAc9B0y5ejfhJ84hm5z8m_HMkS3A@mail.gmail.com> (raw)
In-Reply-To: <CABG6B_5tNLY_Bh7S=3oCJsx_0J2AKKmgynASBDjX3r9FBNNWhg@mail.gmail.com>

On Thu, 9 Dec 2021 at 13:30, chandni cherukuri <ch.chandni@gmail.com> wrote:
>
> Hi Ard, Leif, Sami, Pierre,
>
> For Morello platform, we created two custom libraries based on the
> below two native libraries:
> -          https://github.com/tianocore/edk2/tree/master/MdePkg/Library/BasePciSegmentLibPci
> -          https://github.com/tianocore/edk2/tree/master/MdePkg/Library/BasePciExpressLib
>
> because of the following reasons.
> 1.       In Morello platform, the ECAM region of the two root ports
> are placed in non-contiguous memory as per the memory map architecture
> of the Morello platform. The native PCI Express Library expects both
> the ECAM regions for all the root ports to be contiguous.

Do you mean root ports or host bridges? If root ports don't share the
MMIO resource windows provided by the respective host bridges, they
are really different host bridges and should be modeled as such.

Note that the Cadence and Synopsys IP usually does not implement a
root port at all, and gets away with this because it only implements a
single link.

> 2.       IORT and kernel currently require each root port to be in a
> separate segment. You can refer to the code for more details -
>

Please take a look at the SynQuaecer platform for inspiration. That
platform is very similar in this respect.

 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/acpi/arm64/iort.c#n307.
> The native PCI Segment Library supports only a single segment.
>
> Because of these reasons, the current patch series adapts the native
> libraries as follows:
>
> The custom PCI Segment Library passes the complete address which is
> consumed by the custom PCI Express library where based on the Segment
> number, the base address of the PCI Express is returned.
>
> The rationale behind maintaining two separate libraries is that when
> the software evolves and support for multiple segments is adapted in
> the native PCI Segment Library the custom library could be removed.
> Also, we might have other protocols which might try to use the PCI
> Express library directly. However, there are some other platforms
> where all the platform specific changes have gone in a single custom
> PCI library
>
> Could you please provide some inputs as to which of two approaches
> would be better to follow as there is one more platform to follow
> based on the decision taken?
>
> Thanks
> Chandni
>
> On Wed, Dec 8, 2021 at 8:25 AM Khasim Mohammed <khasim.mohammed@arm.com> wrote:
> >
> > Hi Sami, Chandni,
> >
> > There was a suggestion from Pierre on a similar patch for N1SDP to remove PCIExpressLib.c and move to workarounds to PCISegmentLib.c,
> >
> > https://edk2.groups.io/g/devel/message/84165?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Arecentpostdate%2Fsticky%2C%2Ckhasim%2C20%2C2%2C0%2C87257273
> >
> > I think we should discuss this implementation for both N1SDP and Morello as they have similar implementation.
> >
> > Regards,
> > Khasim
> > 

  reply	other threads:[~2021-12-10 10:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 12:30 [edk2-platforms][PATCH V1 00/11] Add Support for Morello SoC chandni cherukuri
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 01/11] Platform/ARM/Morello: Rename PlatformLib.inf file chandni cherukuri
2021-12-07 20:44   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 02/11] Platform/ARM/Morello: Add Platform Library support for Morello SoC chandni cherukuri
2021-12-07 20:44   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 03/11] Platform/ARM/Morello: Add PlatformDxe " chandni cherukuri
2021-12-07 20:44   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 04/11] Platform/ARM/Morello: Add ConfigurationManager " chandni cherukuri
2021-12-07 20:51   ` Sami Mujawar
2021-12-08 12:28     ` [edk2-devel] " chandni cherukuri
2021-12-08  3:02   ` Khasim Mohammed
2021-12-08 12:32     ` chandni cherukuri
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 05/11] Platform/ARM/Morello: Add initial support " chandni cherukuri
2021-12-07 20:54   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 06/11] Platform/ARM/Morello: Port PCI Segment Library chandni cherukuri
2021-12-07 20:54   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 07/11] Platform/ARM/Morello: Port PCI Express library chandni cherukuri
2021-12-07 20:58   ` Sami Mujawar
2021-12-08  2:55     ` [edk2-devel] " Khasim Mohammed
2021-12-09 12:30       ` chandni cherukuri
2021-12-10 10:41         ` Ard Biesheuvel [this message]
2021-12-13 12:41           ` chandni cherukuri
2021-12-13 14:37             ` Ard Biesheuvel
2021-12-13 17:44               ` chandni cherukuri
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 08/11] Platform/ARM/Morello: Enable PCIe and CCIX Root Ports chandni cherukuri
2021-12-07 20:59   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 09/11] Platform/ARM/Morello: Add ACPI bindings for PCIe & CCIX chandni cherukuri
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 10/11] Platform/ARM/Morello: Add support to parse NT_FW_CONFIG chandni cherukuri
2021-12-07 20:59   ` Sami Mujawar
2021-12-04 12:30 ` [edk2-platforms][PATCH V1 11/11] Platform/ARM/Morello: Update Readme.md chandni cherukuri
2021-12-07 21:01   ` Sami Mujawar

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=CAMj1kXFfmG7+rS8iiOiEBXDAc9B0y5ejfhJ84hm5z8m_HMkS3A@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