How to use ARM ETM/ETB at linux?

Frank Li lznuaa at gmail.com
Fri Jun 29 05:20:59 EDT 2012


>
> Thank you for your reply. I will check trace-funnel with our IC team
> owner and update you.
> I have picked up below patch. Anything missed?
>
> * | 2d4660b ARM: etm: Power down etm(s) when tracing is not enabled
> * | 6e48ba5 ARM: etm: Support multiple ETMs/PTMs.
> * | c1db5d4 ARM: etm: Return the entire trace buffer if it is empty after reset
> * | 5b9dda1 ARM: etm: Add some missing locks and error checks
> * | 1a6825a ARM: etm: Configure data tracing
> * | 22a917b ARM: etm: Allow range selection
> * | 684b02b ARM: etm: Don't try to clear the buffer full status after reading th
> * | 86827c5 ARM: etm: Don't limit tracing to only non-secure code.
> * | 936c25b ARM: etm: Don't require clock control
>


Our SOC have trace-funnel. I config it and enable port. First time, I
dump etb and everything is 0xFFFFFF. After run the same command twice,
I get data 0000000000800c01000000000000000000000000

write 0x02144fb0 = 0xc5acce55 /unlock CSTF
write 0x02144000 = 0x31  //open port 1, I have tried open all ports
and same result.
write 0x02144fb0 = 0 //lock CSTF.

root at freescale /sys/devices/etm$ echo v >/proc/sysrq-trigger
SysRq : etm
Trace buffer contents length: 1
--- ETB buffer begin ---
ffffffff

--- ETB buffer end ---
root at freescale /sys/devices/etm$ echo v >/proc/sysrq-trigger
SysRq : etm
Trace buffer contents length: 1
--- ETB buffer begin ---
ffffffff

--- ETB buffer end ---
root at freescale /sys/devices/etm$ echo v >/proc/sysrq-trigger
SysRq : etm
Trace buffer contents length: 5
--- ETB buffer begin ---
0000000000800c01000000000000000000000000


>
>>
>>>>
>>>>
>>>> best regards
>>>> Frank Li
>>>
>>> Yours,
>>> Linus Walleij
>>
>>
>>
>> --
>> Arve Hjønnevåg



More information about the linux-arm-kernel mailing list