3.12. 851672: ETM May Trace an Incorrect Exception Address
The address in an exception packet is the preferred exception return address. Because of this erratum, the address may be equal to the target address of the exception. The trace stream is not corrupted, and decompression can continue after the affected packet.
The following sequence is required for this erratum to occur:
- The ETM must start tracing instructions because of one of the following:
- ViewInst starts.
- The security state changes indicating trace is now permitted.
- The values of the external debug interface (DBGEN, SPIDEN, NIDEN, SPNIDEN) change to indicate trace is now permitted.
- The CPU exits debug mode.
- Before the CPU executes any other behavior that causes a trace to be generated, it executes a direct branch instruction, which may or may not be taken.
- The next instruction is a load or store that causes a data abort or watchpoint exception.
The trace decompressor may incorrectly infer execution of many instructions from the branch target to the provided address.
WorkaroundThe trace decompressor can detect that this erratum has occurred by checking if the exception address is in the vector table and identifying if the branch was not expected to be taken to the vector table. A decompressor can infer the correct address of the exception packet. The target of the preceding branch (if the branch was taken), or the next instruction after the branch (if the branch was not-taken) provides the correct address of the exception packet.
Did you find the information on this page useful?