From: Barry Grussling <barry@grussling.com>
To: linux-pci@vger.kernel.org
Subject: Endpoint-to-Endpoint communication - Handshake Problem Enumeration
Date: Mon, 27 Apr 2015 11:22:30 -0700 [thread overview]
Message-ID: <CABLseQ7Vog4YgCwhrVhqmp-8h84f2qbTog=nPYKzc4ZE8pvHhw@mail.gmail.com> (raw)
Hello Everyone,
I am working on a device with a PLX PCIe switch and multiple
PCIe endpoints enumerated off an ARM RP. I am playing with
endpoint-to-endpoint communications. I have verified after
the PCIe bus is enumerated that I can send TLPs from
one endpoint to an enumerated BAR on another endpoint
and the TLP is directed to the other endpoint. I have further
verified that the RP receivies nothing as desired.
The issue I am looking for some advice on is how to tell
each endpoint what all the other endpoints BAR address is.
For the sake of argument, lets say I have N modules and
each module needs to know the enumerated endpoint
address of the other N-1 modules Bar0 address.
The brute force/prototype method I have been testing is
scrape /proc/iomem after enumeration and write to each
card's registers via /dev/mem the address of all other
cards. This works, but is not something I would put
on my resume. I am now trying to "do it right". This
scraping also assumes bus addresses and host addresses
are the same. This seems to be true on my architecture.
My preliminary driver design has a common base layer
that each endpoint's driver registers with when it is probed.
After the BAR addresses are assigned the endpoint driver
tells the common base layer its assigned address and
the base layer writes that into registers in all the
other registered endpoints via their respective drivers.
Before I go off boldly and and completely re-invent the
wheel I was wondering if something like this had
been contemplated or created yet, perhaps via
callback hooks or some other PCIe framework
thingy I am not aware of. Or is there another way
to achieve the same goal?
Anyone have any feedback?
Thanks for your time!
Barry
next reply other threads:[~2015-04-27 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 18:22 Barry Grussling [this message]
2015-04-29 22:02 ` Endpoint-to-Endpoint communication - Handshake Problem Enumeration Bjorn Helgaas
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='CABLseQ7Vog4YgCwhrVhqmp-8h84f2qbTog=nPYKzc4ZE8pvHhw@mail.gmail.com' \
--to=barry@grussling.com \
--cc=linux-pci@vger.kernel.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).