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.

The System Level Programmers’ Model<br />

Note<br />

System level register names, such as R0_usr, R8_usr, <strong>and</strong> R8_fiq, are used when it is necessary to<br />

identify a specific register. The Application level names refer to the registers for the current mode,<br />

<strong>and</strong> usually are sufficient to identify a register.<br />

In <strong>ARM</strong>v7, the Security Extensions can be implemented only as part of an <strong>ARM</strong>v7-A<br />

implementation.<br />

Each of the exception modes selects a different copy of the banked SP <strong>and</strong> LR, because these registers have<br />

special functions on exception entry:<br />

SP This enables the exception h<strong>and</strong>ler to use a different stack to the one in use when the<br />

exception occurred. For example, it can use a stack in privileged memory rather than one in<br />

unprivileged memory.<br />

LR The exception return address is placed in the banked LR of the exception mode. This means<br />

the use of the LR by the application is not corrupted. The address placed in the banked LR<br />

is at an exception-dependent offset from the next instruction to be executed in the code in<br />

which the exception occurred. This address enables the exception h<strong>and</strong>ler to return to that<br />

code, so the processor can resume execution of the code. Table B1-4 on page B1-34 shows<br />

the LR value saved on entry to each of the exception modes.<br />

In addition:<br />

FIQ mode provides its own mappings for the general-purpose registers R8 to R12. These enable very<br />

fast processing of interrupts that are simple enough to be processed using only registers R8 to R12,<br />

SP, LR, <strong>and</strong> PC, without affecting the corresponding registers of the mode in which the interrupt was<br />

taken.<br />

In an exception mode the processor can access the SPSR for that mode. There is no SPSR for User<br />

mode <strong>and</strong> System mode.<br />

In all <strong>ARM</strong>v7-A <strong>and</strong> <strong>ARM</strong>v7-R implementations:<br />

Every mode except User mode is privileged.<br />

User mode <strong>and</strong> System mode share the same register file. The only difference between System <strong>and</strong><br />

User modes is that System mode runs with privileged access.<br />

For more information about the application level view of the SP, LR, <strong>and</strong> the Program Counter (PC), <strong>and</strong><br />

the alternative descriptions of them as R13, R14 <strong>and</strong> R15, see <strong>ARM</strong> core registers on page A2-11.<br />

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