Hi Jeremy,
On Wed, Jul 17, 2019 at 05:53:28PM +0800, Jeremy Ng wrote:
Dear Leo Yan,
I will like to ask if there are any better documentations that detail the memory mapped addresses for Coresight registers in Hikey960.
I am currently referring to Chapter 2-9-1 in http://mirror.lemaker.org/HiKey960_SoC_Reference_Manual.pdf. This is all the information about coresight addresses that I could retrieve:
0xEC000000 0xED7FFFFF 24M CSSYS_APB
As I know, the CoreSight registers address mapping is not contained in this pdf file.
On the other hand, could you check if below patch is sufficient for you? In this patch, it enabled CoreSight on Hikey960 and contains the addresses for CoreSight devices. https://archive.armlinux.org.uk/lurker/message/20190420.140035.74b936ef.en.h...
I will like to check if there are any datasheet for hikey960 that is as detailed as that for Juno device (link here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0515b/CHDIFAD... ).
This is important to me as I am trying to acquire the device snapshot by using CSAL API. I am not sure if there are other ways to do this since the documentation hasn't been exactly straightforward.
The reason for wanting the snapshot is to possibly run openCSD and decode my trace binary files.
I have followed the CSAL build documentations and ran `csls` on my hikey960. The following output is seen but it crashed my device soon after:
hikey960:/ # csls ** CSLS: listing CoreSight config... ** CSLS: Using default ROM address 0xEC000000 00EC031000: 2.1 908 00000037 00/0F type= 4 - LINK [FUNNEL: 7 in ports] 00EC032000: 1.1 912 000000A0 00/0F type= 8 - SINK PORT [TPIU] 00EC033000: 1.2 961 00001B40 00/0F type= 7 - SINK BUFFER(ETR r/w size: 4K) [TMC: ETR configuration] 00EC034000: 4.1 906 00040800 00/0F type=10 - CTI 00EC035000: 3.6 963 00010000 00/0F type= 3 - SOURCE SWSTIM(65536) [STM ext ports only, 64-bit, 128 masters] 00EC036000: 2.3 961 00000480 00/0F type= 6 - LINK SINK BUFFER(4K) [TMC: ETF configuration] 00EC037000: type=13 O TIMESTAMP 00EC038000: type=13 O TIMESTAMP
I will also like to understand why it might have crashed my device during the execution of csls.
Cool! Thanks for sharing the method.
Could you try to disable CPUidles for Hikey960? E.g. you could add 'nohlt' in the kernel command line to prevent CPU idle states. Or you could use below command:
# exec 3<> /dev/cpu_dma_latency; echo 0 >&3
Thanks, Leo Yan