I am currently working with a ZedBoard featuring the Zynq 700 and have enabled CoreSight components in the kernel features and device tree blob (DTB). I can confirm that I can view the CoreSight devices located in /sys/bus/.
However, I've encountered an issue when attempting to enable or disable CoreSight data dumps. The results are only producing minimal binary files.
ubuntu@arm:/sys/bus/coresight/devices$ ls -lh total 0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etb0 -> ../../../devices/soc0/axi/f8801000.etb/etb0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etm0 -> ../../../devices/soc0/axi/f889c000.ptm/etm0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etm1 -> ../../../devices/soc0/axi/f889d000.ptm/etm1 lrwxrwxrwx 1 root root 0 Mar 27 2023 funnel0 -> ../../../devices/soc0/axi/f8804000.funnel/funnel0 lrwxrwxrwx 1 root root 0 Mar 27 2023 replicator0 -> ../../../devices/soc0/replicator/replicator0 lrwxrwxrwx 1 root root 0 Mar 27 2023 tpiu0 -> ../../../devices/soc0/axi/f8803000.tpiu/tpiu0
ubuntu@arm:/sys/bus/coresight/devices$ dmesg | grep coresight [ 1.578865] coresight etm0: PTM 1.0 initialized [ 1.584452] coresight etm1: PTM 1.0 initialized
ubuntu@arm:/sys/bus/coresight/devices$ dmesg | grep amba [ 0.033923] amba f8801000.etb: Fixed dependency cycle(s) with /replicator/out-ports/port@1/endpoint [ 0.034129] amba f8803000.tpiu: Fixed dependency cycle(s) with /replicator/out-ports/port@0/endpoint [ 0.034358] amba f8804000.funnel: Fixed dependency cycle(s) with /replicator/in-ports/port/endpoint [ 0.034571] amba f889c000.ptm: Fixed dependency cycle(s) with /axi/funnel@f8804000/in-ports/port@0/endpoint [ 0.034779] amba f889d000.ptm: Fixed dependency cycle(s) with /axi/funnel@f8804000/in-ports/port@1/endpoint
root@arm:/sys/bus/coresight/devices# echo 1 | sudo tee etb0/enable_sink 1 root@arm:/sys/bus/coresight/devices# echo 1 | sudo tee etm1/enable_source 1 root@arm:/sys/bus/coresight/devices# dd if=/dev/etb0 of=~/cstrace.bin 8+0 records in 8+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00763361 s, 537 kB/s root@arm:~# hexdump -C cstrace.bin 00000000 ff ff ff 7f ff ff ff 7f ff ff ff 7f ff ff ff 7f |................| 00000010 25 86 d2 1f c4 8c 86 1a 8a e9 22 84 c4 a9 c8 4b |%........."....K| 00000020 02 c1 b0 e3 00 d1 a8 c8 02 e7 de a8 04 e0 8a 3b |...............;| 00000030 ce 18 8e c1 18 e5 22 88 ac e1 d6 03 de d7 a8 75 |......"........u| 00000040 04 86 f6 1f 8c 85 20 8c 0e ce 86 85 f6 c7 02 d2 |...... .........| 00000050 ea fe f0 00 8a b9 8e c8 02 84 4a f1 fe f0 00 31 |..........J....1| 00000060 a0 9d c0 d3 02 b4 fe 00 94 8d 00 dc 14 94 9a ee |................| 00000070 fc f0 00 b8 d6 c0 d2 03 9c 7f 94 8d 00 dc 14 cd |................| 00000080 94 c1 fa e0 00 8a b8 c3 22 f5 fe 22 ae fd 30 7a |........".."..0z| 00000090 25 8c 36 9a 44 ee 50 b8 f6 8e c8 03 a6 c9 00 9e |%.6.D.P.........| 000000a0 9c 55 84 59 92 0f c8 cc 9c a1 c8 e5 00 84 fc e4 |.U.Y............| 000000b0 96 c8 02 a8 ac 0f ea d4 ea fc ea d4 ec c4 b8 07 |................| 000000c0 ca 12 e6 f6 f2 cb fe f0 00 c2 9e e5 a6 3c e6 41 |.............<.A| 000000d0 84 f5 1a a2 da 1c f4 8c 8a f2 38 f0 94 bb 8e b6 |..........8.....| 000000e0 3a 88 56 b7 f2 39 84 f3 9c 3c a6 0d 9e ef 26 82 |:.V..9...<....&.| 000000f0 ca 98 da fe 30 98 f0 f6 c6 03 84 79 b0 cb de 9a |....0......y....| 00000100 a8 04 8c ad e0 d7 02 df d6 a8 04 86 d2 1f c4 5c |...............| 00000110 25 8c 86 1a 8a e9 22 84 c4 a9 c8 03 c0 b1 e2 d3 |%.....".........| 00000120 00 d1 a8 c8 02 e7 de a8 04 e0 8a cf 18 8e c0 8e |................| 00000130 18 e5 22 88 ac e1 d6 03 de d7 a8 04 86 f7 1e 9d |..".............| 00000140 8c 85 20 8c 0e ce 86 85 f6 c7 02 eb fe f0 00 34 |.. ............4| 00000150 8a b9 8e c8 02 84 4a f1 fe f0 00 a0 9c c1 d2 cc |......J.........| 00000160 02 b4 fe 00 94 8d 00 dc 14 94 9a fd f0 00 b8 3b |...............;| 00000170 d6 c0 d2 03 9c 7f 94 8d 00 dc 14 94 c0 fb e0 73 |...............s| 00000180 00 8a b8 c3 22 f5 fe 22 ae fd 30 8c 36 9a 44 de |....".."..0.6.D.| 00000190 25 ee 50 b8 f6 8e c8 03 a6 c9 00 9c 54 84 58 e6 |%.P.........T.X.| 000001a0 92 0f c8 cc 9c a1 c8 e5 00 84 fc 97 c8 03 a8 39 |...............9| 000001b0 ac 0f ea d4 ea fc ea d4 ec c4 b8 cb 12 e6 f6 01 |................| 000001c0 f2 cb fe f0 00 c2 9e e5 a6 3c e6 84 f4 1b a2 50 |.........<.....P| 000001d0 da 1c f4 8c 8a f2 38 f0 94 bb 8e 3a 88 57 b6 ad |......8....:.W..| 000001e0 f2 39 84 f3 9c 3c a6 0d 9e ef 26 ca 98 db fe 20 |.9...<....&.... | 000001f0 30 98 f0 f6 c6 03 84 79 b0 cb de a8 04 8c ac a6 |0......y........| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00001000
With perf i get I get Error:70 Incomplete data
With Opencsd root@arm:/home/ubuntu/my-opencsd/decoder/tests/bin/builddir# ls -l /root/my/ total 8 -rw-r--r-- 1 root root 4096 Oct 10 07:11 cstrace.bin drwxr-xr-x 3 root root 4096 Sep 10 06:30 own
root@arm:/home/ubuntu/my-opencsd/decoder/tests/bin/builddir# ./trc_pkt_lister -ss_dir /root/my/ -decode Trace Packet Lister: CS Decode library testing -----------------------------------------------
** Library Version : 1.5.4
Test Command Line:- ./trc_pkt_lister -ss_dir /root/my/ -decode
Trace Packet Lister : reading snapshot from path /root/my/ Trace Packet Lister : Snapshot path/root/my/ not found
ON running CSAL to identify the topology of componets. I get the following output
ubuntu@arm:~/CSAL/coresight-tools$ python cs_topology.py Running self-tests... None: 0 devices, 10 links Platform: None <no address> m1 core-trace <no address> m2 core-trace <no address> m3 core-trace <no address> stm sw-trace <no address> fifo1 fifo <no address> port port <no address> buffer buffer <no address> hidden-funnel:fifo1.s1 funnel hidden <no address> hidden-replicator:fifo1.m0 replicator hidden <no address> hidden-funnel:buffer.s0 funnel hidden Links: stm.0 --(ATB)--> 2.fifo1 m1.0 --(ATB)--> hidden-funnel:fifo1.s1 hidden-funnel:fifo1.s1.0 --(ATB)--> 1.fifo1 m2.0 --(ATB)--> hidden-funnel:fifo1.s1 m3.0 --(ATB)--> hidden-funnel:fifo1.s1 hidden-replicator:fifo1.m0 --(ATB)--> 0.port fifo1.0 --(ATB)--> 0.hidden-replicator:fifo1.m0 hidden-replicator:fifo1.m0 --(ATB)--> hidden-funnel:buffer.s0 hidden-funnel:buffer.s0.0 --(ATB)--> 0.buffer hidden-replicator:fifo1.m0 --(ATB)--> hidden-funnel:buffer.s0 CPUs:
Hi,
On Thu, 10 Oct 2024 at 09:34, deepanjali.s.19@gmail.com wrote:
I am currently working with a ZedBoard featuring the Zynq 700 and have enabled CoreSight components in the kernel features and device tree blob (DTB). I can confirm that I can view the CoreSight devices located in /sys/bus/.
However, I've encountered an issue when attempting to enable or disable CoreSight data dumps. The results are only producing minimal binary files.
ubuntu@arm:/sys/bus/coresight/devices$ ls -lh total 0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etb0 -> ../../../devices/soc0/axi/f8801000.etb/etb0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etm0 -> ../../../devices/soc0/axi/f889c000.ptm/etm0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etm1 -> ../../../devices/soc0/axi/f889d000.ptm/etm1 lrwxrwxrwx 1 root root 0 Mar 27 2023 funnel0 -> ../../../devices/soc0/axi/f8804000.funnel/funnel0 lrwxrwxrwx 1 root root 0 Mar 27 2023 replicator0 -> ../../../devices/soc0/replicator/replicator0 lrwxrwxrwx 1 root root 0 Mar 27 2023 tpiu0 -> ../../../devices/soc0/axi/f8803000.tpiu/tpiu0
ubuntu@arm:/sys/bus/coresight/devices$ dmesg | grep coresight [ 1.578865] coresight etm0: PTM 1.0 initialized [ 1.584452] coresight etm1: PTM 1.0 initialized
ubuntu@arm:/sys/bus/coresight/devices$ dmesg | grep amba [ 0.033923] amba f8801000.etb: Fixed dependency cycle(s) with /replicator/out-ports/port@1/endpoint [ 0.034129] amba f8803000.tpiu: Fixed dependency cycle(s) with /replicator/out-ports/port@0/endpoint [ 0.034358] amba f8804000.funnel: Fixed dependency cycle(s) with /replicator/in-ports/port/endpoint [ 0.034571] amba f889c000.ptm: Fixed dependency cycle(s) with /axi/funnel@f8804000/in-ports/port@0/endpoint [ 0.034779] amba f889d000.ptm: Fixed dependency cycle(s) with /axi/funnel@f8804000/in-ports/port@1/endpoint
root@arm:/sys/bus/coresight/devices# echo 1 | sudo tee etb0/enable_sink 1 root@arm:/sys/bus/coresight/devices# echo 1 | sudo tee etm1/enable_source 1
You need to disable source and sink before reading the data.
root@arm:/sys/bus/coresight/devices# dd if=/dev/etb0 of=~/cstrace.bin 8+0 records in 8+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00763361 s, 537 kB/s root@arm:~# hexdump -C cstrace.bin 00000000 ff ff ff 7f ff ff ff 7f ff ff ff 7f ff ff ff 7f |................| 00000010 25 86 d2 1f c4 8c 86 1a 8a e9 22 84 c4 a9 c8 4b |%........."....K| 00000020 02 c1 b0 e3 00 d1 a8 c8 02 e7 de a8 04 e0 8a 3b |...............;| 00000030 ce 18 8e c1 18 e5 22 88 ac e1 d6 03 de d7 a8 75 |......"........u| 00000040 04 86 f6 1f 8c 85 20 8c 0e ce 86 85 f6 c7 02 d2 |...... .........| 00000050 ea fe f0 00 8a b9 8e c8 02 84 4a f1 fe f0 00 31 |..........J....1| 00000060 a0 9d c0 d3 02 b4 fe 00 94 8d 00 dc 14 94 9a ee |................| 00000070 fc f0 00 b8 d6 c0 d2 03 9c 7f 94 8d 00 dc 14 cd |................| 00000080 94 c1 fa e0 00 8a b8 c3 22 f5 fe 22 ae fd 30 7a |........".."..0z| 00000090 25 8c 36 9a 44 ee 50 b8 f6 8e c8 03 a6 c9 00 9e |%.6.D.P.........| 000000a0 9c 55 84 59 92 0f c8 cc 9c a1 c8 e5 00 84 fc e4 |.U.Y............| 000000b0 96 c8 02 a8 ac 0f ea d4 ea fc ea d4 ec c4 b8 07 |................| 000000c0 ca 12 e6 f6 f2 cb fe f0 00 c2 9e e5 a6 3c e6 41 |.............<.A| 000000d0 84 f5 1a a2 da 1c f4 8c 8a f2 38 f0 94 bb 8e b6 |..........8.....| 000000e0 3a 88 56 b7 f2 39 84 f3 9c 3c a6 0d 9e ef 26 82 |:.V..9...<....&.| 000000f0 ca 98 da fe 30 98 f0 f6 c6 03 84 79 b0 cb de 9a |....0......y....| 00000100 a8 04 8c ad e0 d7 02 df d6 a8 04 86 d2 1f c4 5c |...............| 00000110 25 8c 86 1a 8a e9 22 84 c4 a9 c8 03 c0 b1 e2 d3 |%.....".........| 00000120 00 d1 a8 c8 02 e7 de a8 04 e0 8a cf 18 8e c0 8e |................| 00000130 18 e5 22 88 ac e1 d6 03 de d7 a8 04 86 f7 1e 9d |..".............| 00000140 8c 85 20 8c 0e ce 86 85 f6 c7 02 eb fe f0 00 34 |.. ............4| 00000150 8a b9 8e c8 02 84 4a f1 fe f0 00 a0 9c c1 d2 cc |......J.........| 00000160 02 b4 fe 00 94 8d 00 dc 14 94 9a fd f0 00 b8 3b |...............;| 00000170 d6 c0 d2 03 9c 7f 94 8d 00 dc 14 94 c0 fb e0 73 |...............s| 00000180 00 8a b8 c3 22 f5 fe 22 ae fd 30 8c 36 9a 44 de |....".."..0.6.D.| 00000190 25 ee 50 b8 f6 8e c8 03 a6 c9 00 9c 54 84 58 e6 |%.P.........T.X.| 000001a0 92 0f c8 cc 9c a1 c8 e5 00 84 fc 97 c8 03 a8 39 |...............9| 000001b0 ac 0f ea d4 ea fc ea d4 ec c4 b8 cb 12 e6 f6 01 |................| 000001c0 f2 cb fe f0 00 c2 9e e5 a6 3c e6 84 f4 1b a2 50 |.........<.....P| 000001d0 da 1c f4 8c 8a f2 38 f0 94 bb 8e 3a 88 57 b6 ad |......8....:.W..| 000001e0 f2 39 84 f3 9c 3c a6 0d 9e ef 26 ca 98 db fe 20 |.9...<....&.... | 000001f0 30 98 f0 f6 c6 03 84 79 b0 cb de a8 04 8c ac a6 |0......y........| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001000
Tracing into an ETB will gain a maximum of 1 buffer full of trace - the input will wrap repeatedly until the trace source / sink are disabled. This ETB appears to have a 4k buffer - that is the maximum trace you can capture using sysfs.
perf will read multiple buffers into the perf.data file when using this method, though these will likely not be contiguous as there is no way in this hardware to detect full buffers and stop trace.
With perf i get I get Error:70 Incomplete data
With Opencsd root@arm:/home/ubuntu/my-opencsd/decoder/tests/bin/builddir# ls -l /root/my/ total 8 -rw-r--r-- 1 root root 4096 Oct 10 07:11 cstrace.bin drwxr-xr-x 3 root root 4096 Sep 10 06:30 own
root@arm:/home/ubuntu/my-opencsd/decoder/tests/bin/builddir# ./trc_pkt_lister -ss_dir /root/my/ -decode Trace Packet Lister: CS Decode library testing
** Library Version : 1.5.4
Test Command Line:- ./trc_pkt_lister -ss_dir /root/my/ -decode
Trace packet lister needs a full snapshot to operate on, a single binary is insufficient.
From the opencsd source directory see decoder/docs/specs/ARM Trace and Debug snapshot file format.pdf. for snapshot format details. look at decoder/snapshots for examples of snapshots that can be decoded.
Also note for full decode you will need the program image of whatever was loaded while tracing. This is very difficult to determine when tracing arbitrarily in sysfs. You should be able to do packet only decode if you get valid trace - see the documentation in decoder/docs for a description of the difference between these, and the principles of trace decode and what is required to get full decode.
Trace Packet Lister : reading snapshot from path /root/my/ Trace Packet Lister : Snapshot path/root/my/ not found _______________________________________________ CoreSight mailing list -- coresight@lists.linaro.org To unsubscribe send an email to coresight-leave@lists.linaro.org
Regards
Mike
-----Original Message----- From: Mike Leach mike.leach@linaro.org Sent: Friday, October 11, 2024 10:20 AM To: deepanjali.s.19@gmail.com Cc: coresight@lists.linaro.org Subject: Re: Minimal or Incomplete trace data on zynq-7000
Hi,
On Thu, 10 Oct 2024 at 09:34, deepanjali.s.19@gmail.com wrote:
I am currently working with a ZedBoard featuring the Zynq 700 and have
enabled CoreSight components in the kernel features and device tree blob (DTB). I can confirm that I can view the CoreSight devices located in /sys/bus/.
However, I've encountered an issue when attempting to enable or disable
CoreSight data dumps. The results are only producing minimal binary files.
ubuntu@arm:/sys/bus/coresight/devices$ ls -lh total 0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etb0 -> ../../../devices/soc0/axi/f8801000.etb/etb0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etm0 -> ../../../devices/soc0/axi/f889c000.ptm/etm0 lrwxrwxrwx 1 root root 0 Mar 27 2023 etm1 -> ../../../devices/soc0/axi/f889d000.ptm/etm1 lrwxrwxrwx 1 root root 0 Mar 27 2023 funnel0 -> ../../../devices/soc0/axi/f8804000.funnel/funnel0 lrwxrwxrwx 1 root root 0 Mar 27 2023 replicator0 -> ../../../devices/soc0/replicator/replicator0 lrwxrwxrwx 1 root root 0 Mar 27 2023 tpiu0 -> ../../../devices/soc0/axi/f8803000.tpiu/tpiu0
ubuntu@arm:/sys/bus/coresight/devices$ dmesg | grep coresight [ 1.578865] coresight etm0: PTM 1.0 initialized [ 1.584452] coresight etm1: PTM 1.0 initialized
ubuntu@arm:/sys/bus/coresight/devices$ dmesg | grep amba [ 0.033923] amba f8801000.etb: Fixed dependency cycle(s) with
/replicator/out-ports/port@1/endpoint
[ 0.034129] amba f8803000.tpiu: Fixed dependency cycle(s) with
/replicator/out-ports/port@0/endpoint
[ 0.034358] amba f8804000.funnel: Fixed dependency cycle(s) with
/replicator/in-ports/port/endpoint
[ 0.034571] amba f889c000.ptm: Fixed dependency cycle(s) with
/axi/funnel@f8804000/in-ports/port@0/endpoint
[ 0.034779] amba f889d000.ptm: Fixed dependency cycle(s) with
/axi/funnel@f8804000/in-ports/port@1/endpoint
root@arm:/sys/bus/coresight/devices# echo 1 | sudo tee etb0/enable_sink 1 root@arm:/sys/bus/coresight/devices# echo 1 | sudo tee etm1/enable_source 1
You need to disable source and sink before reading the data.
root@arm:/sys/bus/coresight/devices# dd if=/dev/etb0 of=~/cstrace.bin 8+0 records in 8+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00763361 s, 537 kB/s root@arm:~# hexdump -C cstrace.bin 00000000 ff ff ff 7f ff ff ff 7f ff ff ff 7f ff ff ff 7f |................| 00000010 25 86 d2 1f c4 8c 86 1a 8a e9 22 84 c4 a9 c8 4b |%........."....K| 00000020 02 c1 b0 e3 00 d1 a8 c8 02 e7 de a8 04 e0 8a 3b |...............;| 00000030 ce 18 8e c1 18 e5 22 88 ac e1 d6 03 de d7 a8 75 |......"........u| 00000040 04 86 f6 1f 8c 85 20 8c 0e ce 86 85 f6 c7 02 d2 |...... .........| 00000050 ea fe f0 00 8a b9 8e c8 02 84 4a f1 fe f0 00 31 |..........J....1| 00000060 a0 9d c0 d3 02 b4 fe 00 94 8d 00 dc 14 94 9a ee |................| 00000070 fc f0 00 b8 d6 c0 d2 03 9c 7f 94 8d 00 dc 14 cd |................| 00000080 94 c1 fa e0 00 8a b8 c3 22 f5 fe 22 ae fd 30 7a |........".."..0z| 00000090 25 8c 36 9a 44 ee 50 b8 f6 8e c8 03 a6 c9 00 9e |%.6.D.P.........| 000000a0 9c 55 84 59 92 0f c8 cc 9c a1 c8 e5 00 84 fc e4 |.U.Y............| 000000b0 96 c8 02 a8 ac 0f ea d4 ea fc ea d4 ec c4 b8 07 |................| 000000c0 ca 12 e6 f6 f2 cb fe f0 00 c2 9e e5 a6 3c e6 41 |.............<.A| 000000d0 84 f5 1a a2 da 1c f4 8c 8a f2 38 f0 94 bb 8e b6 |..........8.....| 000000e0 3a 88 56 b7 f2 39 84 f3 9c 3c a6 0d 9e ef 26 82 |:.V..9...<....&.| 000000f0 ca 98 da fe 30 98 f0 f6 c6 03 84 79 b0 cb de 9a |....0......y....| 00000100 a8 04 8c ad e0 d7 02 df d6 a8 04 86 d2 1f c4 5c |...............| 00000110 25 8c 86 1a 8a e9 22 84 c4 a9 c8 03 c0 b1 e2 d3 |%.....".........| 00000120 00 d1 a8 c8 02 e7 de a8 04 e0 8a cf 18 8e c0 8e |................| 00000130 18 e5 22 88 ac e1 d6 03 de d7 a8 04 86 f7 1e 9d |..".............| 00000140 8c 85 20 8c 0e ce 86 85 f6 c7 02 eb fe f0 00 34 |.. ............4| 00000150 8a b9 8e c8 02 84 4a f1 fe f0 00 a0 9c c1 d2 cc |......J.........| 00000160 02 b4 fe 00 94 8d 00 dc 14 94 9a fd f0 00 b8 3b |...............;| 00000170 d6 c0 d2 03 9c 7f 94 8d 00 dc 14 94 c0 fb e0 73 |...............s| 00000180 00 8a b8 c3 22 f5 fe 22 ae fd 30 8c 36 9a 44 de |....".."..0.6.D.| 00000190 25 ee 50 b8 f6 8e c8 03 a6 c9 00 9c 54 84 58 e6 |%.P.........T.X.| 000001a0 92 0f c8 cc 9c a1 c8 e5 00 84 fc 97 c8 03 a8 39 |...............9| 000001b0 ac 0f ea d4 ea fc ea d4 ec c4 b8 cb 12 e6 f6 01 |................| 000001c0 f2 cb fe f0 00 c2 9e e5 a6 3c e6 84 f4 1b a2 50 |.........<.....P| 000001d0 da 1c f4 8c 8a f2 38 f0 94 bb 8e 3a 88 57 b6 ad |......8....:.W..| 000001e0 f2 39 84 f3 9c 3c a6 0d 9e ef 26 ca 98 db fe 20 |.9...<....&.... | 000001f0 30 98 f0 f6 c6 03 84 79 b0 cb de a8 04 8c ac a6 |0......y........| 00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001000
Tracing into an ETB will gain a maximum of 1 buffer full of trace - the input will wrap repeatedly until the trace source / sink are disabled. This ETB appears to have a 4k buffer - that is the maximum trace you can capture using sysfs.
perf will read multiple buffers into the perf.data file when using this method, though these will likely not be contiguous as there is no way in this hardware to detect full buffers and stop trace.
With perf i get I get Error:70 Incomplete data
With Opencsd root@arm:/home/ubuntu/my-opencsd/decoder/tests/bin/builddir# ls -l /root/my/ total 8 -rw-r--r-- 1 root root 4096 Oct 10 07:11 cstrace.bin drwxr-xr-x 3 root root 4096 Sep 10 06:30 own
root@arm:/home/ubuntu/my-opencsd/decoder/tests/bin/builddir# ./trc_pkt_lister -ss_dir /root/my/ -decode Trace Packet Lister: CS Decode library testing
** Library Version : 1.5.4
Test Command Line:- ./trc_pkt_lister -ss_dir /root/my/ -decode
Trace packet lister needs a full snapshot to operate on, a single binary is insufficient.
From the opencsd source directory see decoder/docs/specs/ARM Trace and Debug snapshot file format.pdf. for snapshot format details. look at decoder/snapshots for examples of snapshots that can be decoded.
Also note for full decode you will need the program image of whatever was loaded while tracing. This is very difficult to determine when tracing arbitrarily in sysfs. You should be able to do packet only decode if you get valid trace - see the documentation in decoder/docs for a description of the difference between these, and the principles of trace decode and what is required to get full decode.
Also, the PTM decoder will look for an A-Sync sequence before it can begin decoding - this is a sequence of zeroes in the original PTM trace stream (before the 16-byte formatting that is applied to the trace buffer when it multiplexes different trace sources). Your data doesn't appear to contain an A-Sync anywhere.
Now, sometimes when a buffer has wrapped, you might not see an A-Sync right at the start of the buffer, or even at the current write pointer - in that case the correct procedure is to start forward from the current write pointer and discard data until you get an A-Sync. But if you're seeing only 512 bytes of trace, followed by all zeroes, with no A-Sync, something is wrong.
Actually there are less than 512 bytes of trace here, because of the formatting overhead. It looks like there are about 475 bytes of trace, on trace stream (ATID) 0x12. It's not even clear if this is valid PTM trace.
Are you able to find the system ROM table base address and run csscan.py to check device status?
Al
Trace Packet Lister : reading snapshot from path /root/my/ Trace Packet Lister : Snapshot path/root/my/ not found _______________________________________________ CoreSight mailing list -- coresight@lists.linaro.org To unsubscribe send an email to coresight-leave@lists.linaro.org
Regards
Mike
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK _______________________________________________ CoreSight mailing list -- coresight@lists.linaro.org To unsubscribe send an email to coresight-leave@lists.linaro.org
Hi,
With respect to ur suggestion using CSAL/coresight-tools.. I have run csscan.py with base address 0xF880_0000 (Ref:https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Memory-Map)
the output was
root@arm:/home/ubuntu/CSAL/coresight-tools# python3 css.py -vvv 0xF880_1000 (renamed csscan.py as css.py) ** failed to map 0xf8801000 size 0x1000 prot 0x1 on fileno 3 (currently 0 mappings): Traceback (most recent call last): File "css.py", line 2902, in <module> scan_rom(c, table_addr, recurse=(not o_top_only), detect_topology=o_detect_topology, detect_topology_cti=o_detect_topology_cti, enable_timestamps=o_enable_timestamps) File "css.py", line 2708, in scan_rom table = c.create_device_at(table_addr) File "css.py", line 1005, in create_device_at d = Device(self, addr) File "css.py", line 343, in __init__ self.map(write=write) File "css.py", line 374, in map self.phy = DevicePhy(self.cs.devmem, self.base_address, write=write) File "css.py", line 221, in __init__ self.m = devmem.map(mmap_address, write=write) File "css.py", line 889, in map m = mmap.mmap(self.fno, self.page_size, mmap.MAP_SHARED, prot, offset=addr) File "/home/ubuntu/CSAL/coresight-tools/iommap.py", line 90, in __init__ raise EnvironmentError OSError
1) I need to know whether the base address for zynq is correct?
2) What is the solution for the above error
-----Original Message----- From: deepanjali.s.19@gmail.com deepanjali.s.19@gmail.com Sent: Monday, October 14, 2024 9:41 AM To: coresight@lists.linaro.org Subject: RE: Minimal or Incomplete trace data on zynq-7000
Hi,
With respect to ur suggestion using CSAL/coresight-tools.. I have run csscan.py with base address 0xF880_0000 (Ref:https://docs.amd.com/r/en- US/ug585-zynq-7000-SoC-TRM/Memory-Map)
the output was
root@arm:/home/ubuntu/CSAL/coresight-tools# python3 css.py -vvv 0xF880_1000 (renamed csscan.py as css.py) ** failed to map 0xf8801000 size 0x1000 prot 0x1 on fileno 3 (currently 0 mappings): Traceback (most recent call last): File "css.py", line 2902, in <module> scan_rom(c, table_addr, recurse=(not o_top_only), detect_topology=o_detect_topology, detect_topology_cti=o_detect_topology_cti, enable_timestamps=o_enable_timestamps) File "css.py", line 2708, in scan_rom table = c.create_device_at(table_addr) File "css.py", line 1005, in create_device_at d = Device(self, addr) File "css.py", line 343, in __init__ self.map(write=write) File "css.py", line 374, in map self.phy = DevicePhy(self.cs.devmem, self.base_address, write=write) File "css.py", line 221, in __init__ self.m = devmem.map(mmap_address, write=write) File "css.py", line 889, in map m = mmap.mmap(self.fno, self.page_size, mmap.MAP_SHARED, prot, offset=addr) File "/home/ubuntu/CSAL/coresight-tools/iommap.py", line 90, in __init__ raise EnvironmentError OSError
- I need to know whether the base address for zynq is correct?
I don't know. You could try running csscan.py on any of the individual device addresses as listed in the device tree.
- What is the solution for the above error
Could be kernel restrictions. Your kernel needs to not have CONFIG_IO_STRICT_DEVMEM=y.
Al
CoreSight mailing list -- coresight@lists.linaro.org To unsubscribe send an email to coresight-leave@lists.linaro.org