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.

Data coherency issues<br />

You can ensure the data coherency of caches in the following ways:<br />

Application Level Memory Model<br />

By not using the caches in situations where coherency issues can arise. You can achieve this by:<br />

— using Non-cacheable or, in some cases, Write-Through Cacheable memory for the caches<br />

— not enabling caches in the system.<br />

By using cache maintenance operations to manage the coherency issues in software, see Cache<br />

maintenance functionality on page B2-9. Many of these operations are only available to system<br />

software.<br />

By using hardware coherency mechanisms to ensure the coherency of data accesses to memory for<br />

cacheable locations by observers within the different shareability domains, see Non-shareable<br />

Normal memory on page A3-30 <strong>and</strong> Shareable, Inner Shareable, <strong>and</strong> Outer Shareable Normal<br />

memory on page A3-30.<br />

The performance of these hardware coherency mechanisms is highly implementation specific. In<br />

some implementations the mechanism suppresses the ability to cache shareable locations. In other<br />

implementations, cache coherency hardware can hold data in caches while managing coherency<br />

between observers within the shareability domains.<br />

Instruction coherency issues<br />

How far ahead of the current point of execution instructions are prefetched from is IMPLEMENTATION<br />

DEFINED. Such prefetching can be either a fixed or a dynamically varying number of instructions, <strong>and</strong> can<br />

follow any or all possible future execution paths. For all types of memory:<br />

the processor might have fetched the instructions from memory at any time since the last ISB,<br />

exception entry or exception return executed by that processor<br />

any instructions fetched in this way might be executed multiple times, if this is required by the<br />

execution of the program, without being refetched from memory<br />

In addition, the <strong>ARM</strong> architecture does not require the hardware to ensure coherency between instruction<br />

caches <strong>and</strong> memory, even for regions of memory with Shareable attributes. This means that for cacheable<br />

regions of memory, an instruction cache can hold instructions that were fetched from memory before the<br />

last ISB, exception entry or exception return.<br />

If software requires coherency between instruction execution <strong>and</strong> memory, it must manage this coherency<br />

using the ISB <strong>and</strong> DSB memory barriers <strong>and</strong> cache maintenance operations, see Ordering of cache <strong>and</strong><br />

branch predictor maintenance operations on page B2-21. Many of these operations are only available to<br />

system software.<br />

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

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

Saved successfully!

Ooh no, something went wrong!