Hi Yabin.
On Fri, 11 Oct 2019 at 03:45, Yabin Cui yabinc@google.com wrote:
Hi coresight team,
In ARM ETM specification for ETM4.0 to 4.2, TRCAUTHSTATUS contains NSNID, showing whether non-invasive debug is disabled. And In ARM Coresight Specification 3.0, NSNID field is 0b10 (supported and disabled) if (NIDEN | DBGEN) == FALSE. And In ARM architecture manual for ARMv8-A, in K2.1: DBGEN is for external debug enable. NIDEN is for external profiling and trace enable.
So it seems if DBGEN and NIDEN is disabled by hardware, even if the intention is to disable external debug interface, ETM is totally disabled. And there is no way to use it for self-hosted tracing.
For PE architectures prior to v8.4, the ETM is considered a separate external debug component from the PE for authentication purposes. Therefore it follows the authentication rules described in ARM Coresight Specification 3.0, C 5.4: rule 3
"3. If NIDEN is LOW and DBGEN is LOW, neither invasive nor non-invasive debug is permitted"
The is reflected in the NSNID signals in the ETM register.
In these systems, for self hosted trace control one or both of NIDEN or DBGEN must be enabled for trace to work.
Is it true? And if yes, is there any plan to solve it in the future?
In PE architectures that support the ARM v8.4 self hosted trace extensions, non-invasive debug is always enabled. (see ETMv4.0 to 4.4 spec, 7.3.3 TRCAUTHSTATUS, Authentication Status register)
Thanks, Yabin
Regards
Mike