How to enable CoreSight ETM trace on RockPro64
#1
Hi,

I am trying to reproduce coresight-trace, a CoreSight ETMv4 trace decoder utility, on RockPro64 running vanilla 6.3.1 Linux kernel and dtbs (https://github.com/RICSecLab/coresight-trace).

The utility depends on a library called CSAL (upstream: https://github.com/arm-software/CSAL, fork: https://github.com/RICSecLab/CSAL/tree/f...dd5e7a744e) which is used to configure CoreSight registers.

I found that the helper script, csscan.py (https://github.com/ARM-software/CSAL/blo.../csscan.py), is supposed to print the topology of CoreSignt components given the address of the ROM table, but it ends up halting the whole machine when trying to access CoreSight components within Big core cluster. Here are the failing output:
Code:
sudo python3 coresight-tools/csscan.py --topology 0xfe400000
@0xfe400000    0x000 0x000 r0.0                        ROM table
@0xfe401000    0x23b 0x908 r2.0  CS Funnel             funnel         <no arch>        in-ports:6
@0xfe403000    0x23b 0x906 r4.0  CS CTI                CTI            <no arch>        channels:4 triggers:8
@0xfe404000    0x23b 0x101 r1.0  TM101 Timestamp       CoreSight timestamp generator
@0xfe405000    0x23b 0x912 r4.0  CS TPIU               port           <no arch>        TPIU
@0xfe420000    0x23b 0x4a3 r4.0                        ROM table
@0xfe430000 - device excluded from scan
@0xfe431000    0x23b 0x9d3 r4.0  Cortex-A53 PMU        PMU (core)     Arm PMUv3 rev0   aff=0x80000000 not acessing
@0xfe432000 - device excluded from scan
@0xfe433000    0x23b 0x9d3 r4.0  Cortex-A53 PMU        PMU (core)     Arm PMUv3 rev0   aff=0x80000001 not acessing
@0xfe434000 - device excluded from scan
@0xfe435000    0x23b 0x9d3 r4.0  Cortex-A53 PMU        PMU (core)     Arm PMUv3 rev0   aff=0x80000002 not acessing
@0xfe436000 - device excluded from scan
@0xfe437000    0x23b 0x9d3 r4.0  Cortex-A53 PMU        PMU (core)     Arm PMUv3 rev0   aff=0x80000003 not acessing
@0xfe438000    0x23b 0x9a8 r4.0  Cortex-A53 CTI        CTI            Arm CTI rev0     aff=0x80000000 channels:4 triggers:8 gate
@0xfe439000    0x23b 0x9a8 r4.0  Cortex-A53 CTI        CTI            Arm CTI rev0     aff=0x80000001 channels:4 triggers:8 gate
@0xfe43a000    0x23b 0x9a8 r4.0  Cortex-A53 CTI        CTI            Arm CTI rev0     aff=0x80000002 channels:4 triggers:8 gate
@0xfe43b000    0x23b 0x9a8 r4.0  Cortex-A53 CTI        CTI            Arm CTI rev0     aff=0x80000003 channels:4 triggers:8 gate
@0xfe43c000    0x23b 0x95d r4.0  Cortex-A53 ETM        ETM            Arm ETMv4 rev0   aff=0x80000000 pdsr=0x00000023 ETMv4.0 ts:64 bb cc min-ccit:4 retstack stall events:4 resources:16 addrcomp:4 ssc:1 pecomp:0 counters:2 seqstates:4 extin:30 extinsel:4
@0xfe43d000    0x23b 0x95d r4.0  Cortex-A53 ETM        ETM            Arm ETMv4 rev0   aff=0x80000001 pdsr=0x00000023 ETMv4.0 ts:64 bb cc min-ccit:4 retstack stall events:4 resources:16 addrcomp:4 ssc:1 pecomp:0 counters:2 seqstates:4 extin:30 extinsel:4
@0xfe43e000    0x23b 0x95d r4.0  Cortex-A53 ETM        ETM            Arm ETMv4 rev0   aff=0x80000002 pdsr=0x00000023 ETMv4.0 ts:64 bb cc min-ccit:4 retstack stall events:4 resources:16 addrcomp:4 ssc:1 pecomp:0 counters:2 seqstates:4 extin:30 extinsel:4
@0xfe43f000    0x23b 0x95d r4.0  Cortex-A53 ETM        ETM            Arm ETMv4 rev0   aff=0x80000003 pdsr=0x00000023 ETMv4.0 ts:64 bb cc min-ccit:4 retstack stall events:4 resources:16 addrcomp:4 ssc:1 pecomp:0 counters:2 seqstates:4 extin:30 extinsel:4
@0xfe600000    0x23b 0x4a4 r0.0                        ROM table
@0xfe610000 - device excluded from scan
@0xfe620000    0x23b 0x906 r4.0  CS CTI                CTI            <no arch>        channels:4 triggers:8

(halt)

Based on the TRM, the address it starts to fail seems to be around the CLUSTERB_CTI0 or CLUSTERB_PMU0, implying that there are some issues with accessing CoreSight components on the Big core cluster.

I'd like to ask if you have any recommendations on what should I do to resolve this issue.

Any information would be deeply appreciated.

Best Regards,
Seonghyun
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  irradium (based on crux linux) RockPro64 riscv64, aarch64 mara 1 474 03-25-2024, 12:12 PM
Last Post: mara
  yocto for RockPro64 Fide 1 716 01-16-2024, 10:01 AM
Last Post: Fide
  Installing Ubuntu Server on RockPro64 deutschlmao 2 2,622 10-29-2023, 04:43 PM
Last Post: brotherj4mes
  Vanilla mainline Debian 11 (Bullseye) on the RockPro64 Pete Tandy 22 17,372 08-16-2023, 01:34 AM
Last Post: varac
  slarm64 (unofficial slackware) ROCKPro64 RK3399 (aarch64) mara 54 83,231 08-11-2023, 11:13 AM
Last Post: mara
  How do I enable Pine touchdisplay as display on Debian? Thisone 0 556 04-23-2023, 11:02 PM
Last Post: Thisone
  Rockpro64 Dead on arrival? quixoticgeek 1 956 03-12-2023, 06:55 PM
Last Post: quixoticgeek
  RockPro64 boot questions misterc 3 1,580 01-13-2023, 06:21 PM
Last Post: misterc
  A fix for Bluetooth audio stuttering on the RockPro64 raph 2 1,662 01-03-2023, 06:53 PM
Last Post: raph
  hello i want to drive an edp screen with my rockpro64 hannescam 0 755 10-20-2022, 01:22 PM
Last Post: hannescam

Forum Jump:


Users browsing this thread: 1 Guest(s)