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>DCFlushRange</title> 10</head> 11 12<body> 13 14<h1>DCFlushRange</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/os.h> 19 20void DCFlushRange(void* startAddr, u32 nBytes); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<TABLE class="arguments" border="1" > 25 <tr> 26<TH><STRONG><EM><CODE>startAddr</CODE></EM></STRONG></TH> 27<TD>Effective address (not the physical address) .</TD> 28 </tr> 29 <tr> 30<TH><STRONG><EM><CODE>nBytes</CODE></EM></STRONG></TH> 31<TD>Size of region to be flushed.</TD> 32 </tr> 33</TABLE> 34 35<h2>Return Values</h2> 36<p>None.</p> 37 38<h2>Description</h2> 39<p>Flushes a specified range. The cache data block hit in the data cache for the specified range is flushed to main memory and invalidated. The <SPAN class="argument">startAddr</SPAN> argument will be rounded down to the closest 32-byte boundary, while the end address (<SPAN class="argument">startAddr</SPAN> + <SPAN class="argument">nBytes</SPAN>) will be rounded up to the closest 32-byte boundary.</p> 40 41<p>Be aware that even if the cache is disabled or frozen (via the <a href="DCFreeze.html"><code>DCFreeze</code></a> function), this command will still execute.</p> 42 43<p>This function invokes a sync after flushing the specified range. This means that this function will stall until the CPU detects that the data has been written to main memory. Because this operation can be costly, consider calling the <a href="DCFlushRangeNoSync.html"><code>DCFlushRangeNoSync</code></a> function on several ranges followed by a separate call to the <a href="../Synchronization/PPCSync.html"><code>PPCSync</code></a> function. Be aware that DMA transfers into and out of the locked cache are not affected by the <a href="../Synchronization/PPCSync.html"><code>PPCSync</code></a> function.</p> 44 45<h2>See Also</h2> 46<P class="reference"> 47<A href="../toc.html#Cache" target="contents">Cache Functions</A>, 48<a href="DCFlushRangeNoSync.html">DCFlushRangeNoSync</a>, 49<a href="DCInvalidateRange.html">DCInvalidateRange</a>, 50<a href="DCStoreRange.html">DCStoreRange</a>, 51<a href="DCStoreRangeNoSync.html">DCStoreRangeNoSync</a>, 52<a href="ICInvalidateRange.html">ICInvalidateRange</a>, 53<a href="../Synchronization/PPCSync.html">PPCSync</a> 54</p> 55 56<h2>Revision History</h2> 57<P> 582006/03/01 Initial version.<br> 59</p> 60 61<hr><p>CONFIDENTIAL</p></body> 62</html>