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

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

File Facts

System
Linux kernel
Corpus path
Documentation/PCI/endpoint/pci-ntb-howto.rst
Extension
.rst
Size
5235 bytes
Lines
159
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: Kishon Vijay Abraham I <kishon@ti.com>

This document is a guide to help users use pci-epf-ntb 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-ntb-function.rst

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

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

For implementing NTB functionality at least two endpoint controller devices
are required.

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

	# ls /sys/class/pci_epc/
	2900000.pcie-ep  2910000.pcie-ep

If PCI_ENDPOINT_CONFIGFS is enabled::

	# ls /sys/kernel/config/pci_ep/controllers
	2900000.pcie-ep  2910000.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_ntb

If PCI_ENDPOINT_CONFIGFS is enabled::

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


Creating pci-epf-ntb Device
----------------------------

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

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

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

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

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

Annotation

Implementation Notes