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.

implement one of the other permitted alternatives for the locked entries.<br />

Common Memory System <strong>Architecture</strong> Features<br />

<strong>ARM</strong> recommends that, where possible, architecturally-defined operations are used in such code sequences.<br />

This minimizes the number of customized operations required.<br />

In addition, any implementation that uses aborts for h<strong>and</strong>ling cache maintenance operations on entries that<br />

might be locked must provide a mechanism that can be used to ensures that no entries are locked in the<br />

cache. The reset setting of the cache must be that no cache entries are locked.<br />

On an <strong>ARM</strong>v7-A implementation, similar rules apply to TLB lockdown, see The interaction of TLB<br />

maintenance operations with TLB lockdown on page B3-57.<br />

Additional cache functions for the implementation of lockdown<br />

An implementation can add additional cache maintenance functions for the h<strong>and</strong>ling of lockdown in the<br />

IMPLEMENTATION DEFINED spaces reserved for Cache Lockdown. Examples of possible functions are:<br />

Operations that unlock all cache entries.<br />

Operations that preload into specific levels of cache. These operations might be provided for<br />

instruction caches, data caches, or both.<br />

An implementation can add other functions as required.<br />

B2.2.6 Branch predictors<br />

Branch predictor hardware typically uses a form of cache to hold branch information. The <strong>ARM</strong> architecture<br />

permits this branch predictor hardware to be visible to the functional behavior of software, <strong>and</strong> so the branch<br />

predictor is not architecturally invisible. This means that under some circumstances software must perform<br />

branch predictor maintenance to avoid incorrect execution caused by out of date entries in the branch<br />

predictor.<br />

Branch prediction maintenance operations<br />

In some implementations, to ensure correct operation it might be necessary to invalidate branch prediction<br />

entries on a change of instruction or instruction address mapping. For more information, see Branch<br />

predictor maintenance operations <strong>and</strong> the memory order model on page B2-20.<br />

Two CP15 c7 operations apply to branch prediction hardware, these two functions are:<br />

MCR p15, 0, Rt, c7, c5, 6: Invalidate entire branch predictor array<br />

MCR p15, 0, Rt, c7, c5, 7: Invalidate MVA from branch predictor array<br />

In <strong>ARM</strong>v7, these functions can perform a NOP if the operation of Branch Prediction hardware is not visible<br />

architecturally.<br />

The invalidate entire branch predictor array operation ensures that any location held in the branch predictor<br />

has no functional effect on execution.<br />

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

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

Saved successfully!

Ooh no, something went wrong!