<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="pci_8c" kind="file" language="C++">
    <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="kprintf_8h" local="no">lib/kprintf.h</includes>
    <incdepgraph>
      <node id="12">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="10">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>pci/pci.h</label>
        <link refid="pci_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/pci/pci.c</label>
        <link refid="pci_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="pci_8c_1a293d57c5df3007d82a1bb7d2ae6bcd73" prot="public" static="no" mutable="no">
        <type><ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
        <definition>uInt8 baseClass</definition>
        <argsstring></argsstring>
        <name>baseClass</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/pci.c" line="34" column="9" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="34" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_1ac623cf08a42340d79da60f5c0890b03b" prot="public" static="no" mutable="no">
        <type><ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
        <definition>uInt8 interface</definition>
        <argsstring></argsstring>
        <name>interface</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/pci.c" line="36" column="9" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="36" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" prot="public" static="no" mutable="no">
        <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> char *</type>
        <definition>const char* name</definition>
        <argsstring></argsstring>
        <name>name</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/pci.c" line="37" column="14" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="37" bodyend="-1"/>
        <referencedby refid="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" compoundref="hd_8c" startline="47" endline="194">_initHardDisk</referencedby>
        <referencedby refid="fat__format_8h_1a8958cfd5dc4bfceb08f41e50e54da92d" compoundref="fat__format_8c" startline="524" endline="531">fatfs_format</referencedby>
        <referencedby refid="namei_8c_1ad77c16b56493b15a0ffa0f3aedbffb71" compoundref="namei_8c" startline="68" endline="115">lookup</referencedby>
        <referencedby refid="group__netif_1ga69c93a139e8a1f6ef4e3d076a2897def" compoundref="netif_8c" startline="472" endline="493">netif_find</referencedby>
        <referencedby refid="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="244" endline="269">pci_init</referencedby>
        <referencedby refid="message_8c_1ac3e393b470de85c934df79a854965380" compoundref="message_8c" startline="43" endline="47">sysMpiPostMessage</referencedby>
        <referencedby refid="dirCache_8h_1aadfffea5ad577cecdfbc4eb7989cf193" compoundref="dirCache_8c" startline="193" endline="207">ubixfs_cacheNew</referencedby>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_1a06d7d37b951914590189751cececa69f" prot="public" static="no" mutable="no">
        <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct @29</type>
        <definition>const struct @29  pciClasses[]</definition>
        <argsstring>[]</argsstring>
        <name>pciClasses</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/pci.c" line="74" column="1"/>
        <referencedby refid="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="244" endline="269">pci_init</referencedby>
      </memberdef>
      <memberdef kind="variable" id="pci_8c_1a8546d58b91ffd977d28677bb84a92e18" prot="public" static="no" mutable="no">
        <type><ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
        <definition>uInt8 subClass</definition>
        <argsstring></argsstring>
        <name>subClass</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/pci.c" line="35" column="9" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="35" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" 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="C:/Dev/git/UbixOS/sys/pci/pci.c" line="244" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="244" bodyend="269"/>
        <references refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" compoundref="pci_8h" startline="83">pciConfig::bus</references>
        <references refid="structpciConfig_1a8e9f55ac27f0e6d5869a3a2bd9ffe6bb" compoundref="pci_8h" startline="44">pciConfig::classCode</references>
        <references refid="pci_8h_1a3c5cd622462bb50b6dab4c189e219eb9" compoundref="pci_8h" startline="98">countof</references>
        <references refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" compoundref="pci_8h" startline="84">pciConfig::dev</references>
        <references refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" compoundref="pci_8h" startline="85">pciConfig::func</references>
        <references refid="structpciConfig_1a9bbbff5574626b54e3a678dc38012a93" compoundref="pci_8h" startline="65">pciConfig::intLine</references>
        <references refid="structpciConfig_1ab857d16aeaeacd9fa6bf825e296a7d11" compoundref="pci_8h" startline="66">pciConfig::intPin</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" compoundref="pci_8c" startline="37">name</references>
        <references refid="pci_8c_1a06d7d37b951914590189751cececa69f">pciClasses</references>
        <references refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" compoundref="pci_8c" startline="139" endline="242">pciProbe</references>
        <references refid="structpciConfig_1afe5a1cf42dff529b250c7ee548ea812d" compoundref="pci_8h" startline="42">pciConfig::progIf</references>
        <references refid="structpciConfig_1a83a72a5cba21bffe8359bee95d82ac58" compoundref="pci_8h" startline="43">pciConfig::subClass</references>
        <references refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" compoundref="pci_8h" startline="35">pciConfig::vendorID</references>
      </memberdef>
      <memberdef kind="function" id="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref></type>
        <definition>uint32_t pciProbe</definition>
        <argsstring>(int bus, int dev, int func)</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>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/pci.c" line="139" column="10" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="139" bodyend="242"/>
        <references refid="structpciConfig_1a1daad32be860e62df484b3f1f3b72b5e" compoundref="pci_8h" startline="51">pciConfig::bar</references>
        <references refid="structpciConfig_1a2add335aa360526ac46154e7777f80e6" compoundref="pci_8h" startline="49">pciConfig::bist</references>
        <references refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" compoundref="pci_8h" startline="83">pciConfig::bus</references>
        <references refid="structpciConfig_1ab63a65ccdbc9fce15acb5edc3950daeb" compoundref="pci_8h" startline="46">pciConfig::cacheLineSize</references>
        <references refid="structpciConfig_1a8e9f55ac27f0e6d5869a3a2bd9ffe6bb" compoundref="pci_8h" startline="44">pciConfig::classCode</references>
        <references refid="structpciConfig_1aec8c642edd27bddd4671e2fbe61df627" compoundref="pci_8h" startline="38">pciConfig::command</references>
        <references refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" compoundref="pci_8h" startline="84">pciConfig::dev</references>
        <references refid="structpciConfig_1a58628534204bc4e05e5f9020ac8350d8" compoundref="pci_8h" startline="36">pciConfig::deviceID</references>
        <references refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" compoundref="pci_8h" startline="85">pciConfig::func</references>
        <references refid="structpciConfig_1a38752dcd81e2a6d67781100afa24bdf8" compoundref="pci_8h" startline="48">pciConfig::headerType</references>
        <references refid="structpciConfig_1a9bbbff5574626b54e3a678dc38012a93" compoundref="pci_8h" startline="65">pciConfig::intLine</references>
        <references refid="structpciConfig_1ab857d16aeaeacd9fa6bf825e296a7d11" compoundref="pci_8h" startline="66">pciConfig::intPin</references>
        <references refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="342" endline="382">kfree</references>
        <references refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="241" endline="331">kmalloc</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structpciConfig_1a4d9b9cdea220f31faddd3be8e4284a40" compoundref="pci_8h" startline="47">pciConfig::latencyTimer</references>
        <references refid="string_8h_1ace4b911463887af5e748326323e99a23">memset</references>
        <references refid="pci_8c_1a09d5fac523ec602b928a2eeb2dc3eee6" compoundref="pci_8c" startline="76" endline="106">pciRead</references>
        <references refid="pci_8c_1a562e38dfaaab5bd65c08f7ee9769235d" compoundref="pci_8c" startline="108" endline="137">pciWrite</references>
        <references refid="structpciConfig_1afe5a1cf42dff529b250c7ee548ea812d" compoundref="pci_8h" startline="42">pciConfig::progIf</references>
        <references refid="structpciConfig_1a96580a28f37b495264305b791c7e2620" compoundref="pci_8h" startline="39">pciConfig::status</references>
        <references refid="structpciConfig_1a83a72a5cba21bffe8359bee95d82ac58" compoundref="pci_8h" startline="43">pciConfig::subClass</references>
        <references refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" compoundref="pci_8h" startline="35">pciConfig::vendorID</references>
        <referencedby refid="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" compoundref="pci_8c" startline="244" endline="269">pci_init</referencedby>
      </memberdef>
      <memberdef kind="function" id="pci_8c_1a09d5fac523ec602b928a2eeb2dc3eee6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" 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="C:/Dev/git/UbixOS/sys/pci/pci.c" line="76" column="8" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="76" bodyend="106"/>
        <references refid="structconfadd_1a183f0168efe559d9bd93c0333c633e87" compoundref="pci_8h" startline="93">confadd::bus</references>
        <references refid="structconfadd_1a25302013455d0f821a642ca36088082d" compoundref="pci_8h" startline="92">confadd::dev</references>
        <references refid="structconfadd_1a7e9ccb6d9b97c39e102cbedf58c22919" compoundref="pci_8h" startline="95">confadd::enable</references>
        <references refid="structconfadd_1a29f775cd426e1c998042e0ddf3b747ce" compoundref="pci_8h" startline="91">confadd::func</references>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="io_8h_1a8d6617406b264c7f9e143adab8406791" compoundref="io_8c" startline="133" endline="141">inportDWord</references>
        <references refid="io_8h_1afb703b187feb4b92444454df6c3dd9e6" compoundref="io_8c" startline="55" endline="63">inportWord</references>
        <references refid="io_8h_1a2e2ad8d744ae4b35ea37d39dcfea1296" compoundref="io_8c" startline="118" endline="124">outportDWord</references>
        <references refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" compoundref="pci_8h" startline="90">confadd::reg</references>
        <referencedby refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" compoundref="pci_8c" startline="139" endline="242">pciProbe</referencedby>
      </memberdef>
      <memberdef kind="function" id="pci_8c_1a562e38dfaaab5bd65c08f7ee9769235d" 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="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" 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="C:/Dev/git/UbixOS/sys/pci/pci.c" line="108" column="6" bodyfile="C:/Dev/git/UbixOS/sys/pci/pci.c" bodystart="108" bodyend="137"/>
        <references refid="structconfadd_1a183f0168efe559d9bd93c0333c633e87" compoundref="pci_8h" startline="93">confadd::bus</references>
        <references refid="structconfadd_1a25302013455d0f821a642ca36088082d" compoundref="pci_8h" startline="92">confadd::dev</references>
        <references refid="structconfadd_1a7e9ccb6d9b97c39e102cbedf58c22919" compoundref="pci_8h" startline="95">confadd::enable</references>
        <references refid="structconfadd_1a29f775cd426e1c998042e0ddf3b747ce" compoundref="pci_8h" startline="91">confadd::func</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="io_8h_1a2e2ad8d744ae4b35ea37d39dcfea1296" compoundref="io_8c" startline="118" endline="124">outportDWord</references>
        <references refid="io_8h_1a243f6b6d22cc5948908b764d58efc2b0" compoundref="io_8c" startline="103" endline="109">outportWord</references>
        <references refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" compoundref="pci_8h" startline="90">confadd::reg</references>
        <referencedby refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" compoundref="pci_8c" startline="139" endline="242">pciProbe</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*-</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<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<sp/>permitted</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<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="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><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="30"><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="31"><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="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><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="34" refid="pci_8c_1a293d57c5df3007d82a1bb7d2ae6bcd73" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/><ref refid="pci_8c_1a293d57c5df3007d82a1bb7d2ae6bcd73" kindref="member">baseClass</ref>;</highlight></codeline>
