<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>UbixOS V2: src/sys/pci/pci.c File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <div class="nav"> <a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a> » <a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a> » <a class="el" href="dir_b683da389ddfd9a2385307147d6c30b8.html">pci</a></div> <h1>pci.c File Reference</h1><code>#include <<a class="el" href="pci_8h-source.html">pci/pci.h</a>></code><br> <code>#include <<a class="el" href="io_8h-source.html">sys/io.h</a>></code><br> <code>#include <<a class="el" href="types_8h-source.html">ubixos/types.h</a>></code><br> <code>#include <<a class="el" href="kprintf_8h-source.html">lib/kprintf.h</a>></code><br> <p> Include dependency graph for pci.c:<p><center><img src="pci_8c__incl.png" border="0" usemap="#src/sys/pci/pci.c_map" alt=""></center> <map name="src/sys/pci/pci.c_map"> <area href="pci_8h.html" shape="rect" coords="192,5,270,32" alt=""> <area href="types_8h.html" shape="rect" coords="330,56,450,83" alt=""> <area href="io_8h.html" shape="rect" coords="195,107,267,133" alt=""> <area href="kprintf_8h.html" shape="rect" coords="182,157,280,184" alt=""> <area href="__types_8h.html" shape="rect" coords="500,56,604,83" alt=""> </map> <p> <a href="pci_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pci_8c.html#5c450b9e2534226b162a16de0ef6b434">pci_init</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="types_8h.html#f6a258d8f3ee5206d682d799316314b1">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pci_8c.html#51fa422468461d6a5e06b3cea7ceb912">pciProbe</a> (int bus, int dev, int func, struct <a class="el" href="structpciConfig.html">pciConfig</a> *cfg)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="pci_8c.html#09d5fac523ec602b928a2eeb2dc3eee6">pciRead</a> (int bus, int dev, int func, int reg, int bytes)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pci_8c.html#562e38dfaaab5bd65c08f7ee9769235d">pciWrite</a> (int bus, int dev, int func, int reg, <a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> v, int bytes)</td></tr> <tr><td colspan="2"><br><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" nowrap>struct {</td></tr> <tr><td class="memItemLeft" nowrap> <a class="el" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a> <a class="el" href="pci_8c.html#293d57c5df3007d82a1bb7d2ae6bcd73">baseClass</a></td></tr> <tr><td class="memItemLeft" nowrap> <a class="el" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a> <a class="el" href="pci_8c.html#c623cf08a42340d79da60f5c0890b03b">interface</a></td></tr> <tr><td class="memItemLeft" nowrap> const char * <a class="el" href="pci_8c.html#8f8f80d37794cde9472343e4487ba3eb">name</a></td></tr> <tr><td class="memItemLeft" nowrap> <a class="el" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a> <a class="el" href="pci_8c.html#8546d58b91ffd977d28677bb84a92e18">subClass</a></td></tr> <tr><td class="memItemLeft" nowrap valign="top">} </td><td class="memItemRight" valign="bottom"><a class="el" href="pci_8c.html#4cf86f576a7ecc8e777cae716efb13d1">pciClasses</a> []</td></tr> </table> <hr><h2>Function Documentation</h2> <a class="anchor" name="5c450b9e2534226b162a16de0ef6b434"></a><!-- doxytag: member="pci.c::pci_init" ref="5c450b9e2534226b162a16de0ef6b434" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int pci_init </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00292">292</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. <p> References <a class="el" href="pci_8h-source.html#l00046">pciConfig::baseClass</a>, <a class="el" href="pci_8h-source.html#l00072">confadd::bus</a>, <a class="el" href="pci_8h-source.html#l00077">countof</a>, <a class="el" href="pci_8h-source.html#l00071">confadd::dev</a>, <a class="el" href="pci_8h-source.html#l00070">confadd::func</a>, <a class="el" href="pci_8h-source.html#l00044">pciConfig::interface</a>, <a class="el" href="pci_8h-source.html#l00057">pciConfig::irq</a>, <a class="el" href="kprintf_8c-source.html#l00038">kprintf()</a>, <a class="el" href="pci_8c-source.html#l00039">name</a>, <a class="el" href="pci_8c.html#4cf86f576a7ecc8e777cae716efb13d1">pciClasses</a>, <a class="el" href="pci_8c-source.html#l00236">pciProbe()</a>, <a class="el" href="pci_8h-source.html#l00045">pciConfig::subClass</a>, and <a class="el" href="types_8h.html#f6a258d8f3ee5206d682d799316314b1a82764c3079aea4e60c80e45befbb839">TRUE</a>. <p> Here is the call graph for this function:<p><center><img src="pci_8c_5c450b9e2534226b162a16de0ef6b434_cgraph.png" border="0" usemap="#pci_8c_5c450b9e2534226b162a16de0ef6b434_cgraph_map" alt=""></center> <map name="pci_8c_5c450b9e2534226b162a16de0ef6b434_cgraph_map"> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="259,56,325,83" alt=""> <area href="pci_8h.html#51fa422468461d6a5e06b3cea7ceb912" shape="rect" coords="125,107,205,134" alt=""> <area href="pci_8h.html#09d5fac523ec602b928a2eeb2dc3eee6" shape="rect" coords="255,107,329,134" alt=""> <area href="pci_8h.html#562e38dfaaab5bd65c08f7ee9769235d" shape="rect" coords="253,183,331,210" alt=""> <area href="io_8h.html#77b934268de1b3ecdcf3f275413b3108" shape="rect" coords="391,6,484,32" alt=""> <area href="io_8h.html#8d6617406b264c7f9e143adab8406791" shape="rect" coords="384,56,491,83" alt=""> <area href="io_8h.html#fb703b187feb4b92444454df6c3dd9e6" shape="rect" coords="389,107,485,134" alt=""> <area href="io_8h.html#2e2ad8d744ae4b35ea37d39dcfea1296" shape="rect" coords="379,158,496,184" alt=""> <area href="io_8h.html#8acc1a06073db2e7b92ffbd00fbd0cf1" shape="rect" coords="387,208,488,235" alt=""> <area href="io_8h.html#243f6b6d22cc5948908b764d58efc2b0" shape="rect" coords="384,259,491,286" alt=""> </map> </div> </div><p> <a class="anchor" name="51fa422468461d6a5e06b3cea7ceb912"></a><!-- doxytag: member="pci.c::pciProbe" ref="51fa422468461d6a5e06b3cea7ceb912" args="(int bus, int dev, int func, struct pciConfig *cfg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="types_8h.html#f6a258d8f3ee5206d682d799316314b1">bool</a> pciProbe </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>bus</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>dev</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>func</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structpciConfig.html">pciConfig</a> * </td> <td class="paramname"> <em>cfg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00236">236</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. <p> References <a class="el" href="pci_8h-source.html#l00060">pciConfig::base</a>, <a class="el" href="pci_8h-source.html#l00046">pciConfig::baseClass</a>, <a class="el" href="pci_8h-source.html#l00051">pciConfig::bist</a>, <a class="el" href="pci_8h-source.html#l00054">pciConfig::bus</a>, <a class="el" href="pci_8h-source.html#l00048">pciConfig::cacheLineSize</a>, <a class="el" href="pci_8h-source.html#l00040">pciConfig::command</a>, <a class="el" href="pci_8h-source.html#l00055">pciConfig::dev</a>, <a class="el" href="pci_8h-source.html#l00038">pciConfig::deviceId</a>, <a class="el" href="types_8h.html#f6a258d8f3ee5206d682d799316314b1a1e095cc966dbecf6a0d8aad75348d1a">FALSE</a>, <a class="el" href="pci_8h-source.html#l00056">pciConfig::func</a>, <a class="el" href="pci_8h-source.html#l00050">pciConfig::headerType</a>, <a class="el" href="pci_8h-source.html#l00044">pciConfig::interface</a>, <a class="el" href="pci_8h-source.html#l00057">pciConfig::irq</a>, <a class="el" href="kprintf_8c-source.html#l00038">kprintf()</a>, <a class="el" href="pci_8h-source.html#l00049">pciConfig::latencyTimer</a>, <a class="el" href="pci_8c-source.html#l00182">pciRead()</a>, <a class="el" href="pci_8c-source.html#l00210">pciWrite()</a>, <a class="el" href="pci_8h-source.html#l00061">pciConfig::size</a>, <a class="el" href="pci_8h-source.html#l00041">pciConfig::status</a>, <a class="el" href="pci_8h-source.html#l00045">pciConfig::subClass</a>, <a class="el" href="pci_8h-source.html#l00064">pciConfig::subsys</a>, <a class="el" href="pci_8h-source.html#l00063">pciConfig::subsysVendor</a>, <a class="el" href="types_8h.html#f6a258d8f3ee5206d682d799316314b1a82764c3079aea4e60c80e45befbb839">TRUE</a>, <a class="el" href="pci_8h-source.html#l00037">pciConfig::vendorId</a>, and <a class="el" href="ap-boot_8S-source.html#l00006">x10</a>. <p> Referenced by <a class="el" href="pci_8c-source.html#l00292">pci_init()</a>. <p> Here is the call graph for this function:<p><center><img src="pci_8c_51fa422468461d6a5e06b3cea7ceb912_cgraph.png" border="0" usemap="#pci_8c_51fa422468461d6a5e06b3cea7ceb912_cgraph_map" alt=""></center> <map name="pci_8c_51fa422468461d6a5e06b3cea7ceb912_cgraph_map"> <area href="kprint_8h.html#b2761bdf0cca73ad0fb5880895210cd8" shape="rect" coords="139,56,205,83" alt=""> <area href="pci_8h.html#09d5fac523ec602b928a2eeb2dc3eee6" shape="rect" coords="135,107,209,134" alt=""> <area href="pci_8h.html#562e38dfaaab5bd65c08f7ee9769235d" shape="rect" coords="133,183,211,210" alt=""> <area href="io_8h.html#77b934268de1b3ecdcf3f275413b3108" shape="rect" coords="271,6,364,32" alt=""> <area href="io_8h.html#8d6617406b264c7f9e143adab8406791" shape="rect" coords="264,56,371,83" alt=""> <area href="io_8h.html#fb703b187feb4b92444454df6c3dd9e6" shape="rect" coords="269,107,365,134" alt=""> <area href="io_8h.html#2e2ad8d744ae4b35ea37d39dcfea1296" shape="rect" coords="259,158,376,184" alt=""> <area href="io_8h.html#8acc1a06073db2e7b92ffbd00fbd0cf1" shape="rect" coords="267,208,368,235" alt=""> <area href="io_8h.html#243f6b6d22cc5948908b764d58efc2b0" shape="rect" coords="264,259,371,286" alt=""> </map> </div> </div><p> <a class="anchor" name="09d5fac523ec602b928a2eeb2dc3eee6"></a><!-- doxytag: member="pci.c::pciRead" ref="09d5fac523ec602b928a2eeb2dc3eee6" args="(int bus, int dev, int func, int reg, int bytes)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> pciRead </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>bus</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>dev</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>func</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>reg</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>bytes</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00182">182</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. <p> References <a class="el" href="io_8c-source.html#l00039">inportByte()</a>, <a class="el" href="io_8c-source.html#l00134">inportDWord()</a>, <a class="el" href="io_8c-source.html#l00056">inportWord()</a>, and <a class="el" href="io_8c-source.html#l00119">outportDWord()</a>. <p> Referenced by <a class="el" href="pci_8c-source.html#l00236">pciProbe()</a>. <p> Here is the call graph for this function:<p><center><img src="pci_8c_09d5fac523ec602b928a2eeb2dc3eee6_cgraph.png" border="0" usemap="#pci_8c_09d5fac523ec602b928a2eeb2dc3eee6_cgraph_map" alt=""></center> <map name="pci_8c_09d5fac523ec602b928a2eeb2dc3eee6_cgraph_map"> <area href="io_8h.html#77b934268de1b3ecdcf3f275413b3108" shape="rect" coords="143,5,236,32" alt=""> <area href="io_8h.html#8d6617406b264c7f9e143adab8406791" shape="rect" coords="136,56,243,83" alt=""> <area href="io_8h.html#fb703b187feb4b92444454df6c3dd9e6" shape="rect" coords="141,107,237,133" alt=""> <area href="io_8h.html#2e2ad8d744ae4b35ea37d39dcfea1296" shape="rect" coords="131,157,248,184" alt=""> </map> </div> </div><p> <a class="anchor" name="562e38dfaaab5bd65c08f7ee9769235d"></a><!-- doxytag: member="pci.c::pciWrite" ref="562e38dfaaab5bd65c08f7ee9769235d" args="(int bus, int dev, int func, int reg, uInt32 v, int bytes)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void pciWrite </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>bus</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>dev</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>func</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>reg</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>bytes</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00210">210</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. <p> References <a class="el" href="io_8c-source.html#l00073">outportByte()</a>, <a class="el" href="io_8c-source.html#l00119">outportDWord()</a>, and <a class="el" href="io_8c-source.html#l00104">outportWord()</a>. <p> Referenced by <a class="el" href="pci_8c-source.html#l00236">pciProbe()</a>. <p> Here is the call graph for this function:<p><center><img src="pci_8c_562e38dfaaab5bd65c08f7ee9769235d_cgraph.png" border="0" usemap="#pci_8c_562e38dfaaab5bd65c08f7ee9769235d_cgraph_map" alt=""></center> <map name="pci_8c_562e38dfaaab5bd65c08f7ee9769235d_cgraph_map"> <area href="io_8h.html#8acc1a06073db2e7b92ffbd00fbd0cf1" shape="rect" coords="139,6,240,32" alt=""> <area href="io_8h.html#2e2ad8d744ae4b35ea37d39dcfea1296" shape="rect" coords="131,56,248,83" alt=""> <area href="io_8h.html#243f6b6d22cc5948908b764d58efc2b0" shape="rect" coords="136,107,243,134" alt=""> </map> </div> </div><p> <hr><h2>Variable Documentation</h2> <a class="anchor" name="293d57c5df3007d82a1bb7d2ae6bcd73"></a><!-- doxytag: member="pci.c::baseClass" ref="293d57c5df3007d82a1bb7d2ae6bcd73" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a> <a class="el" href="pci_8c.html#293d57c5df3007d82a1bb7d2ae6bcd73">baseClass</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00036">36</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. </div> </div><p> <a class="anchor" name="c623cf08a42340d79da60f5c0890b03b"></a><!-- doxytag: member="pci.c::interface" ref="c623cf08a42340d79da60f5c0890b03b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a> <a class="el" href="pci_8c.html#c623cf08a42340d79da60f5c0890b03b">interface</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00038">38</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. </div> </div><p> <a class="anchor" name="8f8f80d37794cde9472343e4487ba3eb"></a><!-- doxytag: member="pci.c::name" ref="8f8f80d37794cde9472343e4487ba3eb" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* <a class="el" href="pci_8c.html#8f8f80d37794cde9472343e4487ba3eb">name</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00039">39</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. <p> Referenced by <a class="el" href="kern__sysctl_8c-source.html#l00046">def_ctls()</a>, <a class="el" href="hd_8c-source.html#l00039">initHardDisk()</a>, <a class="el" href="ufs_8c-source.html#l00236">lookup()</a>, and <a class="el" href="pci_8c-source.html#l00292">pci_init()</a>. </div> </div><p> <a class="anchor" name="4cf86f576a7ecc8e777cae716efb13d1"></a><!-- doxytag: member="pci.c::pciClasses" ref="4cf86f576a7ecc8e777cae716efb13d1" args="[]" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct { ... } <a class="el" href="pci_8c.html#4cf86f576a7ecc8e777cae716efb13d1">pciClasses</a>[] </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Referenced by <a class="el" href="pci_8c-source.html#l00292">pci_init()</a>. </div> </div><p> <a class="anchor" name="8546d58b91ffd977d28677bb84a92e18"></a><!-- doxytag: member="pci.c::subClass" ref="8546d58b91ffd977d28677bb84a92e18" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="types_8h.html#a4e0f27a9aca905e340c06d2dcae843c">uInt8</a> <a class="el" href="pci_8c.html#8546d58b91ffd977d28677bb84a92e18">subClass</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <p> Definition at line <a class="el" href="pci_8c-source.html#l00037">37</a> of file <a class="el" href="pci_8c-source.html">pci.c</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:25:20 2006 for UbixOS V2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>