Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 =================
0004 PCI vNTB Function
0005 =================
0006 
0007 :Author: Frank Li <Frank.Li@nxp.com>
0008 
0009 The difference between PCI NTB function and PCI vNTB function is
0010 
0011 PCI NTB function need at two endpoint instances and connect HOST1
0012 and HOST2.
0013 
0014 PCI vNTB function only use one host and one endpoint(EP), use NTB
0015 connect EP and PCI host
0016 
0017 .. code-block:: text
0018 
0019 
0020   +------------+         +---------------------------------------+
0021   |            |         |                                       |
0022   +------------+         |                        +--------------+
0023   | NTB        |         |                        | NTB          |
0024   | NetDev     |         |                        | NetDev       |
0025   +------------+         |                        +--------------+
0026   | NTB        |         |                        | NTB          |
0027   | Transfer   |         |                        | Transfer     |
0028   +------------+         |                        +--------------+
0029   |            |         |                        |              |
0030   |  PCI NTB   |         |                        |              |
0031   |    EPF     |         |                        |              |
0032   |   Driver   |         |                        | PCI Virtual  |
0033   |            |         +---------------+        | NTB Driver   |
0034   |            |         | PCI EP NTB    |<------>|              |
0035   |            |         |  FN Driver    |        |              |
0036   +------------+         +---------------+        +--------------+
0037   |            |         |               |        |              |
0038   |  PCI BUS   | <-----> |  PCI EP BUS   |        |  Virtual PCI |
0039   |            |  PCI    |               |        |     BUS      |
0040   +------------+         +---------------+--------+--------------+
0041       PCI RC                        PCI EP
0042 
0043 Constructs used for Implementing vNTB
0044 =====================================
0045 
0046         1) Config Region
0047         2) Self Scratchpad Registers
0048         3) Peer Scratchpad Registers
0049         4) Doorbell (DB) Registers
0050         5) Memory Window (MW)
0051 
0052 
0053 Config Region:
0054 --------------
0055 
0056 It is same as PCI NTB Function driver
0057 
0058 Scratchpad Registers:
0059 ---------------------
0060 
0061 It is appended after Config region.
0062 
0063 .. code-block:: text
0064 
0065 
0066   +--------------------------------------------------+ Base
0067   |                                                  |
0068   |                                                  |
0069   |                                                  |
0070   |          Common Config Register                  |
0071   |                                                  |
0072   |                                                  |
0073   |                                                  |
0074   +-----------------------+--------------------------+ Base + span_offset
0075   |                       |                          |
0076   |    Peer Span Space    |    Span Space            |
0077   |                       |                          |
0078   |                       |                          |
0079   +-----------------------+--------------------------+ Base + span_offset
0080   |                       |                          |      + span_count * 4
0081   |                       |                          |
0082   |     Span Space        |   Peer Span Space        |
0083   |                       |                          |
0084   +-----------------------+--------------------------+
0085         Virtual PCI             Pcie Endpoint
0086         NTB Driver               NTB Driver
0087 
0088 
0089 Doorbell Registers:
0090 -------------------
0091 
0092   Doorbell Registers are used by the hosts to interrupt each other.
0093 
0094 Memory Window:
0095 --------------
0096 
0097   Actual transfer of data between the two hosts will happen using the
0098   memory window.
0099 
0100 Modeling Constructs:
0101 ====================
0102 
0103 32-bit BARs.
0104 
0105 ======  ===============
0106 BAR NO  CONSTRUCTS USED
0107 ======  ===============
0108 BAR0    Config Region
0109 BAR1    Doorbell
0110 BAR2    Memory Window 1
0111 BAR3    Memory Window 2
0112 BAR4    Memory Window 3
0113 BAR5    Memory Window 4
0114 ======  ===============
0115 
0116 64-bit BARs.
0117 
0118 ======  ===============================
0119 BAR NO  CONSTRUCTS USED
0120 ======  ===============================
0121 BAR0    Config Region + Scratchpad
0122 BAR1
0123 BAR2    Doorbell
0124 BAR3
0125 BAR4    Memory Window 1
0126 BAR5
0127 ======  ===============================
0128 
0129