<codeline lineno="35" refid="pci_8c_1a8546d58b91ffd977d28677bb84a92e18" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/><ref refid="pci_8c_1a8546d58b91ffd977d28677bb84a92e18" kindref="member">subClass</ref>;</highlight></codeline>
<codeline lineno="36" refid="pci_8c_1ac623cf08a42340d79da60f5c0890b03b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/><ref refid="pci_8c_1ac623cf08a42340d79da60f5c0890b03b" kindref="member">interface</ref>;</highlight></codeline>
<codeline lineno="37" refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" 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_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>;</highlight></codeline>
<codeline lineno="38"><highlight class="normal">}<sp/><ref refid="pci_8c_1a06d7d37b951914590189751cececa69f" kindref="member">pciClasses</ref>[]<sp/>=<sp/>{<sp/>{<sp/>0x00,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Undefined&quot;</highlight><highlight class="normal"><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="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal">{<sp/>0x01,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;SCSI&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x01,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;IDE&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x01,<sp/>0x01,<sp/>0x8A,<sp/></highlight><highlight class="stringliteral">&quot;IDE&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x01,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Floppy&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x01,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;IPI&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x01,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RAID&quot;</highlight><highlight class="normal"><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="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal">{<sp/>0x02,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Ethernet&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x02,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Token<sp/>Ring&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x02,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;FDDI&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x02,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;ATM&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x02,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;ISDN&quot;</highlight><highlight class="normal"><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="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal">{<sp/>0x03,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;VGA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x03,<sp/>0x00,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;VGA+8514&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x03,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;XGA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x03,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;3D&quot;</highlight><highlight class="normal"><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="45"><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal">{<sp/>0x04,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Video&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x04,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Audio&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x04,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Telephony&quot;</highlight><highlight class="normal"><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="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal">{<sp/>0x05,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RAM&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x05,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Flash&quot;</highlight><highlight class="normal"><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="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal">{<sp/>0x06,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>HOST&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x06,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>EISA&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x06,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCI&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x06,<sp/>0x05,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCMCIA&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x06,<sp/>0x07,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>Cardbus&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x06,<sp/>0x09,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PCI<sp/>to<sp/>PCI&quot;</highlight><highlight class="normal"><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/>},<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="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal">{<sp/>0x07,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Serial&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16450&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16550&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x03,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16650&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x04,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16750&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x05,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16850&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x00,<sp/>0x06,<sp/></highlight><highlight class="stringliteral">&quot;Serial<sp/>-<sp/>16950&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Parallel&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>BiDir&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>ECP&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x07,<sp/>0x01,<sp/>0x03,<sp/></highlight><highlight class="stringliteral">&quot;Parallel<sp/>-<sp/>IEEE1284&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x07,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Multiport<sp/>Serial&quot;</highlight><highlight class="normal"><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/>},<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/>},<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/>},<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/>},<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/>},<sp/>{<sp/>0x07,<sp/>0x80,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Other&quot;</highlight><highlight class="normal"><sp/>},</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal">{<sp/>0x08,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PIC&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>PIC&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;EISA<sp/>PIC&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x00,<sp/>0x10,<sp/></highlight><highlight class="stringliteral">&quot;I/O<sp/>APIC&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x08,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;DMA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x01,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>DMA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x01,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;EISA<sp/>DMA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Timer&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x02,<sp/>0x01,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>Timer&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x02,<sp/>0x02,<sp/></highlight><highlight class="stringliteral">&quot;EISA<sp/>Timer&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RTC&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;ISA<sp/>RTC&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x08,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Hot-Plug&quot;</highlight><highlight class="normal"><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="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal">{<sp/>0x09,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Keyboard&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x09,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Pen&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x09,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Mouse&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x09,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Scanner&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x09,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Game<sp/>Port&quot;</highlight><highlight class="normal"><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="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal">{<sp/>0x0a,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Generic&quot;</highlight><highlight class="normal"><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="59"><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal">{<sp/>0x0b,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;386&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;486&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Pentium&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PentiumPro&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;DEC<sp/>Alpha&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x20,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;PowerPC&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x30,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;MIPS&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0b,<sp/>0x40,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Coprocessor&quot;</highlight><highlight class="normal"><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="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal">{<sp/>0x0c,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;FireWire&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x00,<sp/>0x10,<sp/></highlight><highlight class="stringliteral">&quot;OHCI<sp/>FireWire&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Access.bus&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;SSA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;USB<sp/>(UHCI)&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0x10,<sp/></highlight><highlight class="stringliteral">&quot;USB<sp/>(OHCI)&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0x80,<sp/></highlight><highlight class="stringliteral">&quot;USB&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x03,<sp/>0xFE,<sp/></highlight><highlight class="stringliteral">&quot;USB<sp/>Device&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Fiber&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x05,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;SMBus<sp/>Controller&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0c,<sp/>0x06,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;InfiniBand&quot;</highlight><highlight class="normal"><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="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal">{<sp/>0x0d,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;iRDA&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0d,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Consumer<sp/>IR&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0d,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;RF&quot;</highlight><highlight class="normal"><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="65"><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal">{<sp/>0x0e,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;I2O&quot;</highlight><highlight class="normal"><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="67"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal">{<sp/>0x0f,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;TV&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0f,<sp/>0x02,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Audio&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0f,<sp/>0x03,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Voice&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x0f,<sp/>0x04,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Data&quot;</highlight><highlight class="normal"><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="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal">{<sp/>0x10,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Network&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x10,<sp/>0x10,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Entertainment&quot;</highlight><highlight class="normal"><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="71"><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal">{<sp/>0x11,<sp/>0x00,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;DPIO<sp/>Modules&quot;</highlight><highlight class="normal"><sp/>},<sp/>{<sp/>0x11,<sp/>0x01,<sp/>0x00,<sp/></highlight><highlight class="stringliteral">&quot;Performance<sp/>Counters&quot;</highlight><highlight class="normal"><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/>},<sp/>{<sp/>0x11,<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"></highlight></codeline>
<codeline lineno="74"><highlight class="normal">};</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76" refid="pci_8c_1a09d5fac523ec602b928a2eeb2dc3eee6" refkind="member"><highlight class="normal"><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/><ref refid="pci_8c_1a09d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bus,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>dev,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>func,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>reg,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bytes)<sp/>{</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1a81f3b46fa4ddd984830104840a08da82" kindref="member">uInt16</ref><sp/>base;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="80"><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="81"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>n;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/>}<sp/>u;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>u.n<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>u.c.<ref refid="structconfadd_1a7e9ccb6d9b97c39e102cbedf58c22919" kindref="member">enable</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>u.c.rsvd<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>u.c.bus<sp/>=<sp/><ref refid="structconfadd_1a183f0168efe559d9bd93c0333c633e87" kindref="member">bus</ref>;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>u.c.dev<sp/>=<sp/><ref refid="structconfadd_1a25302013455d0f821a642ca36088082d" kindref="member">dev</ref>;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/>u.c.func<sp/>=<sp/><ref refid="structconfadd_1a29f775cd426e1c998042e0ddf3b747ce" kindref="member">func</ref>;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/>u.c.reg<sp/>=<sp/><ref refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" kindref="member">reg</ref><sp/>&amp;<sp/>0xFC;</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a2e2ad8d744ae4b35ea37d39dcfea1296" kindref="member">outportDWord</ref>(0xCF8,<sp/>u.n);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/>base<sp/>=<sp/>0xCFC<sp/>+<sp/>(<ref refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" kindref="member">reg</ref><sp/>&amp;<sp/>0x03);</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(bytes)<sp/>{</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(base));</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>2:</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="io_8h_1afb703b187feb4b92444454df6c3dd9e6" kindref="member">inportWord</ref>(base));</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>4:</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="io_8h_1a8d6617406b264c7f9e143adab8406791" kindref="member">inportDWord</ref>(base));</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="106"><highlight class="normal">}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108" refid="pci_8c_1a562e38dfaaab5bd65c08f7ee9769235d" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="pci_8c_1a562e38dfaaab5bd65c08f7ee9769235d" kindref="member">pciWrite</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a183f0168efe559d9bd93c0333c633e87" kindref="member">bus</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a25302013455d0f821a642ca36088082d" kindref="member">dev</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a29f775cd426e1c998042e0ddf3b747ce" kindref="member">func</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" kindref="member">reg</ref>,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>v,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bytes)<sp/>{</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1a81f3b46fa4ddd984830104840a08da82" kindref="member">uInt16</ref><sp/>base;</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="112"><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="113"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>n;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/>}<sp/>u;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/>u.n<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/>u.c.<ref refid="structconfadd_1a7e9ccb6d9b97c39e102cbedf58c22919" kindref="member">enable</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/>u.c.rsvd<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/>u.c.bus<sp/>=<sp/><ref refid="structconfadd_1a183f0168efe559d9bd93c0333c633e87" kindref="member">bus</ref>;</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/>u.c.dev<sp/>=<sp/><ref refid="structconfadd_1a25302013455d0f821a642ca36088082d" kindref="member">dev</ref>;</highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/>u.c.func<sp/>=<sp/><ref refid="structconfadd_1a29f775cd426e1c998042e0ddf3b747ce" kindref="member">func</ref>;</highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/>u.c.reg<sp/>=<sp/><ref refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" kindref="member">reg</ref><sp/>&amp;<sp/>0xFC;</highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/>base<sp/>=<sp/>0xCFC<sp/>+<sp/>(<ref refid="structconfadd_1a0a9c3960a73c47086fcccb9c955638c7" kindref="member">reg</ref><sp/>&amp;<sp/>0x03);</highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a2e2ad8d744ae4b35ea37d39dcfea1296" kindref="member">outportDWord</ref>(0xCF8,<sp/>u.n);</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(bytes)<sp/>{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>1:</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(base,<sp/>(<ref refid="objgfx30_8h_1aa4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref>)<sp/>v);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>2:</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a243f6b6d22cc5948908b764d58efc2b0" kindref="member">outportWord</ref>(base,<sp/>(<ref refid="objgfx30_8h_1a81f3b46fa4ddd984830104840a08da82" kindref="member">uInt16</ref>)<sp/>v);</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>4:</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a2e2ad8d744ae4b35ea37d39dcfea1296" kindref="member">outportDWord</ref>(base,<sp/>v);</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="137"><highlight class="normal">}</highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight></codeline>
<codeline lineno="139" refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" refkind="member"><highlight class="normal"><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/><ref refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" kindref="member">pciProbe</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a183f0168efe559d9bd93c0333c633e87" kindref="member">bus</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a25302013455d0f821a642ca36088082d" kindref="member">dev</ref>,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="structconfadd_1a29f775cd426e1c998042e0ddf3b747ce" kindref="member">func</ref>)<sp/>{</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpciConfig" kindref="compound">pciConfig</ref><sp/>*cfg<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>v;</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/>cfg<sp/>=<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpciConfig" kindref="compound">pciConfig</ref>));</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(cfg,<sp/>0x0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpciConfig" kindref="compound">pciConfig</ref>));</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>*word<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref><sp/>*)<sp/>cfg;</highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>4;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/>word[i]<sp/>=<sp/><ref refid="pci_8c_1a09d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(<ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>,<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>,<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>,<sp/>4<sp/>*<sp/>i,<sp/>4);</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>is<sp/>TEMPORARY<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cfg-&gt;<ref refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" kindref="member">vendorID</ref><sp/>==<sp/>0x1022<sp/>&amp;&amp;<sp/>i<sp/>==<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;got<sp/>it:<sp/>0x%X&quot;</highlight><highlight class="normal">,<sp/>word[i]);</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>word[i]<sp/>&amp;=<sp/>0xffff0000;</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>word[i]<sp/>|=<sp/>0x5;<sp/></highlight><highlight class="comment">//0x1<sp/>//0x5;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pci_8c_1a562e38dfaaab5bd65c08f7ee9769235d" kindref="member">pciWrite</ref>(<ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>,<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>,<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>,<sp/>4<sp/>*<sp/>i,<sp/>word[i],<sp/>4);</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;set<sp/>it:<sp/>0x%X\n&quot;</highlight><highlight class="normal">,<sp/>word[i]);</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cfg-&gt;<ref refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" kindref="member">vendorID</ref><sp/>==<sp/>0xffff)<sp/>{</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(cfg);</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0x0;</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cfg-&gt;<ref refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" kindref="member">vendorID</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(cfg);</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0x0;</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref><sp/>=<sp/><ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>;</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref><sp/>=<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>;</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/>cfg-&gt;<ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref><sp/>=<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>;</highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="177"><highlight class="comment"><sp/><sp/><sp/>if<sp/>(cfg-&gt;vendorID<sp/>==<sp/>0x1022)</highlight></codeline>
<codeline lineno="178"><highlight class="comment"><sp/><sp/><sp/>pciWrite(bus,<sp/>dev,<sp/>func,<sp/>0x3C,<sp/>0x5,1);</highlight></codeline>
<codeline lineno="179"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(cfg-&gt;<ref refid="structpciConfig_1a38752dcd81e2a6d67781100afa24bdf8" kindref="member">headerType</ref><sp/>&amp;<sp/>0x7F)<sp/>{</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0x0:<sp/></highlight><highlight class="comment">/*<sp/>normal<sp/>device<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>4;<sp/>i<sp/>&lt;=<sp/>16;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>word[i]<sp/>=<sp/><ref refid="pci_8c_1a09d5fac523ec602b928a2eeb2dc3eee6" kindref="member">pciRead</ref>(<ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>,<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>,<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>,<sp/>4<sp/>*<sp/>i,<sp/>4);</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cfg-&gt;<ref refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" kindref="member">vendorID</ref><sp/>==<sp/>0x1022)<sp/>{</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Device<sp/>Info:<sp/>/bus/pci/%d/%d/%d\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>,<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>,<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>);</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" 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">,<sp/>cfg-&gt;<ref refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" kindref="member">vendorID</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a58628534204bc4e05e5f9020ac8350d8" kindref="member">deviceID</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a8e9f55ac27f0e6d5869a3a2bd9ffe6bb" kindref="member">classCode</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a83a72a5cba21bffe8359bee95d82ac58" kindref="member">subClass</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1afe5a1cf42dff529b250c7ee548ea812d" kindref="member">progIf</ref>);</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" 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">,<sp/>cfg-&gt;<ref refid="structpciConfig_1a96580a28f37b495264305b791c7e2620" kindref="member">status</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1aec8c642edd27bddd4671e2fbe61df627" kindref="member">command</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a2add335aa360526ac46154e7777f80e6" kindref="member">bist</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a38752dcd81e2a6d67781100afa24bdf8" kindref="member">headerType</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a4d9b9cdea220f31faddd3be8e4284a40" kindref="member">latencyTimer</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1ab63a65ccdbc9fce15acb5edc3950daeb" kindref="member">cacheLineSize</ref>);</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>*<sp/>IRQ:<sp/>0x%X.0x%X,<sp/>BAR[0]:<sp/>0x%X\n&quot;</highlight><highlight class="normal">,<sp/>cfg-&gt;<ref refid="structpciConfig_1a9bbbff5574626b54e3a678dc38012a93" kindref="member">intLine</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1ab857d16aeaeacd9fa6bf825e296a7d11" kindref="member">intPin</ref>,<sp/>cfg-&gt;<ref refid="structpciConfig_1a1daad32be860e62df484b3f1f3b72b5e" kindref="member">bar</ref>[0]);</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0x1:</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" 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="195"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0x2:</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;<sp/><sp/>*<sp/>PCI<sp/>&lt;-&gt;<sp/>CardBus<sp/>Bridge\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" 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="201"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="204"><highlight class="normal"></highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="206"><highlight class="comment"><sp/><sp/><sp/>switch<sp/>(cfg-&gt;headerType<sp/>&amp;<sp/>0x7F)<sp/>{</highlight></codeline>
<codeline lineno="207"><highlight class="comment"><sp/><sp/><sp/>case<sp/>0:<sp/>//<sp/>normal<sp/>device</highlight></codeline>
<codeline lineno="208"><highlight class="comment"><sp/><sp/><sp/>for<sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>6;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="209"><highlight class="comment"><sp/><sp/><sp/>v<sp/>=<sp/>pciRead(bus,<sp/>dev,<sp/>func,<sp/>i<sp/>*<sp/>4<sp/>+<sp/>0x10,<sp/>4);</highlight></codeline>
<codeline lineno="210"><highlight class="comment"><sp/><sp/><sp/>if<sp/>(v)<sp/>{</highlight></codeline>
<codeline lineno="211"><highlight class="comment"><sp/><sp/><sp/>int<sp/>v2;</highlight></codeline>
<codeline lineno="212"><highlight class="comment"><sp/><sp/><sp/>pciWrite(bus,<sp/>dev,<sp/>func,<sp/>i<sp/>*<sp/>4<sp/>+<sp/>0x10,<sp/>0xffffffff,<sp/>4);</highlight></codeline>
<codeline lineno="213"><highlight class="comment"><sp/><sp/><sp/>v2<sp/>=<sp/>pciRead(bus,<sp/>dev,<sp/>func,<sp/>i<sp/>*<sp/>4<sp/>+<sp/>0x10,<sp/>4)<sp/>&amp;<sp/>0xfffffff0;</highlight></codeline>
<codeline lineno="214"><highlight class="comment"><sp/><sp/><sp/>pciWrite(bus,<sp/>dev,<sp/>func,<sp/>i<sp/>*<sp/>4<sp/>+<sp/>0x10,<sp/>v,<sp/>4);</highlight></codeline>
<codeline lineno="215"><highlight class="comment"><sp/><sp/><sp/>v2<sp/>=<sp/>1<sp/>+<sp/>~v2;</highlight></codeline>
<codeline lineno="216"><highlight class="comment"><sp/><sp/><sp/>if<sp/>(v<sp/>&amp;<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="217"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;base[i]<sp/>=<sp/>v<sp/>&amp;<sp/>0xffff;</highlight></codeline>
<codeline lineno="218"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;size[i]<sp/>=<sp/>v2<sp/>&amp;<sp/>0xffff;</highlight></codeline>
<codeline lineno="219"><highlight class="comment"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="220"><highlight class="comment"><sp/><sp/><sp/>else<sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;base[i]<sp/>=<sp/>v;</highlight></codeline>
<codeline lineno="222"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;size[i]<sp/>=<sp/>v2;</highlight></codeline>
<codeline lineno="223"><highlight class="comment"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="224"><highlight class="comment"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="225"><highlight class="comment"><sp/><sp/><sp/>else<sp/>{</highlight></codeline>
<codeline lineno="226"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;base[i]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="227"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;size[i]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="228"><highlight class="comment"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="229"><highlight class="comment"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="230"><highlight class="comment"><sp/><sp/><sp/>v<sp/>=<sp/>pciRead(bus,<sp/>dev,<sp/>func,<sp/>0x3c,<sp/>1);</highlight></codeline>
<codeline lineno="231"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;irq<sp/>=<sp/>(v<sp/>==<sp/>0xff<sp/>?<sp/>0<sp/>:<sp/>v);</highlight></codeline>
<codeline lineno="232"><highlight class="comment"><sp/><sp/><sp/>v<sp/>=<sp/>pciRead(bus,<sp/>dev,<sp/>func,<sp/>0x40,<sp/>1);</highlight></codeline>
<codeline lineno="233"><highlight class="comment"><sp/><sp/><sp/>cfg-&gt;irqLine<sp/>=<sp/>(v<sp/>==<sp/>0xff<sp/>?<sp/>0<sp/>:<sp/>v);</highlight></codeline>
<codeline lineno="234"><highlight class="comment"><sp/><sp/><sp/>break;</highlight></codeline>
<codeline lineno="235"><highlight class="comment"><sp/><sp/><sp/>case<sp/>1:</highlight></codeline>
<codeline lineno="236"><highlight class="comment"></highlight></codeline>
<codeline lineno="237"><highlight class="comment"></highlight></codeline>
<codeline lineno="238"><highlight class="comment"><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="239"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="240"><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>((<ref refid="include_2sys_2types_8h_1a0238af00180b6d9278fa1c6aa790fdf4" kindref="member">uint32_t</ref>)<sp/>cfg);</highlight></codeline>
<codeline lineno="242"><highlight class="normal">}</highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244" refid="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="pci_8c_1a5c450b9e2534226b162a16de0ef6b434" kindref="member">pci_init</ref>()<sp/>{</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref><sp/><ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>,<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>,<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><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="250"><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref><sp/>=<sp/>0x0;<sp/><ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref><sp/>&lt;<sp/>0x2;<sp/><ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>++)<sp/>{</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref><sp/>=<sp/>0;<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref><sp/>&lt;<sp/>32;<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>++)<sp/>{</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref><sp/>=<sp/>0;<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref><sp/>&lt;<sp/>8;<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>++)<sp/>{</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>pcfg<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpciConfig" kindref="compound">pciConfig</ref><sp/>*)<sp/><ref refid="pci_8c_1a9a16d3ca1d4538415b752ab0c58e72ba" kindref="member">pciProbe</ref>(<ref refid="structpciConfig_1a6ad529c48f62a51cc647c8ce9cc9c609" kindref="member">bus</ref>,<sp/><ref refid="structpciConfig_1aa73b7917021ebcf2ec28084faecaf35d" kindref="member">dev</ref>,<sp/><ref refid="structpciConfig_1a175cb9658f47e8b518172f0de510b96c" kindref="member">func</ref>);</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pcfg<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/>&lt;<sp/><ref refid="pci_8h_1a3c5cd622462bb50b6dab4c189e219eb9" kindref="member">countof</ref>(<ref refid="pci_8c_1a06d7d37b951914590189751cececa69f" kindref="member">pciClasses</ref>);<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="257"><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-&gt;<ref refid="structpciConfig_1a8e9f55ac27f0e6d5869a3a2bd9ffe6bb" kindref="member">classCode</ref><sp/>==<sp/><ref refid="pci_8c_1a06d7d37b951914590189751cececa69f" kindref="member">pciClasses</ref>[i].baseClass<sp/>&amp;&amp;<sp/>pcfg-&gt;<ref refid="structpciConfig_1a83a72a5cba21bffe8359bee95d82ac58" kindref="member">subClass</ref><sp/>==<sp/><ref refid="pci_8c_1a06d7d37b951914590189751cececa69f" kindref="member">pciClasses</ref>[i].subClass<sp/>&amp;&amp;<sp/>pcfg-&gt;<ref refid="structpciConfig_1afe5a1cf42dff529b250c7ee548ea812d" kindref="member">progIf</ref><sp/>==<sp/><ref refid="pci_8c_1a06d7d37b951914590189751cececa69f" kindref="member">pciClasses</ref>[i].interface)<sp/>{</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pcfg-&gt;<ref refid="structpciConfig_1aa9675635761800feb7a5827c100ef9ae" kindref="member">vendorID</ref><sp/>==<sp/>0x1022)<sp/>{</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;PCI<sp/>Device:<sp/>%s<sp/>@<sp/>IRQ:<sp/>0x%X.0x%X\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="pci_8c_1a06d7d37b951914590189751cececa69f" kindref="member">pciClasses</ref>[i].<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>pcfg-&gt;<ref refid="structpciConfig_1ab857d16aeaeacd9fa6bf825e296a7d11" kindref="member">intPin</ref>,<sp/>pcfg-&gt;<ref refid="structpciConfig_1a9bbbff5574626b54e3a678dc38012a93" kindref="member">intLine</ref>);</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="261"><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="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="269"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/pci/pci.c"/>
  </compounddef>
</doxygen>
