Lines Matching +full:dw +full:- +full:pcie
1 .. SPDX-License-Identifier: GPL-2.0
4 HiSilicon PCIe Tune and Trace device
10 HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex
12 to dynamically monitor and tune the PCIe link's events (tune),
15 PCIe link's performance.
17 On Kunpeng 930 SoC, the PCIe Root Complex is composed of several
18 PCIe cores. Each PCIe core includes several Root Ports and a PTT
20 tracing the links of the PCIe core.
23 +--------------Core 0-------+
25 | | [Root Port]---[Endpoint]
26 | | [Root Port]---[Endpoint]
27 | | [Root Port]---[Endpoint]
28 Root Complex |------Core 1-------+
30 | | [Root Port]---[ Switch ]---[Endpoint]
31 | | [Root Port]---[Endpoint] `-[Endpoint]
32 | | [Root Port]---[Endpoint]
33 +---------------------------+
39 IO dies (SICL, Super I/O Cluster), where there's one PCIe Root
48 PTT tune is designed for monitoring and adjusting PCIe link parameters (events).
50 covers the PCIe core to which the PTT device belongs.
71 ------------------------
74 the PCIe core.
76 - qos_tx_cpl: weight of Tx completion TLPs
77 - qos_tx_np: weight of Tx non-posted TLPs
78 - qos_tx_p: weight of Tx posted TLPs
80 The weight influences the proportion of certain packets on the PCIe link.
91 -------------------------
93 Following files are provided to tune the buffer of tx path of the PCIe core.
95 - rx_alloc_buf_level: watermark of Rx requested
96 - tx_alloc_buf_level: watermark of Tx requested
114 can be used to analyze the transactions and usage condition of the PCIe
127 $ perf record -e hisi_ptt0_2/filter=0x80001,type=1,direction=1,
128 format=1/ -- sleep 5
132 direction of inbound and traced data format of 8DW.
135 ---------
144 is the Requester ID (Device ID of the PCIe function). Bit[18:16] is currently
152 sysfs. Each filter will be an individual file with name of its related PCIe
167 -------
173 - 8'b00000001: posted requests (P)
174 - 8'b00000010: non-posted requests (NP)
175 - 8'b00000100: completions (CPL)
181 ------------
184 to the Root Port or the PCIe core, by specifying the `direction` parameter.
186 is 4 bit. When the desired format is 4DW, directions and related values
189 - 4'b0000: inbound TLPs (P, NP, CPL)
190 - 4'b0001: outbound TLPs (P, NP, CPL)
191 - 4'b0010: outbound TLPs (P, NP, CPL) and inbound TLPs (P, NP, CPL B)
192 - 4'b0011: outbound TLPs (P, NP, CPL) and inbound TLPs (CPL A)
194 When the desired format is 8DW, directions and related values supported are
197 - 4'b0000: reserved
198 - 4'b0001: outbound TLPs (P, NP, CPL)
199 - 4'b0010: inbound TLPs (P, NP, CPL B)
200 - 4'b0011: inbound TLPs (CPL A)
204 - completion A (CPL A): completion of CHI/DMA/Native non-posted requests, except for CPL B
205 - completion B (CPL B): completion of DMA remote2local and P2P non-posted requests
208 --------------
211 `format` parameter. The default format is 4DW. The parameter value is 4 bit.
214 - 4'b0000: 4DW length per TLP header
215 - 4'b0001: 8DW length per TLP header
217 The traced TLP header format is different from the PCIe standard.
219 When using the 8DW data format, the entire TLP header is logged
220 (Header DW0-3 shown below). For example, the TLP header for Memory
221 Reads with 64-bit addresses is shown in PCIe r5.0, Figure 2-17;
224 In addition, 8DW trace buffer entries contain a timestamp and
225 possibly a prefix for a PASID TLP prefix (see Figure 6-20, PCIe r5.0).
229 used to distinguish the data format. 8DW format is like
233 |---------------------------------------|-------------------|
243 When using the 4DW data format, DW0 of the trace buffer entry
245 timestamp. DW1-DW3 of the trace buffer entry contain DW1-DW3
248 4DW format is like
252 |-----|---------|---|---|---|---|-------------|-------------|
259 --------------------
267 +->[DMA addr 0]->[DMA addr 1]->[DMA addr 2]->[DMA addr 3]-+
268 +---------------------------------------------------------+
275 adjust the size by specifying the `-m` parameter of the perf command.
278 -----------
280 You can decode the traced data with `perf report -D` command (currently
282 according to the format described previously (take 8DW as an example):