@@ -241,6 +241,91 @@ to the newer scheme, to give a confirmation that what you see on your
241241system is not unexpected. One must use the "names" as they appear on
242242the system under specified locations.
243243
244+ Topology Representation
245+ -----------------------
246+
247+ Each CoreSight component has a ``connections `` directory which will contain
248+ links to other CoreSight components. This allows the user to explore the trace
249+ topology and for larger systems, determine the most appropriate sink for a
250+ given source. The connection information can also be used to establish
251+ which CTI devices are connected to a given component. This directory contains a
252+ ``nr_links `` attribute detailing the number of links in the directory.
253+
254+ For an ETM source, in this case ``etm0 `` on a Juno platform, a typical
255+ arrangement will be::
256+
257+ linaro-developer:~# ls - l /sys/bus/coresight/devices/etm0/connections
258+ <file details> cti_cpu0 -> ../../../23020000.cti/cti_cpu0
259+ <file details> nr_links
260+ <file details> out:0 -> ../../../230c0000.funnel/funnel2
261+
262+ Following the out port to ``funnel2 ``::
263+
264+ linaro-developer:~# ls -l /sys/bus/coresight/devices/funnel2/connections
265+ <file details> in:0 -> ../../../23040000.etm/etm0
266+ <file details> in:1 -> ../../../23140000.etm/etm3
267+ <file details> in:2 -> ../../../23240000.etm/etm4
268+ <file details> in:3 -> ../../../23340000.etm/etm5
269+ <file details> nr_links
270+ <file details> out:0 -> ../../../20040000.funnel/funnel0
271+
272+ And again to ``funnel0 ``::
273+
274+ linaro-developer:~# ls -l /sys/bus/coresight/devices/funnel0/connections
275+ <file details> in:0 -> ../../../220c0000.funnel/funnel1
276+ <file details> in:1 -> ../../../230c0000.funnel/funnel2
277+ <file details> nr_links
278+ <file details> out:0 -> ../../../20010000.etf/tmc_etf0
279+
280+ Finding the first sink ``tmc_etf0 ``. This can be used to collect data
281+ as a sink, or as a link to propagate further along the chain::
282+
283+ linaro-developer:~# ls -l /sys/bus/coresight/devices/tmc_etf0/connections
284+ <file details> cti_sys0 -> ../../../20020000.cti/cti_sys0
285+ <file details> in:0 -> ../../../20040000.funnel/funnel0
286+ <file details> nr_links
287+ <file details> out:0 -> ../../../20150000.funnel/funnel4
288+
289+ via ``funnel4 ``::
290+
291+ linaro-developer:~# ls -l /sys/bus/coresight/devices/funnel4/connections
292+ <file details> in:0 -> ../../../20010000.etf/tmc_etf0
293+ <file details> in:1 -> ../../../20140000.etf/tmc_etf1
294+ <file details> nr_links
295+ <file details> out:0 -> ../../../20120000.replicator/replicator0
296+
297+ and a ``replicator0 ``::
298+
299+ linaro-developer:~# ls -l /sys/bus/coresight/devices/replicator0/connections
300+ <file details> in:0 -> ../../../20150000.funnel/funnel4
301+ <file details> nr_links
302+ <file details> out:0 -> ../../../20030000.tpiu/tpiu0
303+ <file details> out:1 -> ../../../20070000.etr/tmc_etr0
304+
305+ Arriving at the final sink in the chain, ``tmc_etr0 ``::
306+
307+ linaro-developer:~# ls -l /sys/bus/coresight/devices/tmc_etr0/connections
308+ <file details> cti_sys0 -> ../../../20020000.cti/cti_sys0
309+ <file details> in:0 -> ../../../20120000.replicator/replicator0
310+ <file details> nr_links
311+
312+ As described below, when using sysfs it is sufficient to enable a sink and
313+ a source for successful trace. The framework will correctly enable all
314+ intermediate links as required.
315+
316+ Note: ``cti_sys0 `` appears in two of the connections lists above.
317+ CTIs can connect to multiple devices and are arranged in a star topology
318+ via the CTM. See (:doc: `coresight-ect `) [#fourth ]_ for further details.
319+ Looking at this device we see 4 connections::
320+
321+ linaro-developer:~# ls -l /sys/bus/coresight/devices/cti_sys0/connections
322+ <file details> nr_links
323+ <file details> stm0 -> ../../../20100000.stm/stm0
324+ <file details> tmc_etf0 -> ../../../20010000.etf/tmc_etf0
325+ <file details> tmc_etr0 -> ../../../20070000.etr/tmc_etr0
326+ <file details> tpiu0 -> ../../../20030000.tpiu/tpiu0
327+
328+
244329How to use the tracer modules
245330-----------------------------
246331
0 commit comments