From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
linux-pci <linux-pci@vger.kernel.org>,
Liviu Dudau <Liviu.Dudau@arm.com>,
LKML <linux-kernel@vger.kernel.org>,
Catalin Marinas <Catalin.Marinas@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
LAKML <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: Add architecture support for PCI
Date: Mon, 3 Feb 2014 16:31:37 -0700 [thread overview]
Message-ID: <20140203233137.GH2519@obsidianresearch.com> (raw)
In-Reply-To: <CAL_JsqL+3S8w=_Fb-t0rVcq0sDiPSDM6nqn3mR2DHKw=VTffsg@mail.gmail.com>
On Mon, Feb 03, 2014 at 05:07:48PM -0600, Rob Herring wrote:
> > An interesting question however is what the transition plan is to
> > have the code shared between arm32 and arm64: We will certainly need
> > to share at least the dw-pcie and the generic SBSA compliant pci
> > implementation.
>
> You might want to re-read the SBSA. Unless ARM provides an IP block or
> there is some other standard such as EHCI or AHCI, there is no generic
> implementation. You only have to go look at the Linux EHCI or AHCI
> drivers and see how meaningless and inadequate "use EHCI" is. For PCI,
> the text is so brief in the SBSA there will be no way PCI is going to
> just work given all the variations of root complexes, bridges, address
> windows, etc. we typically see on ARM platforms. I could be wrong and
> some AML magic will solve all the problems. :)
The biggest hinderance I've seen while looking at ARM PCI drivers is
quite simply - they don't follow the PCI-E spec. There is a spec, and
it is not followed.
This fixup in the X-Gene is a solid example, the purpose of the BAR in
a PCI-PCI bridge is very clear: using it to specify the system
DRAM aperature is completely wrong.
Not having working aperture windows in the root complex's bridges is
completely wrong.
Lacking any ability to generate 8 and 16 bit config write TLP's is
wrong.
Starting with an end-port PCI-E core and re-tasking it to be a root
port bridge and ignoring all the requirements with the bridge's config
space is utterly and completely WRONG.
Specifying 'use EHCI, AHCI, etc' - which are all PCI based standards
without clearly specifying exactly how PCI is suppose to work is
completely bonkers.
What is needed is a spec that says:
1) Here is how you generate config TLPs. A MMIO region that
conforms to the already specified x86 ECAM would
be perfect
2) Here is a dword by dword break down of the entire config space in
a SOC. Here is where a on-board AHCI controller must show up in
config space. Here is how an external PCI-E port must show
up. Etc. Most of this is already specified, but it clearly needs
to be layed out explicitly for ARM SOCs to actually follow it.
3) Here is how you specify the aperture(s) associated with PCI BAR's
and bridge windows in config space. And yes: The CONFIG SPACE
BARS MUST WORK.
4) Here is how MSI works, these are the values you put in the
address/data and here is how you collect the interrupt.
5) Here is how Legacy INTx must be mapped into the GIC.
This is what x86 does, and they have been doing it well for 10
years. If you want to play in the server game you have to properly
implement PCI.
Jason
next prev parent reply other threads:[~2014-02-03 23:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 18:43 [PATCH] [RFC] Add AArch64 support for PCI Liviu Dudau
2014-02-03 18:43 ` [PATCH] arm64: Add architecture " Liviu Dudau
2014-02-03 18:58 ` Arnd Bergmann
2014-02-03 19:18 ` Liviu Dudau
2014-02-03 19:21 ` kodiak furr
2014-02-03 20:05 ` Arnd Bergmann
2014-02-03 21:36 ` Liviu Dudau
2014-02-04 8:44 ` Arnd Bergmann
2014-02-04 11:09 ` Liviu Dudau
2014-02-04 11:54 ` Arnd Bergmann
2014-02-04 16:41 ` Catalin Marinas
2014-02-03 23:07 ` Rob Herring
2014-02-03 23:31 ` Jason Gunthorpe [this message]
2014-02-04 9:44 ` Arnd Bergmann
2014-02-04 13:57 ` Rob Herring
2014-02-04 19:50 ` Arnd Bergmann
2014-02-04 18:15 ` Jason Gunthorpe
2014-02-04 18:34 ` Arnd Bergmann
2014-02-04 19:10 ` Jason Gunthorpe
2014-02-04 19:21 ` Arnd Bergmann
2014-02-04 9:01 ` Arnd Bergmann
2014-02-03 22:34 ` Andrew Murray
2014-02-04 12:29 ` Liviu Dudau
2014-02-04 13:23 ` Andrew Murray
2014-02-04 16:18 ` Arnd Bergmann
2014-02-18 6:33 ` Yijing Wang
2014-02-20 14:38 ` Liviu Dudau
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=20140203233137.GH2519@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=Catalin.Marinas@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=robherring2@gmail.com \
/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).