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="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_CpuFind</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_CpuFind* <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mi.h></CODE><BR> 20 <BR> 21 <CODE>void* MI_CpuFind8( const void* src, u8 data, u32 size );</CODE><br> 22 <CODE>void* MI_CpuFind16( const void* src, u16 data, u32 size );</CODE><br> 23 <CODE>void* MI_CpuFind32( const void* src, u32 data, u32 size );</CODE><br> 24 </dd> 25</dl> 26<h2>Arguments</h2> 27<TABLE border="1" width="100%"> 28 <TBODY> 29 <TR> 30 <TD width="13%"><EM><STRONG>src</STRONG></EM></TD> 31 <TD width="87%">Source address to search.</TD> 32 </TR> 33 <TR> 34 <TD width="13%"><EM><STRONG>data</STRONG></EM></TD> 35 <TD width="87%">Data to search for.</TD> 36 </TR> 37 <TR> 38 <TD><EM><STRONG>size</STRONG></EM></TD> 39 <TD>Search size. 40 </TD> 41 </TR> 42 </TBODY> 43</TABLE> 44 45<h2>Return Values</h2> 46<p>If the data being searched for was found, it returns a pointer to that location. <code>NULL</code> is returned if the address is not found.</p> 47 48<H2>Description</H2> 49<P>Searches through memory in the CPU for the specified data.</P> 50<P><CODE>MI_CpuFind8()</CODE> selects the most efficient memory access based on the source address to search, and appropriately searches through the memory for the specified data in 16-bit or 32-bit units. The alignment of the source address to search does not need to be considered.</P> 51<P><CODE>MI_CpuFind16()</CODE> searches through the memory for the specified data in 16-bit units. The source address to search must be 2-byte aligned.</P> 52<P><CODE>MI_CpuFind32()</CODE> searches through the memory for the specified data in 32-bit units. The source address to search must be 4-byte aligned.</P> 53 54<h2>Internal Operation</h2> 55<P>Processing is done by the CPU only and does not use the DMA controller. It does not use a system call. <CODE>MI_CpuFind8</CODE> also performs reads in units of 16/32 bits, so accessing VRAM directly will not cause problems.</P> 56 57<h2>See Also</h2> 58 59<H2>Revision History</H2> 60<P> 612007/12/10 Initial version. 62</P> 63<hr><p>CONFIDENTIAL</p></body> 64</html> 65