From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Add architecture support for PCI
Date: Tue, 04 Feb 2014 19:34:50 +0100 [thread overview]
Message-ID: <8676627.b6SYsazoah@wuerfel> (raw)
In-Reply-To: <20140204181514.GA25695@obsidianresearch.com>
On Tuesday 04 February 2014 11:15:14 Jason Gunthorpe wrote:
> On Tue, Feb 04, 2014 at 10:44:52AM +0100, Arnd Bergmann wrote:
>
> > Now I want to integrate the EHCI into my SoC and not waste one
> > of my precious PCIe root ports, so I have to create another PCI
> > domain with its own ECAM compliant config space to put it into.
> > Fortunately SBSA lets me add an arbitrary number of PCI domains,
> > as long as they are all strictly compliant. To software it will
>
> Just to touch on this for others who might be reading..
>
> IMHO any simple SOC that requires multiple domains is *broken*. A
> single domain covers all reasonable needs until you get up to
> mega-scale NUMA systems, encouraging people to design with multiple
> domains only complicates the kernel :(
Well, the way I see it, we already have support for arbitrary
PCI domains in the kernel, and that works fine, so we can just
as well use it. That way we don't have to partition the available
256 buses among the host bridges, and anything that needs a separate
PCI config space can live in its own world. Quite often when you
have multiple PCI hosts, they actually have different ways to
get at the config space and don't even share the same driver.
On x86, any kind of HT/PCI/PCIe/PCI-x bridge is stuffed into a
single domain so they can support OSs that only know the
traditional config space access methods, but I don't see
any real advantage to that for other architectures.
> SOC internal peripherals should all show up in the bus 0 config space
> of the only domain and SOC PCI-E physical ports should show up on bus
> 0 as PCI-PCI bridges. This is all covered in the PCI-E specs regarding
> the root complex.
>
> Generally I would expect the internal peripherals to still be
> internally connected with AXI, but also connected through the ECAM
> space for configuration, control, power management and address
> assignment.
That would of course be very nice from a software perspective,
but I think that is much less likely for any practical
implementation.
> > 2. all address windows are set up by the boot loader, we only
> > need to know the location (IMHO this should be the
> > preferred way to do things regardless of SBSA).
>
> Linux does a full address map re-assignment on boot, IIRC. You need
> more magics to inhibit that if your BAR's and bridge windows don't
> work.
>
> Hot plug is a whole other thing..
I meant the I/O and memory space windows of the host bridge here,
which typically don't get reassigned (except on mvebu). For the
device resources, there is a per-host PCI_REASSIGN_ALL_RSRC
flag and pcibios_assign_all_busses() function that we typically
set on embedded systems where we don't trust the boot loader
to set this up correctly, or at all.
On server systems, I would expect to have the firmware assign
all resources and the kernel to leave them alone. On sparc
and powerpc servers, there is even a third method, which
is to trust firmware to put the correct resources for each
device into DT, overriding what is written in the BAR.
> > it's possible that the designware based ones get point 4 right.
>
> The designware one's also appear to be re-purposed end point cores, so
> their config handling is somewhat bonkers. Tegra got theirs sort of
> close because they re-used knowledge/IP from their x86 south bridges -
> but even then they didn't really implement ECAM properly for an ARM
> environment.
>
> Since config space is where everyone to date has fallen down, I think
> the SBSA would have been wise to list dword by dword what a typical
> ECAM config space should look like.
I absolutely agree.
Arnd
next prev parent reply other threads:[~2014-02-04 18:34 UTC|newest]
Thread overview: 26+ 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 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
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 [this message]
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=8676627.b6SYsazoah@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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