~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/PCI/endpoint/pci-test-howto.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/PCI/endpoint/pci-test-howto.rst (Version linux-6.12-rc7) and /Documentation/PCI/endpoint/pci-test-howto.rst (Version linux-2.6.0)


  1 .. SPDX-License-Identifier: GPL-2.0               
  2                                                   
  3 ===================                               
  4 PCI Test User Guide                               
  5 ===================                               
  6                                                   
  7 :Author: Kishon Vijay Abraham I <kishon@ti.com>    
  8                                                   
  9 This document is a guide to help users use pci    
 10 and pci_endpoint_test host driver for testing     
 11 be followed in the host side and EP side is gi    
 12                                                   
 13 Endpoint Device                                   
 14 ===============                                   
 15                                                   
 16 Endpoint Controller Devices                       
 17 ---------------------------                       
 18                                                   
 19 To find the list of endpoint controller device    
 20                                                   
 21         # ls /sys/class/pci_epc/                  
 22           51000000.pcie_ep                        
 23                                                   
 24 If PCI_ENDPOINT_CONFIGFS is enabled::             
 25                                                   
 26         # ls /sys/kernel/config/pci_ep/control    
 27           51000000.pcie_ep                        
 28                                                   
 29                                                   
 30 Endpoint Function Drivers                         
 31 -------------------------                         
 32                                                   
 33 To find the list of endpoint function drivers     
 34                                                   
 35         # ls /sys/bus/pci-epf/drivers             
 36           pci_epf_test                            
 37                                                   
 38 If PCI_ENDPOINT_CONFIGFS is enabled::             
 39                                                   
 40         # ls /sys/kernel/config/pci_ep/functio    
 41           pci_epf_test                            
 42                                                   
 43                                                   
 44 Creating pci-epf-test Device                      
 45 ----------------------------                      
 46                                                   
 47 PCI endpoint function device can be created us    
 48 pci-epf-test device, the following commands ca    
 49                                                   
 50         # mount -t configfs none /sys/kernel/c    
 51         # cd /sys/kernel/config/pci_ep/           
 52         # mkdir functions/pci_epf_test/func1      
 53                                                   
 54 The "mkdir func1" above creates the pci-epf-te    
 55 be probed by pci_epf_test driver.                 
 56                                                   
 57 The PCI endpoint framework populates the direc    
 58 configurable fields::                             
 59                                                   
 60         # ls functions/pci_epf_test/func1         
 61           baseclass_code        interrupt_pin     
 62           cache_line_size       msi_interrupts    
 63           deviceid              msix_interrupt    
 64                                                   
 65 The PCI endpoint function driver populates the    
 66 when the device is bound to the driver. The pc    
 67 vendorid with 0xffff and interrupt_pin with 0x    
 68                                                   
 69         # cat functions/pci_epf_test/func1/ven    
 70           0xffff                                  
 71         # cat functions/pci_epf_test/func1/int    
 72           0x0001                                  
 73                                                   
 74                                                   
 75 Configuring pci-epf-test Device                   
 76 -------------------------------                   
 77                                                   
 78 The user can configure the pci-epf-test device    
 79 to change the vendorid and the number of MSI i    
 80 device, the following commands can be used::      
 81                                                   
 82         # echo 0x104c > functions/pci_epf_test    
 83         # echo 0xb500 > functions/pci_epf_test    
 84         # echo 16 > functions/pci_epf_test/fun    
 85         # echo 8 > functions/pci_epf_test/func    
 86                                                   
 87                                                   
 88 Binding pci-epf-test Device to EP Controller      
 89 --------------------------------------------      
 90                                                   
 91 In order for the endpoint function device to b    
 92 a PCI endpoint controller driver. Use the conf    
 93 device to one of the controller driver present    
 94                                                   
 95         # ln -s functions/pci_epf_test/func1 c    
 96                                                   
 97 Once the above step is completed, the PCI endp    
 98 with the host.                                    
 99                                                   
