Documentation/PCI/endpoint/pci-vntb-howto.rst

Source file repositories/reference/linux-study-clean/Documentation/PCI/endpoint/pci-vntb-howto.rst

File Facts

System
Linux kernel
Corpus path
Documentation/PCI/endpoint/pci-vntb-howto.rst
Extension
.rst
Size
5821 bytes
Lines
170
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GPL-2.0

===================================================================
PCI Non-Transparent Bridge (NTB) Endpoint Function (EPF) User Guide
===================================================================

:Author: Frank Li <Frank.Li@nxp.com>

This document is a guide to help users use pci-epf-vntb function driver
and ntb_hw_epf host driver for NTB functionality. The list of steps to
be followed in the host side and EP side is given below. For the hardware
configuration and internals of NTB using configurable endpoints see
Documentation/PCI/endpoint/pci-vntb-function.rst

Endpoint Device
===============

Endpoint Controller Devices
---------------------------

To find the list of endpoint controller devices in the system::

        # ls /sys/class/pci_epc/
          5f010000.pcie_ep

If PCI_ENDPOINT_CONFIGFS is enabled::

        # ls /sys/kernel/config/pci_ep/controllers
          5f010000.pcie_ep

Endpoint Function Drivers
-------------------------

To find the list of endpoint function drivers in the system::

	# ls /sys/bus/pci-epf/drivers
	pci_epf_ntb  pci_epf_test  pci_epf_vntb

If PCI_ENDPOINT_CONFIGFS is enabled::

	# ls /sys/kernel/config/pci_ep/functions
	pci_epf_ntb  pci_epf_test  pci_epf_vntb


Creating pci-epf-vntb Device
----------------------------

PCI endpoint function device can be created using the configfs. To create
pci-epf-vntb device, the following commands can be used::

	# mount -t configfs none /sys/kernel/config
	# cd /sys/kernel/config/pci_ep/
	# mkdir functions/pci_epf_vntb/func1

The "mkdir func1" above creates the pci-epf-vntb function device that will
be probed by pci_epf_vntb driver.

The PCI endpoint framework populates the directory with the following
configurable fields::

	# ls functions/pci_epf_vntb/func1
	baseclass_code    deviceid          msi_interrupts    pci-epf-vntb.0
	progif_code       secondary         subsys_id         vendorid
	cache_line_size   interrupt_pin     msix_interrupts   primary
	revid             subclass_code     subsys_vendor_id

The PCI endpoint function driver populates these entries with default values
when the device is bound to the driver. The pci-epf-vntb driver populates
vendorid with 0xffff and interrupt_pin with 0x0001::

Annotation

Implementation Notes