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 17<h2>C Specification</h2> 18<BLOCKQUOTE> 19<pre><CODE>#include <revolution/os.h> 20 21void DCFlushRange(void* startAddr, u32 nBytes);</CODE></pre> 22</BLOCKQUOTE> 23<h2>Arguments</h2> 24<TABLE border="1" cellpadding="3" cellspacing="0.1"> 25 <tr> 26<TD width="120" bgcolor="#ffffe8"><em><strong><code><STRONG><EM><CODE>startAddr</CODE></EM></STRONG></code></strong></em></TD> 27<TD width="520">Effective address (not the physical address) .</TD> 28 </tr> 29 <tr> 30<TD width="120" bgcolor="#ffffe8"><strong><em><code><STRONG><EM><CODE>nBytes</CODE></EM></STRONG></code></em></strong></TD> 31<TD width="520">Size of range to flush.</TD> 32 </tr> 33</TABLE> 34<h2>Return Values</h2> 35 36<p>None.</p> 37 38<h2>Description</h2> 39 40<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 <code><strong><em>startAddr</em></strong></code> argument is rounded down to a 32-byte boundary. The end address (i.e., <code><strong><em>startAddr</em></strong></code><i> + </i><strong><em><code>nBytes</code></em></strong>) is rounded up to a 32-byte boundary.</p> 41 42<p>This command will still execute even if the cache is disabled or frozen by the <code><a href="DCFreeze.html">DCFreeze</a></code> function.</p> 43 44<p>This function invokes a sync after flushing the specified range. This means that this function will stall until the CPU knows 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. DMA transfers with locked caches are not affected by the <a href="../Synchronization/PPCSync.html"><code>PPCSync</code></a> function.</p> 45 46<h2>See Also</h2> 47 48<p><a href="../toc.html#Cache" target="contents">Cache Functions</a>, <code><a href="DCFlushRangeNoSync.html">DCFlushRangeNoSync</a>, <a href="DCInvalidateRange.html">DCInvalidateRange</a></code>, <a href="DCStoreRange.html"><code>DCStoreRange</code></a>, <a href="DCStoreRangeNoSync.html"><code>DCStoreRangeNoSync</code></a>, <code><a href="ICInvalidateRange.html">ICInvalidateRange</a>, <a href="../Synchronization/PPCSync.html">PPCSync</a></code></p> 49 50<h2>Revision History</h2><p></p> 51 52<P>2006/03/01 Initial version. 53</p> 54 55<hr> 56<P>CONFIDENTIAL</p> 57</BODY> 58</HTML>