Hi Jeremy,
However I have a question, are you using Lauterbach tools as mentioned in the issue description or another debug tool ?
[UG] Yes I am using Lauterbach
Moreover, I have an idea of a scenario that you could perform:
- Attach your debug tool to the board (i.MX6Q in a closed configuration) during runtime
- Perform a software reset of the i.MX6Q
- I know that the JTAG connection will reset but I am interested in knowing if the boot rom code will be able to
properly authenticate your images and start u-boot in your case. I observed that in such scenario the boot rom code fails to authenticate images so it does not jump over our custom boot loader (u-boot in your case).
[UG] Yes that the correct behavior. The Boot ROM does not allow booting a chip with active JTAG connection. It has protection in place (including HAB) that monitors the security violations and does not transition to chip (SSM) from Init to Secure state/Trusted state. Instead, it fails to boot and brings up serial download.
One more point, before to post here I have (wrongly) created a "support case" (#00154424), with more or less the same content that I posted here.
And I got the following answer:
" The behaviour you describe is the expected one for the Closed HAB configuration due to the scan protection logic operation you've mentioned. "
But if you are able to attach and debug in a closed configuration on your side I feel confused.
[UG] It is true that the scan protection logic will not allow debugging of sensitive information that exists in CAAM, SNVS etc modules. Although the interrupt generation right after attaching the debugger seems to be peculiar and is what I am trying to replicate here.
The SNVS log you sent also seems to work correctly, i.e. switching SSM state to Soft fail when JTAG is active.
Is it possible that your code is trying to access certain chip secret information for blob operation or something due to which when you connect to the JTAG, CAAM throws this interrupt?
The interrupt status reports the following:
If reading HALT returns 10: CAAM has flushed all jobs from this Job Ring and has halted processing jobs in this
Job Ring. If there is not enough room in the Output Ring for all the flushed jobs, HALT will continue to return
01 until software has removed enough jobs so that all the flushed jobs can be written to the Output Ring.
Software writes a “1” to the MSB of HALT (bit 3) to clear the HALT field and resume processing jobs in this Job
Ring. An error will occur if 1 is written to the MSB of the HALT field before the HALT field indicates that
CAAM has flushed all jobs from this Job Ring.
Thanks,
Utkarsh