05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Debug Registers <strong>Reference</strong><br />

C10.3.6 Program Counter Sampling Register (DBGPCSR)<br />

The Program Counter Sampling Register, DBGPCSR, enables a debugger to sample the Program Counter<br />

(PC).<br />

DBGPCSR is defined only in the v7 Debug architecture. However, an <strong>ARM</strong>v6 implementation might<br />

implement DBGPCSR as part of the external debug interface.<br />

In v7 Debug:<br />

It is IMPLEMENTATION DEFINED whether DBGPCSR is:<br />

— not implemented<br />

— implemented as debug register 33, at offset 0x084<br />

— implemented as debug register 40, at offset 0x0A0<br />

— implemented both as debug register 33 <strong>and</strong> as debug register 40.<br />

When DBGPCSR is implemented both as debug register 33 <strong>and</strong> as debug register 40, the two register<br />

numbers are aliases of each other.<br />

You can determine whether, or how, DBGPCSR is implemented as follows:<br />

— If DBGDIDR.PCSR_imp is 1, DBGPCSR is implemented as debug register 33. Otherwise,<br />

reads of register 33 return an UNKNOWN value.<br />

— If DBGDIDR.DEVID_imp is 1 <strong>and</strong> DBGDEVID.PCsample is non-zero, DBGPCSR is<br />

implemented as debug register 40. Otherwise, debug register 40 is reserved.<br />

When implemented, the DBGPCSR is:<br />

a read-only register<br />

when the Security Extensions are implemented, a Common register.<br />

Any read through the Extended CP14 interface of a CP14 register that maps to the DBGPCSR is UNDEFINED<br />

in User mode <strong>and</strong> UNPREDICTABLE in privileged modes.<br />

<strong>ARM</strong> deprecates reading a PC sample through register 33 when the DBGPCSR is also implemented as<br />

register 40.<br />

The format of the DBGPCSR is:<br />

31<br />

Program Counter Sample value, bits [31:2]<br />

Program Counter Sample value<br />

Meaning of PC Sample Value<br />

The sampled value of bits [31:2] of the PC. The sampled value is an instruction address plus<br />

an offset that depends on the processor instruction set state. See Memory addresses on<br />

page C3-23 for a definition of the Instruction Virtual Address (IVA) read through the<br />

DBGPCSR.<br />

C10-38 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B<br />

2<br />

1<br />

0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!