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.

The System Level Programmers’ Model<br />

Note<br />

You can return to the SMC instruction itself by returning using a subtraction of 4, without any adjustment to<br />

the SPSR.IT[7:0] bits. The result is that the return occurs, then interrupts or external aborts might occur <strong>and</strong><br />

be h<strong>and</strong>led, then the SMC instruction is re-executed <strong>and</strong> another SMC exception occurs.<br />

This relies on:<br />

the SMC instruction being used correctly, either outside an IT block or as the last instruction in an IT<br />

block, so that the SPSR.IT[7:0] bits indicate unconditional execution<br />

the SMC h<strong>and</strong>ler not changing the result of the original conditional execution test for the SMC<br />

instruction.<br />

B1.6.14 Prefetch Abort exception<br />

A Prefetch Abort exception can be generated by:<br />

A synchronous memory abort on an instruction fetch.<br />

Note<br />

Asynchronous aborts on instruction fetches are reported using the Data Abort exception, see Data<br />

Abort exception on page B1-55.<br />

Prefetch Abort exception entry is synchronous to the instruction whose instruction fetch aborted. If<br />

an implementation prefetches instructions, it must h<strong>and</strong>le a synchronous abort on an instruction<br />

prefetch by:<br />

— generating a Prefetch Abort exception if <strong>and</strong> when the instruction is about to execute<br />

— ignoring the abort if the instruction does not reach the point of being about to execute, for<br />

example, if a branch misprediction or exception entry occurs before the instruction is reached.<br />

For more information about memory aborts see:<br />

— VMSA memory aborts on page B3-40<br />

— PMSA memory aborts on page B4-13.<br />

A Breakpoint, Vector Catch or BKPT Instruction debug event, see Debug exception on Breakpoint,<br />

BKPT Instruction or Vector Catch debug events on page C4-2.<br />

The following pseudocode describes how this exception is taken:<br />

// TakePrefetchAbortException()<br />

// ============================<br />

TakePrefetchAbortException()<br />

// Determine return information. SPSR is to be the current CPSR, <strong>and</strong> LR is to be the<br />

// current PC minus 0 for Thumb or 4 for <strong>ARM</strong>, to change the PC offsets of 4 or 8<br />

// respectively from the address of the current instruction into the required address<br />

// of the current instruction plus 4.<br />

new_lr_value = if CPSR.T == ‘1’ then PC else PC-4;<br />

B1-54 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!