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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Instructions for CP14 <strong>and</strong> CP15<br />

Debug State<br />

This subsection describes the coprocessor instructions for the internal coprocessors CP14 <strong>and</strong> CP15.<br />

The two groups of registers provided by CP14 are:<br />

The CP14 debug registers, accessed by MCR <strong>and</strong> MRC instructions with == 0b000. Some of these<br />

registers can also be accessed by CP14 LDC <strong>and</strong> STC instructions.<br />

The CP14 non-debug registers, accessed by MCR <strong>and</strong> MRC instructions with != 0b000. These<br />

include the trace registers.<br />

Accesses to CP14 <strong>and</strong> CP15 are as follows:<br />

Instructions that access CP14 or CP15 registers that are permitted (not UNDEFINED) in User mode<br />

when in Non-debug state, are always permitted in Debug state.<br />

Instructions that access CP14 debug registers that are permitted (not UNDEFINED) in privileged modes<br />

when in Non-debug state are permitted in Debug state, regardless of the debug authentication <strong>and</strong> the<br />

processor mode <strong>and</strong> security state.<br />

If Secure User halting debug is supported, <strong>ARM</strong> recommends that certain CP15 instructions that a<br />

debugger requires to maintain memory coherency are permitted in Debug state regardless of debug<br />

permissions <strong>and</strong> the processor mode, see Access to specific cache management functions in Debug<br />

state on page C5-25.<br />

If the processor is in a privileged mode or the debugger can write to the CPSR.M bits to change to a<br />

privileged mode, then instructions that access CP14 or CP15 registers that are permitted (not<br />

UNDEFINED) in privileged modes when in Non-debug state are permitted in Debug state. If the<br />

processor is in User mode there is no requirement to change to a privileged mode first.<br />

Note<br />

— Two particular cases are where Security Extensions are not implemented <strong>and</strong> where Secure<br />

User halting debug is not supported. In these cases the CPSR.M bits can always be changed to<br />

a privileged mode <strong>and</strong>, therefore, the debugger is able to access all CP14 <strong>and</strong> CP15 registers<br />

at all times.<br />

— Except for accesses to the Baseline CP14 debug registers, <strong>ARM</strong> deprecates accessing any<br />

CP14 or CP15 register from User mode in Debug state if that register cannot be accessed from<br />

User mode in Non-debug state.<br />

In every case, permissions to access CP14 <strong>and</strong> CP15 registers while in Debug state are never greater<br />

than the permissions granted to any privileged mode when in Non-debug state in the current security<br />

state.<br />

If the processor is in Secure User mode <strong>and</strong> the debugger cannot write to the CPSR.M bits to change<br />

to a privileged mode, then any instruction that accesses a CP14 non-debug register or a CP15 register<br />

is not permitted (UNDEFINED) in Debug state if it is not permitted in Secure User mode in Non-debug<br />

state.<br />

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

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

Saved successfully!

Ooh no, something went wrong!