100                                                   
101 Start the Link                                    
102 --------------                                    
103                                                   
104 In order for the endpoint device to establish     
105 field should be populated with '1'::              
106                                                   
107         # echo 1 > controllers/51000000.pcie_e    
108                                                   
109                                                   
110 RootComplex Device                                
111 ==================                                
112                                                   
113 lspci Output                                      
114 ------------                                      
115                                                   
116 Note that the devices listed here correspond t    
117 above::                                           
118                                                   
119         00:00.0 PCI bridge: Texas Instruments     
120         01:00.0 Unassigned class [ff00]: Texas    
121                                                   
122                                                   
123 Using Endpoint Test function Device               
124 -----------------------------------               
125                                                   
126 pcitest.sh added in tools/pci/ can be used to     
127 tests. To compile this tool the following comm    
128                                                   
129         # cd <kernel-dir>                         
130         # make -C tools/pci                       
131                                                   
132 or if you desire to compile and install in you    
133                                                   
134         # cd <kernel-dir>                         
135         # make -C tools/pci install               
136                                                   
137 The tool and script will be located in <rootfs    
138                                                   
139                                                   
140 pcitest.sh Output                                 
141 ~~~~~~~~~~~~~~~~~                                 
142 ::                                                
143                                                   
144         # pcitest.sh                              
145         BAR tests                                 
146                                                   
147         BAR0:           OKAY                      
148         BAR1:           OKAY                      
149         BAR2:           OKAY                      
150         BAR3:           OKAY                      
151         BAR4:           NOT OKAY                  
152         BAR5:           NOT OKAY                  
153                                                   
154         Interrupt tests                           
155                                                   
156         SET IRQ TYPE TO LEGACY:         OKAY      
157         LEGACY IRQ:     NOT OKAY                  
158         SET IRQ TYPE TO MSI:            OKAY      
159         MSI1:           OKAY                      
160         MSI2:           OKAY                      
161         MSI3:           OKAY                      
162         MSI4:           OKAY                      
163         MSI5:           OKAY                      
164         MSI6:           OKAY                      
165         MSI7:           OKAY                      
166         MSI8:           OKAY                      
167         MSI9:           OKAY                      
168         MSI10:          OKAY                      
169         MSI11:          OKAY                      
170         MSI12:          OKAY                      
171         MSI13:          OKAY                      
172         MSI14:          OKAY                      
173         MSI15:          OKAY                      
174         MSI16:          OKAY                      
175         MSI17:          NOT OKAY                  
176         MSI18:          NOT OKAY                  
177         MSI19:          NOT OKAY                  
178         MSI20:          NOT OKAY                  
179         MSI21:          NOT OKAY                  
180         MSI22:          NOT OKAY                  
181         MSI23:          NOT OKAY                  
182         MSI24:          NOT OKAY                  
183         MSI25:          NOT OKAY                  
184         MSI26:          NOT OKAY                  
185         MSI27:          NOT OKAY                  
186         MSI28:          NOT OKAY                  
187         MSI29:          NOT OKAY                  
188         MSI30:          NOT OKAY                  
189         MSI31:          NOT OKAY                  
190         MSI32:          NOT OKAY                  
191         SET IRQ TYPE TO MSI-X:          OKAY      
192         MSI-X1:         OKAY                      
193         MSI-X2:         OKAY                      
194         MSI-X3:         OKAY                      
195         MSI-X4:         OKAY                      
196         MSI-X5:         OKAY                      
197         MSI-X6:         OKAY                      
198         MSI-X7:         OKAY                      
199         MSI-X8:         OKAY                      
200         MSI-X9:         NOT OKAY                  
201         MSI-X10:        NOT OKAY                  
202         MSI-X11:        NOT OKAY                  
203         MSI-X12:        NOT OKAY                  
204         MSI-X13:        NOT OKAY                  
205         MSI-X14:        NOT OKAY                  
206         MSI-X15:        NOT OKAY                  
207         MSI-X16:        NOT OKAY                  
208         [...]                                     
209         MSI-X2047:      NOT OKAY                  
210         MSI-X2048:      NOT OKAY                  
211                                                   
212         Read Tests                                
213                                                   
214         SET IRQ TYPE TO MSI:            OKAY      
215         READ (      1 bytes):           OKAY      
216         READ (   1024 bytes):           OKAY      
217         READ (   1025 bytes):           OKAY      
218         READ (1024000 bytes):           OKAY      
219         READ (1024001 bytes):           OKAY      
220                                                   
221         Write Tests                               
222                                                   
223         WRITE (      1 bytes):          OKAY      
224         WRITE (   1024 bytes):          OKAY      
225         WRITE (   1025 bytes):          OKAY      
226         WRITE (1024000 bytes):          OKAY      
227         WRITE (1024001 bytes):          OKAY      
228                                                   
229         Copy Tests                                
230                                                   
231         COPY (      1 bytes):           OKAY      
232         COPY (   1024 bytes):           OKAY      
233         COPY (   1025 bytes):           OKAY      
234         COPY (1024000 bytes):           OKAY      
235         COPY (1024001 bytes):           OKAY      
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php