e9ac6e335d
The diagram in "Scratchpad Registers" isn't formatted inside code block, hence triggers indentation warning: Documentation/PCI/endpoint/pci-vntb-function.rst:82: WARNING: Unexpected indentation. Fix the warning by using code-block directive to format the diagram inside code block, as in other diagrams in Documentation/. While at it, unindent the preceeding text. Link: https://lore.kernel.org/linux-next/20220621200235.211b2e32@canb.auug.org.au/ Fixes: 0c4b285d9636cc ("Documentation: PCI: Add specification for the PCI vNTB function device") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org> Cc: "Krzysztof Wilczyński" <kw@linux.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Frank Li <Frank.Li@nxp.com> Cc: linux-pci@vger.kernel.org Cc: linux-next@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
130 lines
4.1 KiB
ReStructuredText
130 lines
4.1 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0
|
|
|
|
=================
|
|
PCI vNTB Function
|
|
=================
|
|
|
|
:Author: Frank Li <Frank.Li@nxp.com>
|
|
|
|
The difference between PCI NTB function and PCI vNTB function is
|
|
|
|
PCI NTB function need at two endpoint instances and connect HOST1
|
|
and HOST2.
|
|
|
|
PCI vNTB function only use one host and one endpoint(EP), use NTB
|
|
connect EP and PCI host
|
|
|
|
.. code-block:: text
|
|
|
|
|
|
+------------+ +---------------------------------------+
|
|
| | | |
|
|
+------------+ | +--------------+
|
|
| NTB | | | NTB |
|
|
| NetDev | | | NetDev |
|
|
+------------+ | +--------------+
|
|
| NTB | | | NTB |
|
|
| Transfer | | | Transfer |
|
|
+------------+ | +--------------+
|
|
| | | | |
|
|
| PCI NTB | | | |
|
|
| EPF | | | |
|
|
| Driver | | | PCI Virtual |
|
|
| | +---------------+ | NTB Driver |
|
|
| | | PCI EP NTB |<------>| |
|
|
| | | FN Driver | | |
|
|
+------------+ +---------------+ +--------------+
|
|
| | | | | |
|
|
| PCI BUS | <-----> | PCI EP BUS | | Virtual PCI |
|
|
| | PCI | | | BUS |
|
|
+------------+ +---------------+--------+--------------+
|
|
PCI RC PCI EP
|
|
|
|
Constructs used for Implementing vNTB
|
|
=====================================
|
|
|
|
1) Config Region
|
|
2) Self Scratchpad Registers
|
|
3) Peer Scratchpad Registers
|
|
4) Doorbell (DB) Registers
|
|
5) Memory Window (MW)
|
|
|
|
|
|
Config Region:
|
|
--------------
|
|
|
|
It is same as PCI NTB Function driver
|
|
|
|
Scratchpad Registers:
|
|
---------------------
|
|
|
|
It is appended after Config region.
|
|
|
|
.. code-block:: text
|
|
|
|
|
|
+--------------------------------------------------+ Base
|
|
| |
|
|
| |
|
|
| |
|
|
| Common Config Register |
|
|
| |
|
|
| |
|
|
| |
|
|
+-----------------------+--------------------------+ Base + span_offset
|
|
| | |
|
|
| Peer Span Space | Span Space |
|
|
| | |
|
|
| | |
|
|
+-----------------------+--------------------------+ Base + span_offset
|
|
| | | + span_count * 4
|
|
| | |
|
|
| Span Space | Peer Span Space |
|
|
| | |
|
|
+-----------------------+--------------------------+
|
|
Virtual PCI Pcie Endpoint
|
|
NTB Driver NTB Driver
|
|
|
|
|
|
Doorbell Registers:
|
|
-------------------
|
|
|
|
Doorbell Registers are used by the hosts to interrupt each other.
|
|
|
|
Memory Window:
|
|
--------------
|
|
|
|
Actual transfer of data between the two hosts will happen using the
|
|
memory window.
|
|
|
|
Modeling Constructs:
|
|
====================
|
|
|
|
32-bit BARs.
|
|
|
|
====== ===============
|
|
BAR NO CONSTRUCTS USED
|
|
====== ===============
|
|
BAR0 Config Region
|
|
BAR1 Doorbell
|
|
BAR2 Memory Window 1
|
|
BAR3 Memory Window 2
|
|
BAR4 Memory Window 3
|
|
BAR5 Memory Window 4
|
|
====== ===============
|
|
|
|
64-bit BARs.
|
|
|
|
====== ===============================
|
|
BAR NO CONSTRUCTS USED
|
|
====== ===============================
|
|
BAR0 Config Region + Scratchpad
|
|
BAR1
|
|
BAR2 Doorbell
|
|
BAR3
|
|
BAR4 Memory Window 1
|
|
BAR5
|
|
====== ===============================
|
|
|
|
|