Adding the coresight mailing list
On Tue, 12 Jan 2021 at 04:17, Ajay Bharadwaj ajayrbharadwaj@gmail.com wrote:
Hi,
I'm working on enabling STM and ETB support on Texas Instruments' platforms.
Currently, I can write directly to the STM device in sysfs and read back the encoded data from the ETB's buffer. I am using the Trace Packet Lister (trc_pkt_lister) from Linaro's OpenCSD [1] to decode the data obtained from the ETB. The decoded data matches what was written to the STM (Albeit the data is reversed in some cases, this seems to be expected according to the ARM specification).
However, when I use the STM Source Console [2] instead of writing directly to the STM device, I can still read back the encoded data from the ETB buffer but OpenCSD cannot find any trace data in it.
Is there any other tool that I can use instead of OpenCSD or am I doing something wrong? Here are the commands I am running (I've tried using the p_sys-t STP policy as well with the same result):
Enabling CoreSight and STM Source Console:
- mkdir -p /config
- mount -t configfs none /config
- mkdir /config/stp-policy/stm0.policy
- mkdir /config/stp-policy/stm0.policy/console
- echo 1 > /sys/bus/coresight/devices/etb0/enable_sink
- echo stm0 > /sys/class/stm_source/console/stm_source_link
Reading decoded data from ETB buffer:
- dd if=/dev/etb0 of=test.bin
OpenCSD Output: Trace Packet Lister: CS Decode library testing
** Library Version : 0.14.4
Test Command Line:- ./tests/bin/linux64/dbg/trc_pkt_lister -ss_dir tests/snapshots/stm_only/ -src_name ETB_1
Trace Packet Lister : reading snapshot from path tests/snapshots/stm_only/ Using ETB_1 as trace source Trace Packet Lister : Protocol printer STM on Trace ID 0x1 ID:1 END OF TRACE DATA Trace Packet Lister : Trace buffer done, processed 16384 bytes.
[1] https://github.com/Linaro/OpenCSD/blob/master/decoder/tests/source/trc_pkt_l... [2] Driver: hwtracing/stm/console.c
Any help or guidance would be much appreciated.
Regards, Ajay Bharadwaj