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>LCLoadBlocks</title>
10</head>
11
12<body>
13
14<h1>LCLoadBlocks</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/os.h&gt;
19
20void LCLoadBlocks(void* destTag, void* srcAddr, u32 numBlocks);
21</pre></dd></dl>
22
23<H2>Arguments</H2>
24<TABLE class="arguments" border="1" >
25  <TBODY>
26    <TR>
27<TH>destTag</TH>
28<TD>Start address for the locked cache region to be copied to. Must be 32-byte aligned.</TD>
29    </TR>
30    <TR>
31<TH>srcAddr</TH>
32<TD>Start address for data in main memory to be copied to <SPAN class="argument">destAddr</SPAN>. Must be 32-byte aligned.</TD>
33    </TR>
34    <TR>
35<TH>numBlocks</TH>
36<TD>Transfer size. (Number of cache blocks.) Must be specified as a value between 0 to 127. If 0 is specified, the transaction size used is 128 blocks (4KB).</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40
41<H2>Return Values</H2>
42<P>None.</P>
43
44<h2>Description</h2>
45<p>Enqueues a single DMA transaction to transfer data to locked cache at <SPAN class="argument">destTag</SPAN> from main memory at <SPAN class="argument">srcAddr</SPAN>. This function is more efficient than calling the <A href="LCLoadData.html"><CODE>LCLoadData</CODE></A> function, but has a maximum transaction limit of 128 cache blocks (4 KB) and performs no error checking. Addresses are assumed to be 32-byte aligned, and <SPAN class="argument">numBlocks</SPAN> takes a value from  0 to 127. Note that a value of zero for <SPAN class="argument">numBlocks</SPAN> indicates a transaction size of 128 blocks.</strong>The range of valid transfer addresses is the 16KB region starting at the value returned by the <A href="LCGetBase.html"><code>LCGetBase</code></A> function.</p>
46
47<p>The only methods to determine whether the transaction has completed is to poll the length of the DMA queue with the <A href="LCQueueLength.html"><code>LCQueueLength</code></A> function or to wait until the queue length reaches a fixed value with the <A href="LCQueueWait.html"><code>LCQueueWait</code></A> function. See the example in <A href="LCStoreBlocks.html"><code>LCStoreBlocks</code></A> in the Function Reference.</p>
48
49<p>Note that a maximum of 15 DMA transactions can be issued in the DMA queue.&nbsp;If the queue overflows, a machine check exception occurs.</p>
50
51<p>The locked cache must be enabled, or else a machine check exception will occur during the DMA.</p>
52
53<p>If DMA detects a destination address in normal cache, a machine check exception will occur.</p>
54
55<h2>See Also</h2>
56<P class="reference">
57<A href="../toc.html#Cache" target="contents">Cache Functions</A>,
58<a href="LCEnable.html">LCEnable</a>,
59<a href="LCStoreBlocks.html">LCStoreBlocks</a>,
60<a href="LCLoadData.html">LCLoadData</a>,
61<a href="LCQueueLength.html">LCQueueLength</a>,
62<a href="LCQueueWait.html">LCQueueWait</a>
63</p>
64
65<h2>Revision History</h2>
66<P>
672006/03/01 Initial version.<br>
68</p>
69
70<hr><p>CONFIDENTIAL</p></body>
71</html>