09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Mode<br />

Updating CPSR bits<br />

Debug<br />

If the debugger writes to the CPSR a value so that it sets the CPSR[4:0] bits to a processor mode<br />

where invasive debug is not permitted, this update of the CPSR[4:0] bits is ignored. Similarly,<br />

if invasive debug is not permitted for privilege modes in the current security state, writes to the<br />

CPSR privileged bits are ignored.<br />

Table 12-55 shows which updates are permitted in debug state:<br />

Secure state a or<br />

Monitor mode<br />

Writing to the CPSR SCR<br />

While in debug state, if the debugger forces the processor to execute a CP15 MCR instruction<br />

to write to the CP15 Secure Configuration Register (SCR), it is only permitted to execute if<br />

either of these conditions is true:<br />

• the processor is in a secure privileged mode including Monitor mode<br />

• the processor is in secure User mode, and both DBGEN and SPIDEN are asserted.<br />

Note<br />

• Writes to the SCR while in nonsecure state are not permitted even if both DBGEN and<br />

SPIDEN are asserted, except if the processor is in Monitor mode because it is considered<br />

to be a secure privileged mode regardless of the value of the SCR[0] NS bit.<br />

• The processor treats attempts to write to the SCR when they are not permitted as<br />

Undefined instruction exceptions. See Exceptions in debug state on page 12-61 for details<br />

of how the processor behaves when Undefined instruction exceptions occur while in<br />

debug state.<br />

Coprocessor instructions<br />

Table 12-55 Permitted updates to the CPSR in debug state<br />

DBGEN & SPIDEN<br />

Modify CPSR[4:0]<br />

to Monitor mode<br />

The rules for executing coprocessor instructions other than CP14 and CP15 while in debug state<br />

are the same as in normal state. CP14 debug instructions are always permitted while in debug<br />

state regardless of the debug permissions, processor mode, and security state.<br />

Note<br />

Nondebug CP14 instructions behave as CP15 instructions while in debug state.<br />

Update privileged<br />

CPSR bits b<br />

User Yes 0 Update ignored Update ignored<br />

Privileged Yes 0 Permitted Permitted<br />

Any No 0 Update ignored Permitted<br />

Any X 1 Permitted Permitted<br />

a. The processor is in secure state when CP15 SCR[0] nonsecure bit is set to 0.<br />

b. This column excludes the case where the debugger attempts to change CPSR[4:0] to Monitor mode, that is, it<br />

only includes updates of the A, I, or F bits, or the CPSR[4:0] bits to a mode other than Monitor.<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 12-59<br />

ID060510 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!