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.

2.15 Exceptions<br />

2.15.1 Exception entry and exit summary<br />

Exception<br />

or entry<br />

Programmers Model<br />

Exceptions occur whenever the processor temporarily halts the normal flow of a program, for<br />

example, to service an interrupt from a peripheral. Before attempting to handle an exception, the<br />

processor preserves the current processor state so the original program can resume when the<br />

handler routine finishes.<br />

If two or more exceptions occur simultaneously, the processor deals with exceptions in the fixed<br />

order given in Exception priorities on page 2-33.<br />

This section provides details of the processor exception handling:<br />

• Exception entry and exit summary<br />

• Leaving an exception on page 2-28.<br />

• Reset on page 2-28<br />

• Fast interrupt request on page 2-28<br />

• Interrupt request on page 2-29<br />

• Aborts on page 2-29<br />

• Imprecise data abort mask in the CPSR/SPSR on page 2-31<br />

• Software interrupt instruction on page 2-31<br />

• Software Monitor Instruction on page 2-31<br />

• Undefined instruction on page 2-32<br />

• Breakpoint instruction on page 2-32<br />

• Exception vectors on page 2-32<br />

• Exception priorities on page 2-33<br />

Table 2-12 summarizes the PC value preserved in the relevant r14 on exception entry and the<br />

recommended instruction for exiting the exception handler.<br />

Table 2-12 Exception entry and exit<br />

Return instruction Previous state Notes<br />

<strong>ARM</strong> r14_x Thumb r14_x<br />

SVC MOVS PC, R14_svc PC + 4 PC+2 Where the PC is the address of the SVC, SMC,<br />

or Undefined instruction<br />

SMC MOVS PC, R14_mon PC + 4 -<br />

UNDEF MOVS PC, R14_und PC + 4 PC+2<br />

PABT SUBS PC, R14_abt, #4 PC + 4 PC+4 Where the PC is the address of instruction<br />

that had the prefetch abort<br />

FIQ SUBS PC, R14_fiq, #4 PC + 4 PC+4 Where the PC is the address of the<br />

instruction that was not executed because<br />

IRQ SUBS PC, R14_irq, #4 PC + 4 PC+4<br />

the FIQ or IRQ took priority<br />

DABT SUBS PC, R14_abt, #8 PC + 8 PC+8 Where the PC is the address of the load or<br />

store instruction that generated the data<br />

abort<br />

RESET - - - The value saved in r14_svc on reset is<br />

Unpredictable<br />

BKPT SUBS PC, R14_abt, #4 PC + 4 PC+4 Software breakpoint<br />

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

ID060510 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!