<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.4.7">
  <compounddef id="pci_8c" kind="file">
    <compoundname>pci.c</compoundname>
    <includes refid="pci_8h" local="no">pci/pci.h</includes>
    <includes refid="io_8h" local="no">sys/io.h</includes>
    <includes refid="types_8h" local="no">ubixos/types.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <incdepgraph>
      <node id="5840">
        <label>pci/pci.h</label>
        <link refid="pci_8h"/>
        <childnode refid="5841" relation="include">
        </childnode>
      </node>
      <node id="5839">
        <label>src/sys/pci/pci.c</label>
        <link refid="pci.c"/>
        <childnode refid="5840" relation="include">
        </childnode>
        <childnode refid="5843" relation="include">
        </childnode>
        <childnode refid="5841" relation="include">
        </childnode>
        <childnode refid="5844" relation="include">
        </childnode>
      </node>
      <node id="5841">
        <label>ubixos/types.h</label>
        <link refid="types_8h"/>
        <childnode refid="5842" relation="include">
        </childnode>
      </node>
      <node id="5842">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="5844">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="5841" relation="include">
        </childnode>
      </node>
      <node id="5843">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="pci_8c_15c450b9e2534226b162a16de0ef6b434" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int pci_init</definition>
        <argsstring>()</argsstring>
        <name>pci_init</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="292" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="292" bodyend="312"/>
        <references refid="structpciConfig_19bfd2d9a3ba40dd32ba4f453dd1d6783" compoundref="pci_8h" startline="46">pciConfig::baseClass</references>
        <references refid="structconfadd_14a00014cb3b7ee070b7a755620f3d0fd" compoundref="pci_8h" startline="72">confadd::bus</references>
        <references refid="pci_8h_13c5cd622462bb50b6dab4c189e219eb9" compoundref="pci_8h" startline="77">countof</references>
        <references refid="structconfadd_1b8dfe4e29583b1da869d95fdf0aedbc1" compoundref="pci_8h" startline="71">confadd::dev</references>
        <references refid="structconfadd_1afb15c7a48b105117892b837bf2c23f2" compoundref="pci_8h" startline="70">confadd::func</references>
        <references refid="structpciConfig_152862e778f41c948aa1fff00f7cbfaf1" compoundref="pci_8h" startline="44">pciConfig::interface</references>
        <references refid="structpciConfig_1e9f2db7fa0eb75fd4bddff056c2e921a" compoundref="pci_8h" startline="57">pciConfig::irq</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="pci_8c_18f8f80d37794cde9472343e4487ba3eb" compoundref="pci_8c" startline="39">name</references>
        <references refid="pci_8c_14cf86f576a7ecc8e777cae716efb13d1">pciClasses</references>
        <references refid="pci_8h_151fa422468461d6a5e06b3cea7ceb912" compoundref="pci_8c" startline="236" endline="290">pciProbe</references>
        <references refid="structpciConfig_1c7bc166ab3f2fc2cdc5ab88cf68e0a4d" compoundref="pci_8h" startline="45">pciConfig::subClass</references>
        <references refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a82764c3079aea4e60c80e45befbb839">TRUE</references>
      </memberdef>
      <memberdef kind="function" id="pci_8c_151fa422468461d6a5e06b3cea7ceb912" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_1f6a258d8f3ee5206d682d799316314b1" kindref="member">bool</ref></type>
        <definition>bool pciProbe</definition>
        <argsstring>(int bus, int dev, int func, struct pciConfig *cfg)</argsstring>
        <name>pciProbe</name>
        <param>
          <type>int</type>
          <declname>bus</declname>
        </param>
        <param>
          <type>int</type>
          <declname>dev</declname>
        </param>
        <param>
          <type>int</type>
          <declname>func</declname>
        </param>
        <param>
          <type>struct <ref refid="structpciConfig" kindref="compound">pciConfig</ref> *</type>
          <declname>cfg</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="236" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="236" bodyend="290"/>
        <references refid="structpciConfig_1bb26815c9bf94949629d95ee37118a76" compoundref="pci_8h" startline="60">pciConfig::base</references>
        <references refid="structpciConfig_19bfd2d9a3ba40dd32ba4f453dd1d6783" compoundref="pci_8h" startline="46">pciConfig::baseClass</references>
        <references refid="structpciConfig_125432930e0aeee471b7a6152f5336180" compoundref="pci_8h" startline="51">pciConfig::bist</references>
        <references refid="structpciConfig_11c99eb7381df726aa6471208dc6a68e2" compoundref="pci_8h" startline="54">pciConfig::bus</references>
        <references refid="structpciConfig_1995b791fa6ade24129754af9010c3a8c" compoundref="pci_8h" startline="48">pciConfig::cacheLineSize</references>
        <references refid="structpciConfig_1620dc11ca24ea3f4a293906ee1a87ef2" compoundref="pci_8h" startline="40">pciConfig::command</references>
        <references refid="structpciConfig_189713ede4222cc50162ba85128f69fd0" compoundref="pci_8h" startline="55">pciConfig::dev</references>
        <references refid="structpciConfig_14e80d873140cd94a6910dc9bafec1b16" compoundref="pci_8h" startline="38">pciConfig::deviceId</references>
        <references refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a1e095cc966dbecf6a0d8aad75348d1a">FALSE</references>
        <references refid="structpciConfig_1a59a8089cfd6f27bb37c9b99e2e243a3" compoundref="pci_8h" startline="56">pciConfig::func</references>
        <references refid="structpciConfig_15baa44abf78576c1282ee0b5d1420bd1" compoundref="pci_8h" startline="50">pciConfig::headerType</references>
        <references refid="structpciConfig_152862e778f41c948aa1fff00f7cbfaf1" compoundref="pci_8h" startline="44">pciConfig::interface</references>
        <references refid="structpciConfig_1e9f2db7fa0eb75fd4bddff056c2e921a" compoundref="pci_8h" startline="57">pciConfig::irq</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structpciConfig_13d2576570a3aad52528ee4a5d8bb6ca5" compoundref="pci_8h" startline="49">pciConfig::latencyTimer</references>
        <references refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" compoundref="pci_8c" startline="182" endline="208">pciRead</references>
        <references refid="pci_8h_1562e38dfaaab5bd65c08f7ee9769235d" compoundref="pci_8c" startline="210" endline="233">pciWrite</references>
        <references refid="structpciConfig_1067dfa928c2cc4f1427ffb7f1e43ca81" compoundref="pci_8h" startline="61">pciConfig::size</references>
        <references refid="structpciConfig_1d8aa8608221f9729a7f609cb003dbc90" compoundref="pci_8h" startline="41">pciConfig::status</references>
        <references refid="structpciConfig_1c7bc166ab3f2fc2cdc5ab88cf68e0a4d" compoundref="pci_8h" startline="45">pciConfig::subClass</references>
        <references refid="structpciConfig_12742d2e9d8bb1c62246993d890f47dd0" compoundref="pci_8h" startline="64">pciConfig::subsys</references>
        <references refid="structpciConfig_126d5cecfcd18d8d9249a6e84bb778a17" compoundref="pci_8h" startline="63">pciConfig::subsysVendor</references>
        <references refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a82764c3079aea4e60c80e45befbb839">TRUE</references>
        <references refid="structpciConfig_141aa6f820c11581dabb2664524e41a53" compoundref="pci_8h" startline="37">pciConfig::vendorId</references>
        <references refid="ap-boot_8S_17e98760dd541754f39aa9a0060176908" compoundref="ap-boot_8S" startline="6">x10</references>
        <referencedby refid="pci_8c_15c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="292" endline="312">pci_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="pci_8c_109d5fac523ec602b928a2eeb2dc3eee6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref></type>
        <definition>uInt32 pciRead</definition>
        <argsstring>(int bus, int dev, int func, int reg, int bytes)</argsstring>
        <name>pciRead</name>
        <param>
          <type>int</type>
          <declname>bus</declname>
        </param>
        <param>
          <type>int</type>
          <declname>dev</declname>
        </param>
        <param>
          <type>int</type>
          <declname>func</declname>
        </param>
        <param>
          <type>int</type>
          <declname>reg</declname>
        </param>
        <param>
          <type>int</type>
          <declname>bytes</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="182" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="182" bodyend="208"/>
        <references refid="io_8h_177b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="39" endline="47">inportByte</references>
        <references refid="io_8h_18d6617406b264c7f9e143adab8406791" compoundref="io_8c" startline="134" endline="142">inportDWord</references>
        <references refid="io_8h_1fb703b187feb4b92444454df6c3dd9e6" compoundref="io_8c" startline="56" endline="64">inportWord</references>
        <references refid="io_8h_12e2ad8d744ae4b35ea37d39dcfea1296" compoundref="io_8c" startline="119" endline="125">outportDWord</references>
        <referencedby refid="pci_8c_151fa422468461d6a5e06b3cea7ceb912" compoundref="pci_8c" startline="236" endline="290">pciProbe</referencedby>
      </memberdef>
      <memberdef kind="function" id="pci_8c_1562e38dfaaab5bd65c08f7ee9769235d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void pciWrite</definition>
        <argsstring>(int bus, int dev, int func, int reg, uInt32 v, int bytes)</argsstring>
        <name>pciWrite</name>
        <param>
          <type>int</type>
          <declname>bus</declname>
        </param>
        <param>
          <type>int</type>
          <declname>dev</declname>
        </param>
        <param>
          <type>int</type>
          <declname>func</declname>
        </param>
        <param>
          <type>int</type>
          <declname>reg</declname>
        </param>
        <param>
          <type><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref></type>
          <declname>v</declname>
        </param>
        <param>
          <type>int</type>
          <declname>bytes</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="210" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="210" bodyend="233"/>
        <references refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="73" endline="79">outportByte</references>
        <references refid="io_8h_12e2ad8d744ae4b35ea37d39dcfea1296" compoundref="io_8c" startline="119" endline="125">outportDWord</references>
        <references refid="io_8h_1243f6b6d22cc5948908b764d58efc2b0" compoundref="io_8c" startline="104" endline="110">outportWord</references>
        <referencedby refid="pci_8c_151fa422468461d6a5e06b3cea7ceb912" compoundref="pci_8c" startline="236" endline="290">pciProbe</referencedby>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="pci_8c_1293d57c5df3007d82a1bb7d2ae6bcd73" prot="public" static="no" mutable="no">
        <type><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
        <definition>uInt8 baseClass</definition>
        <argsstring></argsstring>
        <name>baseClass</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="36" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="36" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_1c623cf08a42340d79da60f5c0890b03b" prot="public" static="no" mutable="no">
        <type><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
        <definition>uInt8 interface</definition>
        <argsstring></argsstring>
        <name>interface</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="38" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="38" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_18f8f80d37794cde9472343e4487ba3eb" prot="public" static="no" mutable="no">
        <type>const char *</type>
        <definition>const char* name</definition>
        <argsstring></argsstring>
        <name>name</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="39" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="39" bodyend="-1"/>
        <referencedby refid="kern__sysctl_8c_123c118948f8d574b180e46e55ce2ec5c" compoundref="kern__sysctl_8c" startline="46" endline="63">def_ctls</referencedby>
        <referencedby refid="hd_8c_1a6ffe735243161c69ce0930999e02f88" compoundref="hd_8c" startline="39" endline="123">initHardDisk</referencedby>
        <referencedby refid="ufs_8c_18b14c49128395a8745bc83cfcce7b9cf" compoundref="ufs_8c" startline="236" endline="269">lookup</referencedby>
        <referencedby refid="pci_8c_15c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="292" endline="312">pci_init</referencedby>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_14cf86f576a7ecc8e777cae716efb13d1" prot="public" static="no" mutable="no">
        <type>@7</type>
        <definition>struct @7  pciClasses[]</definition>
        <argsstring>[]</argsstring>
        <name>pciClasses</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="180"/>
        <referencedby refid="pci_8c_15c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="292" endline="312">pci_init</referencedby>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_18546d58b91ffd977d28677bb84a92e18" prot="public" static="no" mutable="no">
        <type><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
        <definition>uInt8 subClass</definition>
        <argsstring></argsstring>
        <name>subClass</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" line="37" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c" bodystart="37" bodyend="-1"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>Copyright<sp/>(c)<sp/>2002-2004<sp/>The<sp/>UbixOS<sp/>Project</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="7"><highlight class="comment"></highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.<sp/><sp/>Redistributions<sp/>in<sp/>binary</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of<sp/>conditions,<sp/>the<sp/>following</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or<sp/>other<sp/>materials<sp/>provided</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>with<sp/>the<sp/>distribution.<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"></highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>COPYRIGHT<sp/>HOLDERS<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>EXPRESS<sp/>OR<sp/>IMPLIED<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="25"><highlight class="comment"></highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>$Id: pci_8c.xml 88 2016-01-12 00:11:29Z reddawg $</highlight></codeline>
