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.

Exception Base LR value a<br />

Instruction set state on exception entry<br />

The System Level Programmers’ Model<br />

Prefetch Abort Address of aborted instruction fetch + 4 +4 + 4<br />

Data Abort Address of instruction that generated<br />

the abort<br />

Table B1-4 Link Register value saved on exception entry (continued)<br />

Offset, for processor state of: a<br />

<strong>ARM</strong> Thumb or ThumbEE Jazelle<br />

+ 8 +8 + 8<br />

IRQ or FIQ Address of next instruction to execute + 4 +4 + 4<br />

a. Except for the Reset exception, the value saved in the LR is the base LR value plus the offset value for the processor<br />

state immediately before the exception entry.<br />

b. In Jazelle state, Undefined Instruction exceptions can only happen on a processor that includes a trivial implementation<br />

of Jazelle state. On such a processor, if an exception return instruction writes {CPSR.J, CPSR.T} to 0b10, the processor<br />

takes an Undefined Instruction exception when it next attempts to execute an instruction. It is IMPLEMENTATION<br />

DEFINED whether the processor uses an offset of +2 or +4 in these circumstances, but it must always use the same offset.<br />

c. SVC <strong>and</strong> SMC exceptions cannot occur in Jazelle state.<br />

Exception h<strong>and</strong>lers always execute in either Thumb state or <strong>ARM</strong> state. Which state they execute in is<br />

determined by the Thumb Exception enable bit, SCTLR.TE, see:<br />

c1, System Control Register (SCTLR) on page B3-96 for a VMSA implementation<br />

c1, System Control Register (SCTLR) on page B4-45 for a PMSA implementation.<br />

On exception entry, the CPSR.T <strong>and</strong> CPSR.J bits are set to values that depend on the SCTLR.TE value, as<br />

shown in Table B1-5:<br />

Table B1-5 CPSR.J <strong>and</strong> CPSR.T bit values on exception entry<br />

SCTLR.TE CPSR.J CPSR.T Exception h<strong>and</strong>ler state<br />

0 0 0 <strong>ARM</strong><br />

1 0 1 Thumb<br />

When the Security Extensions are implemented, the SCTLR is banked for Secure <strong>and</strong> Non-secure states,<br />

<strong>and</strong> therefore the TE bit value might be different for Secure <strong>and</strong> Non-secure states. The SCTLR.TE bit for<br />

the security state in which the exception is h<strong>and</strong>led determines the instruction set state for the exception<br />

h<strong>and</strong>ler. This means the exception h<strong>and</strong>lers might run in different instruction set states, depending on the<br />

security state.<br />

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

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

Saved successfully!

Ooh no, something went wrong!