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

B1.6.10 Reset<br />

Using WFI to indicate an idle state on bus interfaces<br />

A common implementation practice is to complete any entry into power-down routines with a WFI<br />

instruction. Typically, the WFI instruction:<br />

1. forces the suspension of execution, <strong>and</strong> of all associated bus activity<br />

2. ceases to execute instructions from processor.<br />

The control logic required to do this typically tracks the activity of the bus interfaces of the processor. This<br />

means it can signal to an external power controller that there is no ongoing bus activity.<br />

The exact nature of this interface is IMPLEMENTATION DEFINED, but the use of Wait For Interrupt as the only<br />

architecturally-defined mechanism that completely suspends execution makes it very suitable as the<br />

preferred power-down entry mechanism for future implementations.<br />

Pseudocode details of Wait For Interrupt<br />

The WaitForInterrupt() pseudocode procedure optionally suspends execution until a WFI wake-up event or<br />

reset occurs, or until some earlier time if the implementation chooses.<br />

On an <strong>ARM</strong> processor, when the Reset input is asserted the processor immediately stops execution of the<br />

current instruction. When Reset is de-asserted, the actions described in Exception entry on page B1-34 are<br />

performed, for the Reset exception. The processor then starts executing code, in Supervisor mode with<br />

interrupts disabled. Execution starts from the normal or high reset vector address, 0x00000000 or 0xFFFF0000,<br />

as determined by the reset value of the SCTLR.V bit. This reset value can be determined by an<br />

IMPLEMENTATION DEFINED configuration input signal.<br />

Note<br />

The <strong>ARM</strong> architecture does not distinguish between multiple levels of reset. A system can provide<br />

multiple distinct levels of reset that reset different parts of the system. These all correspond to this<br />

single reset exception.<br />

The reset value of the SCTLR.EE bit can be defined by a configuration input signal. If this is done,<br />

that value also applies to the CPSR.E bit on reset. For more information 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 />

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

// TakeReset()<br />

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

TakeReset()<br />

// Enter Supervisor mode <strong>and</strong> (if relevant) Secure state, <strong>and</strong> reset CP15. This affects<br />

// the banked versions <strong>and</strong> values of various registers accessed later in the code.<br />

// Also reset other system components.<br />

CPSR.M = ‘10011’; // Supervisor mode<br />

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