<codeline lineno="27"><highlight class="comment"></highlight></codeline>
<codeline lineno="28"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="pci_8h" kindref="compound">pci/pci.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="io_8h" kindref="compound">sys/io.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="types_8h" kindref="compound">ubixos/types.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="36" refid="pci_8c_1293d57c5df3007d82a1bb7d2ae6bcd73" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/><ref refid="pci_8c_1293d57c5df3007d82a1bb7d2ae6bcd73" kindref="member">baseClass</ref>;</highlight></codeline>
<codeline lineno="37" refid="pci_8c_18546d58b91ffd977d28677bb84a92e18" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/><ref refid="pci_8c_18546d58b91ffd977d28677bb84a92e18" kindref="member">subClass</ref>;</highlight></codeline>
<codeline lineno="38" refid="pci_8c_1c623cf08a42340d79da60f5c0890b03b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/><ref refid="pci_8c_1c623cf08a42340d79da60f5c0890b03b" kindref="member">interface</ref>;</highlight></codeline>
<codeline lineno="39" refid="pci_8c_18f8f80d37794cde9472343e4487ba3eb" refkind="member"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/><ref refid="pci_8c_18f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/>}<sp/><ref refid="pci_8c_14cf86f576a7ecc8e777cae716efb13d1" kindref="member">pciClasses</ref>[]<sp/>=<sp/>{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x00,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Undefined&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x00,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;VGA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;SCSI&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;IDE&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x01,<sp/>0x8A,<sp/></highlight><highlight class="stringliteral">&quot;IDE&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Floppy&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;IPI&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RAID&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x01,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x02,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Ethernet&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x02,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Token<sp/>Ring&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x02,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;FDDI&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x02,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;ATM&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x02,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;ISDN&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x02,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x03,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;VGA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x03,<sp/>0x00,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;VGA+8514&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x03,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;XGA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x03,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;3D&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x03,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;VGA<sp/>Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x04,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Video&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x04,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Audio&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x04,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Telephony&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x04,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x05,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RAM&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x05,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Flash&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x05,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>HOST&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>ISA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>EISA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>MCA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCI&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x04,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCI<sp/>(Subtractive<sp/>Decode)&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x05,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCMCIA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x06,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>NuBUS&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x07,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>Cardbus&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x08,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>RACEway&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x09,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCI&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x0A,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>InfiBand&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x06,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Serial&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16450&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16550&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x03,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16650&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x04,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16750&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x05,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16850&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x06,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16950&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Parallel&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>BiDir&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>ECP&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x03,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>IEEE1284&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x01,<sp/>0xFE,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>IEEE1284<sp/>Target&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Multiport<sp/>Serial&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Hayes<sp/>Compatible<sp/>Modem&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x03,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;Hayes<sp/>Compatible<sp/>Modem,<sp/>16450&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x03,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;Hayes<sp/>Compatible<sp/>Modem,<sp/>16550&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x03,<sp/>0x03,<sp/></highlight><highlight class="stringliteral">&quot;Hayes<sp/>Compatible<sp/>Modem,<sp/>16650&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x03,<sp/>0x04,<sp/></highlight><highlight class="stringliteral">&quot;Hayes<sp/>Compatible<sp/>Modem,<sp/>16750&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x07,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PIC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>PIC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;EISA<sp/>PIC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x10,<sp/></highlight><highlight class="stringliteral">&quot;I/O<sp/>APIC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x20,<sp/></highlight><highlight class="stringliteral">&quot;I/O(x)<sp/>APIC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;DMA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x01,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>DMA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x01,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;EISA<sp/>DMA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Timer&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x02,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>Timer&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x02,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;EISA<sp/>Timer&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RTC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>RTC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Hot-Plug&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x08,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x09,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Keyboard&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x09,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Pen&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x09,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Mouse&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x09,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Scanner&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x09,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Game<sp/>Port&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x09,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0a,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Generic&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0a,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;386&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;486&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Pentium&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PentiumPro&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;DEC<sp/>Alpha&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x20,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PowerPC&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x30,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;MIPS&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x40,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Coprocessor&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0b,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;FireWire&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x00,<sp/>0x10,<sp/></highlight><highlight class="stringliteral">&quot;OHCI<sp/>FireWire&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Access.bus&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;SSA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;USB<sp/>(UHCI)&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0x10,<sp/></highlight><highlight class="stringliteral">&quot;USB<sp/>(OHCI)&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0x80,<sp/></highlight><highlight class="stringliteral">&quot;USB&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0xFE,<sp/></highlight><highlight class="stringliteral">&quot;USB<sp/>Device&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Fiber&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x05,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;SMBus<sp/>Controller&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x06,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;InfiniBand&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0c,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0d,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;iRDA&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0d,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Consumer<sp/>IR&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0d,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RF&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0d,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0e,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;I2O&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0e,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0f,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;TV&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0f,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Audio&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0f,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Voice&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0f,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Data&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x0f,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="170"><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x10,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Network&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x10,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Entertainment&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x10,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="174"><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x11,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;DPIO<sp/>Modules&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x11,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Performance<sp/>Counters&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x11,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Comm<sp/>Sync,<sp/>Time+Frequency<sp/>Measurement&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/>{<sp/>0x11,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/>};</highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight></codeline>
<codeline lineno="182" refid="pci_8c_109d5fac523ec602b928a2eeb2dc3eee6" refkind="member"><highlight class="normal"><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bus,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dev,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>func,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>reg,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bytes)<sp/>{</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>base;</highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structconfadd" kindref="compound">confadd</ref><sp/>c;</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>n;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/>u;</highlight></codeline>
<codeline lineno="189"><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/>u.n<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/>u.c.enable<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/>u.c.rsvd<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/>u.c.bus<sp/>=<sp/>bus;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/>u.c.dev<sp/>=<sp/>dev;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/>u.c.func<sp/>=<sp/>func;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/>u.c.reg<sp/>=<sp/>reg<sp/>&amp;<sp/>0xFC;</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><ref refid="io_8h_12e2ad8d744ae4b35ea37d39dcfea1296" kindref="member">outportDWord</ref>(0xCF8,<sp/>u.n);</highlight></codeline>
<codeline lineno="199"><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/>base<sp/>=<sp/>0xCFC<sp/>+<sp/>(reg<sp/>&amp;<sp/>0x03);</highlight></codeline>
<codeline lineno="201"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(bytes){</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(<ref refid="io_8h_177b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(base));</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>2:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(<ref refid="io_8h_1fb703b187feb4b92444454df6c3dd9e6" kindref="member">inportWord</ref>(base));</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>4:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(<ref refid="io_8h_18d6617406b264c7f9e143adab8406791" kindref="member">inportDWord</ref>(base));</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="209"><highlight class="normal"></highlight></codeline>
<codeline lineno="210" refid="pci_8c_1562e38dfaaab5bd65c08f7ee9769235d" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="pci_8h_1562e38dfaaab5bd65c08f7ee9769235d" kindref="member">pciWrite</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_14a00014cb3b7ee070b7a755620f3d0fd" kindref="member">bus</ref>,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1b8dfe4e29583b1da869d95fdf0aedbc1" kindref="member">dev</ref>,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1afb15c7a48b105117892b837bf2c23f2" kindref="member">func</ref>,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_168dbcf1a10079c788ebf7b7cebb58125" kindref="member">reg</ref>,<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>v,</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bytes)<sp/>{</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>base;</highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structconfadd" kindref="compound">confadd</ref><sp/>c;</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>n;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/>u;</highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/>u.n<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/>u.c.enable<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/>u.c.rsvd<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/>u.c.bus<sp/>=<sp/>bus;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/>u.c.dev<sp/>=<sp/>dev;</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/>u.c.func<sp/>=<sp/>func;</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/>u.c.reg<sp/>=<sp/>reg<sp/>&amp;<sp/>0xFC;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/>base<sp/>=<sp/>0xCFC<sp/>+<sp/>(reg<sp/>&amp;<sp/>0x03);</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><ref refid="io_8h_12e2ad8d744ae4b35ea37d39dcfea1296" kindref="member">outportDWord</ref>(0xCF8,<sp/>u.n);</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(bytes){</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:<sp/><ref refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(base,<sp/>(<ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref>)<sp/>v);<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>2:<sp/><ref refid="io_8h_1243f6b6d22cc5948908b764d58efc2b0" kindref="member">outportWord</ref>(base,<sp/>(<ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref>)<sp/>v);<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>4:<sp/><ref refid="io_8h_12e2ad8d744ae4b35ea37d39dcfea1296" kindref="member">outportDWord</ref>(base,<sp/>v);<sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="234"><highlight class="normal"></highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
<codeline lineno="236" refid="pci_8c_151fa422468461d6a5e06b3cea7ceb912" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/><ref refid="pci_8h_151fa422468461d6a5e06b3cea7ceb912" kindref="member">pciProbe</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_14a00014cb3b7ee070b7a755620f3d0fd" kindref="member">bus</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1b8dfe4e29583b1da869d95fdf0aedbc1" kindref="member">dev</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1afb15c7a48b105117892b837bf2c23f2" kindref="member">func</ref>,</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpciConfig" kindref="compound">pciConfig</ref><sp/>*cfg)<sp/>{</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*<ref refid="bcopy_8c_1afc9a69535613ac225df2d6195518116" kindref="member">word</ref><sp/>=<sp/>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*)<sp/>cfg;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>v;</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;i&lt;4;i++)<sp/>{</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/>word[i]<sp/>=<sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(bus,dev,func,4*i,4);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(cfg-&gt;<ref refid="structpciConfig_141aa6f820c11581dabb2664524e41a53" kindref="member">vendorId</ref><sp/>==<sp/>0xffff)<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a1e095cc966dbecf6a0d8aad75348d1a" kindref="member">FALSE</ref>;</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(cfg-&gt;<ref refid="structpciConfig_141aa6f820c11581dabb2664524e41a53" kindref="member">vendorId</ref><sp/>==<sp/>0x0)<sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a1e095cc966dbecf6a0d8aad75348d1a" kindref="member">FALSE</ref>;<sp/></highlight><highlight class="comment">/*<sp/>Quick<sp/>Hack<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"></highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_11c99eb7381df726aa6471208dc6a68e2" kindref="member">bus</ref><sp/>=<sp/>bus;</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_189713ede4222cc50162ba85128f69fd0" kindref="member">dev</ref><sp/>=<sp/>dev;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1a59a8089cfd6f27bb37c9b99e2e243a3" kindref="member">func</ref><sp/>=<sp/>func;</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_126d5cecfcd18d8d9249a6e84bb778a17" kindref="member">subsysVendor</ref><sp/>=<sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(bus,<sp/>dev,<sp/>func,<sp/>0x2c,<sp/>2);</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_12742d2e9d8bb1c62246993d890f47dd0" kindref="member">subsys</ref><sp/>=<sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(bus,<sp/>dev,<sp/>func,<sp/>0x2e,<sp/>2);</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Device<sp/>Info:<sp/>/bus/pci/%d/%d/%d\n&quot;</highlight><highlight class="normal">,bus,dev,func);</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>*<sp/>Vendor:<sp/>%X<sp/><sp/><sp/>Device:<sp/>%X<sp/><sp/>Class/SubClass/Interface<sp/>%X/%X/%X\n&quot;</highlight><highlight class="normal">,cfg-&gt;<ref refid="structpciConfig_141aa6f820c11581dabb2664524e41a53" kindref="member">vendorId</ref>,cfg-&gt;<ref refid="structpciConfig_14e80d873140cd94a6910dc9bafec1b16" kindref="member">deviceId</ref>,cfg-&gt;<ref refid="structpciConfig_19bfd2d9a3ba40dd32ba4f453dd1d6783" kindref="member">baseClass</ref>,cfg-&gt;<ref refid="structpciConfig_1c7bc166ab3f2fc2cdc5ab88cf68e0a4d" kindref="member">subClass</ref>,cfg-&gt;<ref refid="structpciConfig_152862e778f41c948aa1fff00f7cbfaf1" kindref="member">interface</ref>);</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>*<sp/>Status:<sp/>%X<sp/><sp/>Command:<sp/>%X<sp/><sp/>BIST/Type/Lat/CLS:<sp/>%X/%X/%X/%X\n&quot;</highlight><highlight class="normal">,cfg-&gt;<ref refid="structpciConfig_1d8aa8608221f9729a7f609cb003dbc90" kindref="member">status</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1620dc11ca24ea3f4a293906ee1a87ef2" kindref="member">command</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_125432930e0aeee471b7a6152f5336180" kindref="member">bist</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_15baa44abf78576c1282ee0b5d1420bd1" kindref="member">headerType</ref>,cfg-&gt;<ref refid="structpciConfig_13d2576570a3aad52528ee4a5d8bb6ca5" kindref="member">latencyTimer</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1995b791fa6ade24129754af9010c3a8c" kindref="member">cacheLineSize</ref>);</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(cfg-&gt;<ref refid="structpciConfig_15baa44abf78576c1282ee0b5d1420bd1" kindref="member">headerType</ref><sp/>&amp;<sp/>0x7F){</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0:<sp/></highlight><highlight class="comment">/*<sp/>normal<sp/>device<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i=0;i&lt;6;i++)<sp/>{</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>v<sp/>=<sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(bus,dev,func,i*4<sp/>+<sp/>0<ref refid="ap-boot_8S_17e98760dd541754f39aa9a0060176908" kindref="member">x10</ref>,<sp/>4);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(v)<sp/>{</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>v2;</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pci_8h_1562e38dfaaab5bd65c08f7ee9769235d" kindref="member">pciWrite</ref>(bus,dev,func,i*4<sp/>+<sp/>0<ref refid="ap-boot_8S_17e98760dd541754f39aa9a0060176908" kindref="member">x10</ref>,<sp/>0xffffffff,<sp/>4);</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>v2<sp/>=<sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(bus,dev,func,i*4+0<ref refid="ap-boot_8S_17e98760dd541754f39aa9a0060176908" kindref="member">x10</ref>,<sp/>4)<sp/>&amp;<sp/>0xfffffff0;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pci_8h_1562e38dfaaab5bd65c08f7ee9769235d" kindref="member">pciWrite</ref>(bus,dev,func,i*4<sp/>+<sp/>0<ref refid="ap-boot_8S_17e98760dd541754f39aa9a0060176908" kindref="member">x10</ref>,<sp/>v,<sp/>4);</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>v2<sp/>=<sp/>1<sp/>+<sp/>~v2;</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(v<sp/>&amp;<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1bb26815c9bf94949629d95ee37118a76" kindref="member">base</ref>[i]<sp/>=<sp/>v<sp/>&amp;<sp/>0xffff;</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1067dfa928c2cc4f1427ffb7f1e43ca81" kindref="member">size</ref>[i]<sp/>=<sp/>v2<sp/>&amp;<sp/>0xffff;</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1bb26815c9bf94949629d95ee37118a76" kindref="member">base</ref>[i]<sp/>=<sp/>v;</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1067dfa928c2cc4f1427ffb7f1e43ca81" kindref="member">size</ref>[i]<sp/>=<sp/>v2;</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1bb26815c9bf94949629d95ee37118a76" kindref="member">base</ref>[i]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1067dfa928c2cc4f1427ffb7f1e43ca81" kindref="member">size</ref>[i]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>v<sp/>=<sp/><ref refid="pci_8h_109d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(bus,dev,func,0x3c,1);</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1e9f2db7fa0eb75fd4bddff056c2e921a" kindref="member">irq</ref><sp/>=<sp/>(v<sp/>==<sp/>0xff<sp/>?<sp/>0<sp/>:<sp/>v);</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>*<sp/>PCI<sp/>&lt;-&gt;<sp/>PCI<sp/>Bridge\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>*<sp/>Unknown<sp/>Header<sp/>Type\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="288"><highlight class="normal"></highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(<ref refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a82764c3079aea4e60c80e45befbb839" kindref="member">TRUE</ref>);</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="291"><highlight class="normal"></highlight></codeline>
<codeline lineno="292" refid="pci_8c_15c450b9e2534226b162a16de0ef6b434" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="pci_8h_15c450b9e2534226b162a16de0ef6b434" kindref="member">pci_init</ref>()<sp/>{</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/><ref refid="structconfadd_14a00014cb3b7ee070b7a755620f3d0fd" kindref="member">bus</ref>,<ref refid="structconfadd_1b8dfe4e29583b1da869d95fdf0aedbc1" kindref="member">dev</ref>,<ref refid="structconfadd_1afb15c7a48b105117892b837bf2c23f2" kindref="member">func</ref>;</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpciConfig" kindref="compound">pciConfig</ref><sp/>pcfg;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(bus<sp/>=<sp/>0x0;<sp/>bus<sp/>&lt;<sp/>0x2;<sp/>bus++)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>255<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(dev<sp/>=<sp/>0;<sp/>dev<sp/>&lt;<sp/>32;<sp/>dev++)<sp/>{</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(func<sp/>=<sp/>0;<sp/>func<sp/>&lt;<sp/>8;<sp/>func++)<sp/>{</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="pci_8h_151fa422468461d6a5e06b3cea7ceb912" kindref="member">pciProbe</ref>(bus,<sp/>dev,<sp/>func,<sp/>&amp;pcfg)<sp/>==<sp/><ref refid="types_8h_1f6a258d8f3ee5206d682d799316314b1a82764c3079aea4e60c80e45befbb839" kindref="member">TRUE</ref>)<sp/>{</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>kprintf(&quot;<sp/><sp/>*<sp/>Vendor:<sp/>%X<sp/><sp/><sp/>Device:<sp/>%X<sp/><sp/>Class/SubClass/Interface<sp/>%X/%X/%X\n&quot;,pcfg.vendorId,pcfg.deviceId,pcfg.baseClass,pcfg.subClass,pcfg.interface);<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0x0;i&lt;<ref refid="pci_8h_13c5cd622462bb50b6dab4c189e219eb9" kindref="member">countof</ref>(<ref refid="pci_8c_14cf86f576a7ecc8e777cae716efb13d1" kindref="member">pciClasses</ref>);i++)<sp/>{</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pcfg.<ref refid="structpciConfig_19bfd2d9a3ba40dd32ba4f453dd1d6783" kindref="member">baseClass</ref><sp/>==<sp/>pciClasses[i].baseClass<sp/>&amp;&amp;<sp/>pcfg.<ref refid="structpciConfig_1c7bc166ab3f2fc2cdc5ab88cf68e0a4d" kindref="member">subClass</ref><sp/>==<sp/>pciClasses[i].subClass<sp/>&amp;&amp;<sp/>pcfg.<ref refid="structpciConfig_152862e778f41c948aa1fff00f7cbfaf1" kindref="member">interface</ref><sp/>==<sp/>pciClasses[i].interface)<sp/>{</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;PCI<sp/>Device:<sp/>%s<sp/>@<sp/>IRQ:<sp/>0x%X\n&quot;</highlight><highlight class="normal">,pciClasses[i].<ref refid="pci_8c_18f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,pcfg.<ref refid="structpciConfig_1e9f2db7fa0eb75fd4bddff056c2e921a" kindref="member">irq</ref>);</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="313"><highlight class="normal"></highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="315"><highlight class="comment"><sp/>$Log: pci_8c.xml,v $
<codeline lineno="315"><highlight class="comment"><sp/>Revision 1.6  2006/12/19 14:12:52  reddawg
<codeline lineno="315"><highlight class="comment"><sp/>rtld-elf almost workign
<codeline lineno="315"><highlight class="comment"><sp/></highlight></codeline>
<codeline lineno="316"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2006/06/01<sp/>12:46:16<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="317"><highlight class="comment"><sp/>ubix2</highlight></codeline>
<codeline lineno="318"><highlight class="comment"></highlight></codeline>
<codeline lineno="319"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2005/10/12<sp/>00:13:37<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="320"><highlight class="comment"><sp/>Removed</highlight></codeline>
<codeline lineno="321"><highlight class="comment"></highlight></codeline>
<codeline lineno="322"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2005/09/26<sp/>17:24:36<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="323"><highlight class="comment"><sp/>no<sp/>message</highlight></codeline>
<codeline lineno="324"><highlight class="comment"></highlight></codeline>
<codeline lineno="325"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2004/08/20<sp/>17:49:13<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="326"><highlight class="comment"><sp/>Tiny<sp/>fixens</highlight></codeline>
<codeline lineno="327"><highlight class="comment"></highlight></codeline>
<codeline lineno="328"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2004/08/20<sp/>16:49:11<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="329"><highlight class="comment"><sp/>PCI<sp/>Updates<sp/>-<sp/>More<sp/>to<sp/>follow<sp/>as<sp/>PCI<sp/>system<sp/>gets<sp/>revamped</highlight></codeline>
<codeline lineno="330"><highlight class="comment"></highlight></codeline>
<codeline lineno="331"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2004/07/09<sp/>11:58:19<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="332"><highlight class="comment"><sp/>Updating<sp/>Driver<sp/>Routines</highlight></codeline>
<codeline lineno="333"><highlight class="comment"></highlight></codeline>
<codeline lineno="334"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2004/04/15<sp/>12:07:16<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="335"><highlight class="comment"><sp/>UbixOS<sp/>v1.0</highlight></codeline>
<codeline lineno="336"><highlight class="comment"></highlight></codeline>
<codeline lineno="337"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2004/04/13<sp/>16:36:33<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="338"><highlight class="comment"><sp/>Changed<sp/>our<sp/>copyright,<sp/>it<sp/>is<sp/>all<sp/>now<sp/>under<sp/>a<sp/>BSD-Style<sp/>license</highlight></codeline>
<codeline lineno="339"><highlight class="comment"></highlight></codeline>
<codeline lineno="340"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="341"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/home/reddawg/source/ubix2/src/sys/pci/pci.c"/>
  </compounddef>
</doxygen>
