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.

Register or operation<br />

General conditions applying to Format A, B, <strong>and</strong> C lockdown<br />

The instructions used to access the CP15 c9 lockdown registers are as follows:<br />

MCR p15, 0, , c9, c0, 0 ; write Data or unified Cache Lockdown Register<br />

MRC p15, 0, , c9, c0, 0 ; read Data or unified Cache Lockdown Register<br />

MCR p15, 0, , c9, c0, 1 ; write Instruction Cache Lockdown Register<br />

MRC p15, 0, , c9, c0, 1 ; read Instruction Cache Lockdown Register<br />

<strong>ARM</strong>v4 <strong>and</strong> <strong>ARM</strong>v5 Differences<br />

Unlock instruction cache D c9 0 c5 1<br />

Format D Data or unified Cache Lockdown Register, DCLR2 D c9 0 c6 0<br />

Unlock data cache D c9 0 c6 1<br />

Formats A, B, <strong>and</strong> C all use cache ways for lockdown granularity. Granularity is defined by the lockdown<br />

block, <strong>and</strong> a cache locking scheme can use any number of lockdown blocks from 1 to (ASSOCIATIVITY-1).<br />

If N lockdown blocks are locked down, they have indices 0 to N-1, <strong>and</strong> lockdown blocks N to<br />

(ASSOCIATIVITY-1) are available for normal cache operation.<br />

A cache way based lockdown implementation must not lock down the entire cache. At least one cache way<br />

must be left for normal cache operation, otherwise behavior is UNPREDICTABLE.<br />

The lockdown blocks are indexed from 0 to (ASSOCIATIVITY-1). The cache lines in a lockdown block are<br />

chosen to have the same WAY number as the lockdown block index value. So lockdown block n consists of<br />

the cache line with index n from each cache set, <strong>and</strong> n takes the values from n == 0 to<br />

n == (ASSOCIATIVITY-1).<br />

Where NSETS is the number of sets, <strong>and</strong> LINELEN is the cache line length, each lockdown block can hold<br />

NSETS memory cache lines, provided each of the memory cache lines is associated with a different cache<br />

set. <strong>ARM</strong> recommends that systems are designed so that each lockdown block contains a set of NSETS<br />

consecutive memory cache lines. This is NSETS × LINELEN consecutive memory locations, starting at a<br />

cache line boundary. Such sets are easily identified <strong>and</strong> are guaranteed to consist of one cache line associated<br />

with each cache set.<br />

Formats A <strong>and</strong> B lockdown<br />

Formats A <strong>and</strong> B use a WAY field that is chosen to be wide enough to hold the way number of any lockdown<br />

block. Its width, W, is given by W = log2(ASSOCIATIVITY), rounded up to the nearest integer if necessary.<br />

The format of a Format A lockdown register is:<br />

Table H-24 cache lockdown register support (continued)<br />

Lockdown<br />

formats<br />

CRn opc1 CRm opc2<br />

31 32–W 31–W 0<br />

WAY UNK/SBZ<br />

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

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

Saved successfully!

Ooh no, something went wrong!