Hi Al, Jeremy,
On Fri, Jul 19, 2019 at 09:16:35AM +0000, Al Grant wrote:
Hi,
CSAL can be tricky to use as a discovery tool. I’ve now added a Python tool which might be easier to use, especially if you have to work around bus hangs etc. Please see csscan.py here:
https://github.com/ARM-software/CSAL/tree/master/coresight-tools
You can do a scan using
python csscan.py <rom-base-address>
As well as listing configuration details for the devices, it can also discover ATB topology (not CTI yet, sorry) and report on what state the devices are currently in.
There’s some explanation on the discovery process:
https://github.com/ARM-software/CSAL/blob/master/coresight-tools/discovery.m...
Today I found time to try CSAL tool with script csscan.py on Hikey960, just list some finding at my side.
- Firstly, I run the script csscan.py with below command:
python csscan.py -vvv 0xEC000000
- The result is very unstable and easily to cause the external abort. I can confirm that this is not caused by clock; and the external abort is random happening when access different registers. Usually, this is caused by some specific timing requirement or even memory barrier issue; This is why I worked out the enclosed patches, which sleep for 1s for every registers accessing (both for reading and writing); This can improve much and avoid the abort issue.
I also force 'check=True' for write operations so want to add a read-after-write barrier but actually this is not very useful.
@Al, not sure if the patch can provide any useful code which can be picked or not?
- Based on the enclosed script, there still have two registers accessing will always cause the external abort: 0xec040000 and 0xec040000, this two registers are for timestamp based on the log; So I use below command to exclude these two registers accessing and then the csscan.py script can finish traversing for CoreSight topology. The great thing is I also can see the script will dump the CTI related registers.
python csscan.py -vvv --exclude=0xec040000 --exclude=0xec080000 0xEC000000
Thanks, Leo Yan