ERR003732Chip Errata for the i.MX 6Dual/6Quad and i.MX 6DualPlus/6QuadPlus, Rev. 6.1, 06/2016NXP Semiconductors 37Description:About the DBGPCSR register, the ARM architecture specifies that:• DBGPCSR[31:2] contains sampled value of bits [31:2] of the PC.The sampled value is an instruction address plus an offset that depends on the processorinstruction set state.• DBGPCSR[1:0] contains the meaning of PC sample value, with the following permitted values:— 0b00 ((DBGPCSR[31:2] << 2) - 8) references an ARM state instruction— 0bx1 ((DBGPCSR[31:1] << 1) - 4) references a Thumb or ThumbEE state instruction— 0b10 IMPLEMENTATION DEFINEDThis field encodes the processor instruction set state, so that the profiling tool can calculate the trueinstruction address by subtracting the appropriate offset from the value sampled in bits [31:2] ofthe register.In Cortex-A9, the DBGPCSR samples the target address of executed branches (but possibly stillspeculative to data aborts), with the following encodings:• DBGPCSR[31:2] contains the address of the target branch instruction, with no offset• DBGPCSR[1:0] contains the execution state of the target branch instruction:— 0xb00 for an ARM state instruction— 0xb01 for a Thumb2 state instruction— 0xb10 for a Jazelle state instruction— 0xb11 for a Thumb2EE state instructionProjected Impact:The implication of this erratum is that the debugger tools neither rely on the architected descriptionfor the value of DBGPCSR[1:0], nor remove any offset from DBGPCSR[31:2], to obtain theexpected PC value.Subtracting 4 or 8 to the DBGPCSR[31:2] value would lead to an area of code that is unlikely tohave been recently executed, or that could even not contain any executable code.The same might be true for Thumb instructions at half-word boundaries, in which case PC[1]=1but DBGPCSR[1]=0, or ThumbEE instructions at word boundaries, with PC[1]=0 andDBGPCSR[1]=1.In Cortex-A9, because the DBGPCSR is always a branch target (= start of a basic block to the tool),the debugger should be able to spot many of these cases and attribute the sample to the right basicblock.Workarounds:The debugger tools can find the expected PC value and instruction state by reading the DBGPCSRregister, and consider it as described in the Description section.ERR003732 ARM: 751471—DBGPCSR format is incorrect