From: Murali Karicheri <m-karicheri2@ti.com>
To: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: PCI Endpoint device running Linux?
Date: Tue, 12 Apr 2016 12:09:43 -0400 [thread overview]
Message-ID: <570D1DC7.6040001@ti.com> (raw)
Hi,
Has anyone wrote EP software for PCI h/w running Linux and
would like to share your experience? If so, please continue
to read below and provide your feedback.
Some of the PCI h/w such as Designware h/w that I work with
support both EP and RC functions in the same h/w. It needs to be
configured to work in one of the mode. So far I have seen only
such h/w work in RC mode such as pcie-designware.c. But I haven't
come across any driver in Linux that implements a EP controller
similar to RC controller. At this point I am trying to do some
research to educate myself on what is required to be implemented
in Linux and what is the available software in PCI subsystem to
support EP controller and EP device function.
To support an EP such as a Ethernet NIC or FPGA, there is a
firmaware/software in the EP h/w which as a standalone entity does
setup the Link, initialize the PCI h/w, configure its BAR sizes
etc and initialize itself so that it is detectable when RC side
boots up and do the enumeration. In addition, there is PCI device
driver running on RC side that communicates with the EP H/w
to implement a specific PCI device function such as NIC. My focus
is only on the EP side.
>From my understanding, at a high level, EP s/w needs to implement
3 main components similar to RC side.
1. EP Controller. This is what initialize the PCI H/W so that
it becomes discoverable on a PCIe bus. It initialize the PCI
h/w, setup PCI bus (SerDes), and make sure PCI Link is up
and register itself with PCI sub system (assuming PCI in
Linux does support EP controller as well). But I don't know,
if same API such as pci_scan_root_bus(), pci_bus_add_devices()
etc are used in this case. Comments?
2. PCI Core functions such as resource management, APIs etc.
For example, multiple functions can be implemented at the EP
and memory/config resource windows to be allocated and
managed similar to RC side. PCI core support EP as well??
3. EP PCI device functions. Device drivers for individual PCI
device function.
>From a high level, it appears similar to PCI RC side functions.
Is my understanding correct? Does the existing PCI
Core support implementing EP side software on Linux? and if so,
I believe, we need to enhance the existing RC controller to
work as EP and then write a PCI device driver to support the
EP PCI device function to work with RC side device driver.
Comments?
Thanks for reading and awaiting your feedback!
--
Murali Karicheri
Linux Kernel, Keystone
reply other threads:[~2016-04-12 16:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=570D1DC7.6040001@ti.com \
--to=m-karicheri2@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.