09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

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.

CL bit<br />

value<br />

Table 3-107 shows the results of attempted access for each mode.<br />

To access the L2 Cache Lockdown Register, read or write CP15 with:<br />

MRC p15, 1, , c9, c0, 0 ; Read L2 Cache Lockdown Register<br />

MCR p15, 1, , c9, c0, 0 ; Write L2 Cache Lockdown Register<br />

Specific loading of addresses into cache way<br />

System Control Coprocessor<br />

The following procedure for lock down into a data or an instruction cache way i, with N cache<br />

ways, using Format C, ensures that only the target cache way i is locked down.<br />

This is the architecturally-defined method for locking data into caches:<br />

1. Disable interrupts to ensure that no processor exceptions can occur during the execution<br />

of this procedure. If this is not possible, all code and data that any exception handlers can<br />

call must meet the conditions specified in step 2 and step 3.<br />

2. Ensure that all data that the following code uses, apart from the data that is to be locked<br />

down, is either:<br />

• in a noncacheable area of memory<br />

• in an already locked cache way.<br />

3. Ensure that the data to be locked down is in a cacheable area of memory.<br />

4. Ensure that the data to be locked down is not already in the cache, using either:<br />

• cache clean<br />

• invalidate<br />

• cache clean and invalidate.<br />

See c7, Cache operations on page 3-68.<br />

5. Enable allocation to the target cache way by writing to the Instruction or Data Cache<br />

Lockdown Register, with the CRm field set to 0, setting L to 0 for bit i, and L to 1 for all<br />

other ways.<br />

6. Ensure that the memory cache line is loaded into the cache by using an LDR instruction<br />

to load a word from the memory cache line, for each of the cache lines to be locked down<br />

in cache way i.<br />

7. Write to the Instruction or Data Cache Lockdown Register, setting L to 1 for bit i and<br />

restore all the other bits to the previous values before this routine was started.<br />

Cache unlock procedure<br />

Table 3-107 Results of access to the L2 Cache Lockdown Register a<br />

Secure privileged Nonsecure privileged Secure User Nonsecure User<br />

Read Write Read Write Read Write Read Write<br />

0 Data Data Undefined Undefined Undefined Undefined Undefined Undefined<br />

1 Data Data Data Data Undefined Undefined Undefined Undefined<br />

a. An entry of Undefined in the table means that the access gives an Undefined Instruction exception when the coprocessor<br />

instruction is executed.<br />

To unlock the lock down portion of the cache, write to register c9, setting L to 0 for each bit.<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 3-94<br />

ID060510 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!