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 State<br />

C5.5.2 Altering CPSR privileged bits in Debug state<br />

On processors that implement the Security Extensions, the processor:<br />

prevents attempts to set the CPSR.M field to a value that would place the processor in a mode or<br />

security state where debug is not permitted<br />

prevents updates to the Privileged bits of the CPSR in cases where Secure User halting debug is<br />

supported, the processor is in Secure User mode, <strong>and</strong> invasive debug is not permitted in Secure<br />

privileged modes<br />

prevents attempts to set the CPSR.M field to 0b10001, FIQ mode, if NSACR.RFR == 1 <strong>and</strong> the<br />

processor is in Non-secure state.<br />

On processors that do not implement the Security Extensions, all CPSR updates that are permitted in a<br />

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

Table C5-4 defines the behavior on writes to the CPSR in Debug state.<br />

Mode Secure state<br />

Logical<br />

(DBGEN AND<br />

SPIDEN)<br />

Table C5-4 Permitted updates to the CPSR in Debug state<br />

SU halting<br />

debug a<br />

supported<br />

Update privileged<br />

CPSR bits b<br />

Modify CPSR.M to<br />

Monitor mode<br />

User Yes 0 Yes Update ignored UNPREDICTABLE c<br />

No Permitted d Permitted<br />

Privileged Yes 0 X Permitted d Permitted<br />

Any No 0 X Permitted d UNPREDICTABLE e<br />

Any X 1 X Permitted d Permitted<br />

a. Secure User halting debug support.<br />

b. This column does not apply to changing CPSR.M to Monitor mode. Apart from this, the CPSR bits are defined in<br />

Program Status Registers (PSRs) on page B1-14, <strong>and</strong> this column does apply to changing CPSR.M to any other value.<br />

c. The definition of UNPREDICTABLE implies the processor must not enter a privileged mode.<br />

d. Except that, regardless of the state of SPIDEN:<br />

The SCR.AW, SCR.FW <strong>and</strong> SCTLR.NMFI bits have the same effects on writes to CPSR.A <strong>and</strong> CPSR.F as they do<br />

in Non-debug state, see Control of exception h<strong>and</strong>ling by the Security Extensions on page B1-41 <strong>and</strong><br />

Non-maskable fast interrupts on page B1-18.<br />

The NSACR.RFR bit has the same effect on writes to CPSR.M as it does in Non-debug state, see<br />

c1, Non-Secure Access Control Register (NSACR) on page B3-110.<br />

e. The definition of UNPREDICTABLE implies the processor must not enter Monitor mode, <strong>and</strong> must not enter FIQ mode<br />

when NSACR.RFR == 1.<br />

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

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

Saved successfully!

Ooh no, something went wrong!