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
17<h2>C Specification</h2>
18
19<dl>
20<dd><pre><code>#include &lt;revolution/os.h&gt;</code></pre>
21  </dd>
22<dd><pre><code>void LCEnable ( void );</code></pre>
23  </dd>
24</dl>
25<H2>Arguments</H2>
26<P>None.</P>
27<H2>Return Values</H2>
28<P>None.</P>
29<h2>Description</h2>
30
31<p>Enables the locked cache feature of the Broadway graphics processor.&nbsp;The L1 data cache is partitioned into a 16 K 4-way set associative data cache and a 16 K locked cache partition. Call the <a href="LCGetBase.html"><code>LCGetBase</code></a> function to get the location of the locked cache. 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>
32
33<p><STRONG>Note:</STRONG>The locked cache is off by default at boot time.&nbsp;</p>
34
35<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.
36</p>
37
38<p>Time measurements of the <code>LCEnable</code> function indicates that it currently takes between 15000 to 19510 cycles (25.0 - 32.5 microseconds), which depends on how much invalid data is in the cache.&nbsp;This number is not the final figure. The total additional cost for a <code>LCEnable/LCDisable</code> function pair is approximately 17000 to 22000 cycles (28.3 - 36.7 microseconds).&nbsp;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>
39
40<p><STRONG>Note:</STRONG>The <code>LCEnable</code> function will use the DBAT3 pair to map in the addresses for the locked cache.&nbsp;</p>
41
42
43
44<h2>See Also</h2>
45
46<p><a href="../toc.html#Cache" target="contents">Cache Functions</a>, <code><a href="LCDisable.html">LCDisable</a>, <a href="LCGetBase.html">LCGetBase</a>, <a href="LCLoadData.html">LCLoadData</a>, <a href="LCLoadBlocks.html">LCLoadBlocks</a>, <a href="LCStoreData.html">LCStoreData</a>, <a href="LCStoreBlocks.html">LCStoreBlocks</a></code></p>
47
48<h2>Revision History</h2>
49<P></P>
50<P>2006/03/01 Initial version.</p>
51<hr>
52<P>CONFIDENTIAL</p>
53</BODY>
54</HTML>