130 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3=================4PCI vNTB Function5=================6 7:Author: Frank Li <Frank.Li@nxp.com>8 9The difference between PCI NTB function and PCI vNTB function is10 11PCI NTB function need at two endpoint instances and connect HOST112and HOST2.13 14PCI vNTB function only use one host and one endpoint(EP), use NTB15connect EP and PCI host16 17.. code-block:: text18 19 20 +------------+ +---------------------------------------+21 | | | |22 +------------+ | +--------------+23 | NTB | | | NTB |24 | NetDev | | | NetDev |25 +------------+ | +--------------+26 | NTB | | | NTB |27 | Transfer | | | Transfer |28 +------------+ | +--------------+29 | | | | |30 | PCI NTB | | | |31 | EPF | | | |32 | Driver | | | PCI Virtual |33 | | +---------------+ | NTB Driver |34 | | | PCI EP NTB |<------>| |35 | | | FN Driver | | |36 +------------+ +---------------+ +--------------+37 | | | | | |38 | PCI BUS | <-----> | PCI EP BUS | | Virtual PCI |39 | | PCI | | | BUS |40 +------------+ +---------------+--------+--------------+41 PCI RC PCI EP42 43Constructs used for Implementing vNTB44=====================================45 46 1) Config Region47 2) Self Scratchpad Registers48 3) Peer Scratchpad Registers49 4) Doorbell (DB) Registers50 5) Memory Window (MW)51 52 53Config Region:54--------------55 56It is same as PCI NTB Function driver57 58Scratchpad Registers:59---------------------60 61It is appended after Config region.62 63.. code-block:: text64 65 66 +--------------------------------------------------+ Base67 | |68 | |69 | |70 | Common Config Register |71 | |72 | |73 | |74 +-----------------------+--------------------------+ Base + span_offset75 | | |76 | Peer Span Space | Span Space |77 | | |78 | | |79 +-----------------------+--------------------------+ Base + span_offset80 | | | + span_count * 481 | | |82 | Span Space | Peer Span Space |83 | | |84 +-----------------------+--------------------------+85 Virtual PCI Pcie Endpoint86 NTB Driver NTB Driver87 88 89Doorbell Registers:90-------------------91 92 Doorbell Registers are used by the hosts to interrupt each other.93 94Memory Window:95--------------96 97 Actual transfer of data between the two hosts will happen using the98 memory window.99 100Modeling Constructs:101====================102 10332-bit BARs.104 105====== ===============106BAR NO CONSTRUCTS USED107====== ===============108BAR0 Config Region109BAR1 Doorbell110BAR2 Memory Window 1111BAR3 Memory Window 2112BAR4 Memory Window 3113BAR5 Memory Window 4114====== ===============115 11664-bit BARs.117 118====== ===============================119BAR NO CONSTRUCTS USED120====== ===============================121BAR0 Config Region + Scratchpad122BAR1123BAR2 Doorbell124BAR3125BAR4 Memory Window 1126BAR5127====== ===============================128 129 130