1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>LCEnable</title>
10</head>
11
12<body>
13
14<h1>LCEnable</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/os.h&gt;
19
20void LCEnable ( void );
21</pre></dd></dl>
22
23<H2>Arguments</H2>
24<P>None.</P>
25
26<H2>Return Values</H2>
27<P>None.</P>
28
29<h2>Description</h2>
30<p>Enables the locked cache feature on the Broadway chip.&nbsp;The L1 data cache is partitioned into a 16 K 4-way set associative data cache and a 16 K locked cache partition. The location of the locked cache can be found by calling the <A href="LCGetBase.html"><code>LCGetBase</code></A> function. The locked cache partition (referred to as locked cache) functions as a form of scratchpad memory.&nbsp; Data can only be moved in and out of the locked cache via a DMA transaction.</p>
31
32<p><B>Note:</B>The locked cache is off by default at boot time.&nbsp;</p>
33
34<p>Enabling the locked cache is a fairly long process.&nbsp;The cache must be flushed entirely; because there is no simple full cache flush instruction, the <code>LCEnable</code> function touches and stores a 32 KB region at the bottom of the address space. Next, the locked cache must be enabled. The cache tags must then be allocated for the locked partition. Disabling the locked cache is not entirely free from cost because the locked partition must be invalidated.&nbsp;Therefore, you must weigh carefully the costs of enabling/disabling the locked cache and ensure that the benefits of using a full 32 KB L1 cache amortize the enable/disable costs.
35</p>
36
37<p>Current measurements of the <code>LCEnable</code> function indicate that it will take between 15000 and 19510 cycles (25.0 to 32.5 microseconds), depending on how much invalid data is in the cache. This number is not the final figure. The total additional cost for the <CODE>LCEnable</CODE>/<CODE>LCDisable</CODE> function pair is between 17000 and 22000 cycles (28.3 to 36.7 microseconds). This cost is the total end-to-end time imposed if you enable and disable the locked cache on a per-frame basis.&nbsp;</p>
38
39<p><B>Note:</B>The <code>LCEnable</code> function uses the DBAT3 pair to map in the addresses for the locked cache.</p>
40
41<h2>See Also</h2>
42<P class="reference">
43<A href="../toc.html#Cache" target="contents">Cache Functions</A>,
44<a href="LCDisable.html">LCDisable</a>,
45<a href="LCGetBase.html">LCGetBase</a>,
46<a href="LCLoadData.html">LCLoadData</a>,
47<a href="LCLoadBlocks.html">LCLoadBlocks</a>,
48<a href="LCStoreData.html">LCStoreData</a>,
49<a href="LCStoreBlocks.html">LCStoreBlocks</a>
50</p>
51
52<h2>Revision History</h2>
53<P>
542006/03/01 Initial version.<br>
55</p>
56
57<hr><p>CONFIDENTIAL</p></body>
58</html>