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.

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

The invalidate MVA from branch predictor array operation operates on the address of the branch instruction.<br />

It includes the current system ASID <strong>and</strong> the security state when determining which line is affected as part<br />

of any required VA to PA translation. Security state checking is performed only if the Security Extensions<br />

are implemented. The invalidate by MVA operation can affect other branch predictor entries.<br />

Note<br />

The architecture does not make visible the range of addresses in a branch predictor to which the invalidate<br />

operation applies. This means the address used in the invalidate MVA instruction must be the address of the<br />

branch to be invalidated.<br />

If the correct functioning of a system requires invalidation of the branch predictor when there are changes<br />

to the instructions in memory, the invalidate entire instruction cache operation also causes an invalidate<br />

entire branch predictor array operation.<br />

Branch predictor maintenance operations <strong>and</strong> the memory order model<br />

The following rule describes the effect of the memory order model on the branch predictor maintenance<br />

operations:<br />

Any invalidation of the branch predictor is guaranteed to take effect only after one of the following:<br />

— execution of a ISB instruction<br />

— taking an exception<br />

— return from an exception.<br />

Therefore, if a branch instruction appears between an invalidate branch prediction instruction <strong>and</strong> an ISB<br />

operation, exception entry or exception return, it is UNPREDICTABLE whether the branch instruction is<br />

affected by the invalidate. Software must avoid this ordering of instructions, because it might lead to<br />

UNPREDICTABLE behavior.<br />

The branch predictor maintenance operations must be used to invalidate entries in the branch predictor after<br />

any of the following events:<br />

enabling or disabling the MMU<br />

writing new data to instruction locations<br />

writing new mappings to the translation tables<br />

changes to the TTBR0, TTBR1, or TTBCR registers, unless accompanied by a change to the<br />

ContextID or the FCSE ProcessID.<br />

Failure to invalidate entries might give UNPREDICTABLE results, caused by the execution of old branches.<br />

B2-20 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!