According to the manual, we can select PMU events as external input resource of ETM. However, the manual does not describe it in detail, and my attempts also failed.
To perform the experiment, i configure the following registers,
TRCCONFIGR -> 0x18c1 // Enable the return stack, global timestamping, Context ID, and Virtual context identifier tracing
TRCSYNCPR -> 0x8 // Enable trace synchronization every 256 bytes of trace.
TRCTSCTLR -> 0x0 // Disable the timestamp event
TRCTRACEIDR -> some id // set trace id
TRCVICTLR -> 0x6b201 // trace only non-secure EL0
TRCVIIECTLR -> 0x0 // no address range filter
TRCVIPCSSCTLR -> 0x0 // no start or stop points for ViewInst
TRCEXTINSELR -> 0x8 // select PMU event "INST_RETIRED" as external input 1
TRCRSCTLR2 -> 0x1 // select external input 1 for resource selector 2
TRCEVENTCTL0R -> 0x2 // select resource selector 2 to fire event 0
TRCEVENTCTL1R -> 0x1 // enable event 0 to generate event elements in the trace
However, the output of trace does not contain any event element. Did i misconfigured any register? Moreover, according to the manual of Cortex-A57, the PMU event "INST_RETIRED" has four different event number to trace, i.e. [11:8]. Is that mean i can select any of them as the external input for ETM?
Thanks for any help!
Regards,
Zhenyu
View all questions in Arm Development Platforms forum