<?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="hd_8c" kind="file" language="C++">
    <compoundname>hd.c</compoundname>
    <includes refid="hd_8h" local="no">pci/hd.h</includes>
    <includes refid="io_8h" local="no">sys/io.h</includes>
    <includes refid="include_2sys_2device_8h" local="no">sys/device.h</includes>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="devfs_8h" local="no">devfs/devfs.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="gpt_8h" local="no">fs/common/gpt.h</includes>
    <incdepgraph>
      <node id="23">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
      </node>
      <node id="37">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="38">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="53">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="44">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
      </node>
      <node id="52">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>net/net.h</label>
        <link refid="net_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
      </node>
      <node id="57">
        <label>strings.h</label>
        <link refid="strings_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="49">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </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="19">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
      <node id="50">
        <label>mpi/mpi.h</label>
        <link refid="mpi_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="51" relation="include">
        </childnode>
      </node>
      <node id="33">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="34" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>ubixfs/ubixfs.h</label>
        <link refid="include_2ubixfs_2ubixfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
        <childnode refid="13" 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="54">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="45">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>vfs/vfs.h</label>
        <link refid="include_2vfs_2vfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
      </node>
      <node id="30">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="25">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="18">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="16" relation="include">
        </childnode>
      </node>
      <node id="56">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="57" 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="59">
        <label>sys/uuid.h</label>
        <link refid="uuid_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
      <node id="41">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="32" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
      </node>
      <node id="32">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
      </node>
      <node id="22">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="17">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="20">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="43">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
      </node>
      <node id="36">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="32" relation="include">
        </childnode>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="42">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
      </node>
      <node id="40">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
      </node>
      <node id="14">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="48">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="34">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
      </node>
      <node id="51">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="39">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="32" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/pci/hd.c</label>
        <link refid="hd_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="54" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="58" 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="58">
        <label>fs/common/gpt.h</label>
        <link refid="gpt_8h"/>
        <childnode refid="59" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>pci/hd.h</label>
        <link refid="hd_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>sys/sysproto_posix.h</label>
        <link refid="sysproto__posix_8h"/>
        <childnode refid="17" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="55">
        <label>devfs/devfs.h</label>
        <link refid="devfs_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="hd_8c_1a0887e6696d2ca180560f3df0f6a7d5c8" prot="public" static="yes" mutable="no">
        <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> <ref refid="uuid_8h_1a86c80a9bcc352795ec12e8312d089c79" kindref="member">uuid_t</ref></type>
        <definition>const uuid_t freebsd_ufs_uuid</definition>
        <argsstring></argsstring>
        <name>freebsd_ufs_uuid</name>
        <initializer>= <ref refid="gpt_8h_1ae2f7ecd5eab0dec1e2c4036b4106c636" kindref="member">GPT_ENT_TYPE_FREEBSD_UFS</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="38" column="21" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="38" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="hd_8c_1abb3d2857aac1dff3e48216e904a2684d" prot="public" static="yes" mutable="no">
        <type>static</type>
        <definition>hdC</definition>
        <argsstring></argsstring>
        <name>hdC</name>
        <initializer>= 0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="40" column="8" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="40" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int _initHardDisk</definition>
        <argsstring>(int hdD)</argsstring>
        <name>_initHardDisk</name>
        <param>
          <type>int</type>
          <declname>hdD</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="47" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="47" bodyend="194"/>
        <references refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" compoundref="pci_8c" startline="37">name</references>
        <referencedby refid="hd_8c_1aa6ffe735243161c69ce0930999e02f88" compoundref="hd_8c" startline="42" endline="45">initHardDisk</referencedby>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1ab01b187dc277e089d0161315437fde41" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdInit</definition>
        <argsstring>(struct device_node *dev)</argsstring>
        <name>hdInit</name>
        <param>
          <type>struct <ref refid="structdevice__node" kindref="compound">device_node</ref> *</type>
          <declname>dev</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="221" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="221" bodyend="354"/>
        <references refid="hd_8h_1a7762d2c130e593e92b3c3b521e5779f2" compoundref="hd_8h" startline="65">ATA_COMMAND</references>
        <references refid="hd_8h_1a10441946900b59df8e0c67d69a1379f0" compoundref="hd_8h" startline="50">ATA_DATA</references>
        <references refid="hd_8h_1aa9ede1f736f86805a4aa00df9543b32f" compoundref="hd_8h" startline="61">ATA_DRIVE</references>
        <references refid="hd_8h_1a9d19baff12415486088caa92201e9424" compoundref="hd_8h" startline="112">ATA_IDENTIFY</references>
        <references refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" compoundref="hd_8h" startline="166">driveInfo::ata_identify</references>
        <references refid="hd_8h_1a15501f1f9c1ad7d74f7d18dadc6376de" compoundref="hd_8h" startline="46">ATA_IDENTIFY_COMMAND_SET_SUPPORTED1_48BIT_ENABLE</references>
        <references refid="hd_8h_1ab3870ab2b5eed5bca15ced1c0e7b8f5c" compoundref="hd_8h" startline="47">ATA_IDENTIFY_SECTOR_LARGER_THEN_512_ENABLE</references>
        <references refid="hd_8h_1a676551b0bd38a1bebd58041025e4b5ad" compoundref="hd_8h" startline="95">ATA_S_BUSY</references>
        <references refid="structata__identify__data_1a4545653f06a4195a75edcd29001cb701" compoundref="hd_8h" startline="348">ata_identify_data::command_set_enabled1</references>
        <references refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" compoundref="include_2sys_2device_8h" startline="37">device_node::devInfo</references>
        <references refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" compoundref="hd_8h" startline="43">hdCmd</references>
        <references refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" compoundref="hd_8h" startline="171">driveInfo::hdDev</references>
        <references refid="structdriveInfo_1af385dccea1485233fc52351a8d7666aa" compoundref="hd_8h" startline="170">driveInfo::hdEnable</references>
        <references refid="hd_8h_1acefc72ce44e542db4580ce7e7c732aab" compoundref="hd_8h" startline="41">hdHead</references>
        <references refid="structdriveInfo_1aa446858a696dafa8454b90a9d5087aae" compoundref="hd_8h" startline="174">driveInfo::hdMask</references>
        <references refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" compoundref="hd_8h" startline="175">driveInfo::hdMulti</references>
        <references refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" compoundref="hd_8h" startline="176">driveInfo::hdPort</references>
        <references refid="hd_8h_1a8206a5d5a25f1d6fc9e02013572c52db" compoundref="hd_8h" startline="37">hdSecCount</references>
        <references refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" compoundref="hd_8h" startline="173">driveInfo::hdShift</references>
        <references refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" compoundref="hd_8h" startline="177">driveInfo::hdSize</references>
        <references refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" compoundref="include_2sys_2device_8h" startline="51">device_interface::info</references>
        <references refid="structdevice__interface_1a561678212ee39a09ce43c1a3567c64e2" compoundref="include_2sys_2device_8h" startline="48">device_interface::initialized</references>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="io_8h_1afb703b187feb4b92444454df6c3dd9e6" compoundref="io_8c" startline="55" endline="63">inportWord</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" compoundref="hd_8h" startline="167">driveInfo::lba_high</references>
        <references refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" compoundref="hd_8h" startline="168">driveInfo::lba_low</references>
        <references refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" compoundref="hd_8h" startline="361">ata_identify_data::max_48bit_lba</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="structata__identify__data_1ace8f3708a348109394cdebd41180f7a0" compoundref="hd_8h" startline="364">ata_identify_data::physical_logical_sector_info</references>
        <references refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" compoundref="hd_8h" startline="169">driveInfo::sector_size</references>
        <references refid="structdevice__interface_1a82fda947114f5c8d53fb7acbd7eb0e21" compoundref="include_2sys_2device_8h" startline="49">device_interface::size</references>
        <references refid="structata__identify__data_1a3266c97773cfa9f7d047f84c4fb13a33" compoundref="hd_8h" startline="326">ata_identify_data::total_num_sectors</references>
        <references refid="structata__identify__data_1ae17c108776507b4a3f9d50dcb0d8fa50" compoundref="hd_8h" startline="369">ata_identify_data::words_per_logical_sector</references>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1ace9b924d48cc450c255d1d48fcbc13a5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdIoctl</definition>
        <argsstring>()</argsstring>
        <name>hdIoctl</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="211" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="211" bodyend="214"/>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdRead</definition>
        <argsstring>(struct driveInfo *hdd, void *baseAddr, uInt32 startSector, uInt32 sectorCount)</argsstring>
        <name>hdRead</name>
        <param>
          <type>struct <ref refid="structdriveInfo" kindref="compound">driveInfo</ref> *</type>
          <declname>hdd</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>baseAddr</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>startSector</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>sectorCount</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="423" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="423" bodyend="488"/>
        <references refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" compoundref="hd_8h" startline="178">driveInfo::hdCalc</references>
        <references refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" compoundref="hd_8h" startline="43">hdCmd</references>
        <references refid="hd_8h_1a2a82bac9f72d97307f87e60acb709ebb" compoundref="hd_8h" startline="40">hdCylHi</references>
        <references refid="hd_8h_1a30a2e624c7eda626a913f0b5b9ed26b7" compoundref="hd_8h" startline="39">hdCylLow</references>
        <references refid="hd_8h_1a1571e7119dfede60820469184878948a" compoundref="hd_8h" startline="35">hdData</references>
        <references refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" compoundref="hd_8h" startline="171">driveInfo::hdDev</references>
        <references refid="structdriveInfo_1af385dccea1485233fc52351a8d7666aa" compoundref="hd_8h" startline="170">driveInfo::hdEnable</references>
        <references refid="hd_8h_1acefc72ce44e542db4580ce7e7c732aab" compoundref="hd_8h" startline="41">hdHead</references>
        <references refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" compoundref="hd_8h" startline="175">driveInfo::hdMulti</references>
        <references refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" compoundref="hd_8h" startline="176">driveInfo::hdPort</references>
        <references refid="hd_8h_1a8206a5d5a25f1d6fc9e02013572c52db" compoundref="hd_8h" startline="37">hdSecCount</references>
        <references refid="hd_8h_1a0fa794dfb3e811122d5eafbe348c368f" compoundref="hd_8h" startline="38">hdSecNum</references>
        <references refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" compoundref="hd_8h" startline="173">driveInfo::hdShift</references>
        <references refid="hd_8h_1a73f0c3f82605d0aa108e8186e4daae6b" compoundref="hd_8h" startline="42">hdStat</references>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="io_8h_1afb703b187feb4b92444454df6c3dd9e6" compoundref="io_8c" startline="55" endline="63">inportWord</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" compoundref="hd_8h" startline="181">driveInfo::lba_start</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" compoundref="hd_8h" startline="179">driveInfo::parOffset</references>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1a8e64e509439c31ba2acfe68a7aefcc10" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdReset</definition>
        <argsstring>()</argsstring>
        <name>hdReset</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="216" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="216" bodyend="219"/>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1a525245216f426465a3c0f130bd0efd19" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdStandby</definition>
        <argsstring>()</argsstring>
        <name>hdStandby</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="196" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="196" bodyend="199"/>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1a9535712ecc532571658cc6861570dde5" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdStart</definition>
        <argsstring>()</argsstring>
        <name>hdStart</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="201" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="201" bodyend="204"/>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1a7a00465121a584acd10c1ca1b46680a1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdStop</definition>
        <argsstring>()</argsstring>
        <name>hdStop</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="206" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="206" bodyend="209"/>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1a57d5cca1b1006db82038567edf6e6ac1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int hdWrite</definition>
        <argsstring>(struct driveInfo *hdd, void *baseAddr, uInt32 startSector, uInt32 sectorCount)</argsstring>
        <name>hdWrite</name>
        <param>
          <type>struct <ref refid="structdriveInfo" kindref="compound">driveInfo</ref> *</type>
          <declname>hdd</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>baseAddr</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>startSector</declname>
        </param>
        <param>
          <type><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref></type>
          <declname>sectorCount</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="356" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="356" bodyend="421"/>
        <references refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" compoundref="hd_8h" startline="178">driveInfo::hdCalc</references>
        <references refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" compoundref="hd_8h" startline="43">hdCmd</references>
        <references refid="hd_8h_1a2a82bac9f72d97307f87e60acb709ebb" compoundref="hd_8h" startline="40">hdCylHi</references>
        <references refid="hd_8h_1a30a2e624c7eda626a913f0b5b9ed26b7" compoundref="hd_8h" startline="39">hdCylLow</references>
        <references refid="hd_8h_1a1571e7119dfede60820469184878948a" compoundref="hd_8h" startline="35">hdData</references>
        <references refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" compoundref="hd_8h" startline="171">driveInfo::hdDev</references>
        <references refid="structdriveInfo_1af385dccea1485233fc52351a8d7666aa" compoundref="hd_8h" startline="170">driveInfo::hdEnable</references>
        <references refid="hd_8h_1acefc72ce44e542db4580ce7e7c732aab" compoundref="hd_8h" startline="41">hdHead</references>
        <references refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" compoundref="hd_8h" startline="175">driveInfo::hdMulti</references>
        <references refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" compoundref="hd_8h" startline="176">driveInfo::hdPort</references>
        <references refid="hd_8h_1a8206a5d5a25f1d6fc9e02013572c52db" compoundref="hd_8h" startline="37">hdSecCount</references>
        <references refid="hd_8h_1a0fa794dfb3e811122d5eafbe348c368f" compoundref="hd_8h" startline="38">hdSecNum</references>
        <references refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" compoundref="hd_8h" startline="173">driveInfo::hdShift</references>
        <references refid="hd_8h_1a73f0c3f82605d0aa108e8186e4daae6b" compoundref="hd_8h" startline="42">hdStat</references>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" compoundref="hd_8h" startline="181">driveInfo::lba_start</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="io_8h_1a243f6b6d22cc5948908b764d58efc2b0" compoundref="io_8c" startline="103" endline="109">outportWord</references>
        <references refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" compoundref="hd_8h" startline="179">driveInfo::parOffset</references>
      </memberdef>
      <memberdef kind="function" id="hd_8c_1aa6ffe735243161c69ce0930999e02f88" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int initHardDisk</definition>
        <argsstring>()</argsstring>
        <name>initHardDisk</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/pci/hd.c" line="42" column="5" bodyfile="C:/Dev/git/UbixOS/sys/pci/hd.c" bodystart="42" bodyend="45"/>
        <references refid="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" compoundref="hd_8c" startline="47" endline="194">_initHardDisk</references>
      </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="hd_8h" kindref="compound">pci/hd.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="include_2sys_2device_8h" kindref="compound">sys/device.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kmalloc_8h" kindref="compound">lib/kmalloc.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><highlight class="preprocessor">#include<sp/>&lt;<ref refid="devfs_8h" kindref="compound">devfs/devfs.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="gpt_8h" kindref="compound">fs/common/gpt.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="structuuid" kindref="compound">uuid_t</ref><sp/>freebsd_ufs_uuid<sp/>=<sp/><ref refid="gpt_8h_1ae2f7ecd5eab0dec1e2c4036b4106c636" kindref="member">GPT_ENT_TYPE_FREEBSD_UFS</ref>;</highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/>hdC<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42" refid="hd_8c_1aa6ffe735243161c69ce0930999e02f88" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1aa6ffe735243161c69ce0930999e02f88" kindref="member">initHardDisk</ref>()<sp/>{</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><ref refid="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" kindref="member">_initHardDisk</ref>(0xE0);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><ref refid="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" kindref="member">_initHardDisk</ref>(0xF0);</highlight></codeline>
<codeline lineno="45"><highlight class="normal">}</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47" refid="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1afe85956506fe7d2c9df06fc1628a7bd1" kindref="member">_initHardDisk</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>hdD)<sp/>{</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>x<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minor<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdevice__interface" kindref="compound">device_interface</ref><sp/>*devInfo<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdevice__interface" kindref="compound">device_interface</ref><sp/>*devInfo2<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdos__partition" kindref="compound">dos_partition</ref><sp/>*d<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><sp/>*hdd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><sp/>*hdd2<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*data2<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>[16];</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structbsd__disklabel" kindref="compound">bsd_disklabel</ref><sp/>*bsdd<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//GPT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*secbuf<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/>hdd<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><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="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structata__identify__data" kindref="compound">ata_identify_data</ref><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="structata__identify__data" kindref="compound">ata_identify_data</ref>));</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>=<sp/>0x1F0;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" kindref="member">hdDev</ref><sp/>=<sp/>hdD;<sp/></highlight><highlight class="comment">//0x40;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" kindref="member">parOffset</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a3794d7beb8cc95275cd553103c457934" kindref="member">part</ref><sp/>=<sp/>0x2;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Alloc<sp/>memory<sp/>for<sp/>device<sp/>structure<sp/>and<sp/>set<sp/>it<sp/>up<sp/>correctly<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/>devInfo<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdevice__interface" kindref="compound">device_interface</ref><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="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a876d3736a8df585bb06a82308724db6f" kindref="member">read</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" kindref="member">hdRead</ref>;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a9d8ffee6ef57616ca48d1f7cfc54e461" kindref="member">write</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1a57d5cca1b1006db82038567edf6e6ac1" kindref="member">hdWrite</ref>;</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a816fbc5cd527e42d0a64a6d690062ed0" kindref="member">reset</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1a8e64e509439c31ba2acfe68a7aefcc10" kindref="member">hdReset</ref>;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a5a20c2397cc4ac3fbb9afe36bea1cfd1" kindref="member">init</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1ab01b187dc277e089d0161315437fde41" kindref="member">hdInit</ref>;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a20117a04f4d19638965b58311c182478" kindref="member">ioctl</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1ace9b924d48cc450c255d1d48fcbc13a5" kindref="member">hdIoctl</ref>;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1aafc502a40e5990260add50117bc1c4a8" kindref="member">stop</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1a7a00465121a584acd10c1ca1b46680a1" kindref="member">hdStop</ref>;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a37e5dbe7244b6b28e8a322912c7de645" kindref="member">start</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1a9535712ecc532571658cc6861570dde5" kindref="member">hdStart</ref>;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a36ebd62f860911b44a544c4d36d848d2" kindref="member">standby</ref><sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<sp/>&amp;<ref refid="hd_8c_1a525245216f426465a3c0f130bd0efd19" kindref="member">hdStandby</ref>;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref><sp/>=<sp/>hdd;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>devInfo-&gt;<ref refid="structdevice__interface_1a7eb42b0bb3e06dbc9183531a5e59ddb8" kindref="member">major</ref><sp/>=<sp/>hdC<sp/>+<sp/>0x1;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>data<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(512);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>d<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdos__partition" kindref="compound">dos_partition</ref><sp/>*)<sp/>(data<sp/>+<sp/>0x1BE);</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>data2<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(512);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/>bsdd<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structbsd__disklabel" kindref="compound">bsd_disklabel</ref><sp/>*)<sp/>data2;</highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="include_2sys_2device_8h_1a256b750ab99e3be9b83a9bfd37a22388" kindref="member">device_add</ref>(0,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>devInfo)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;ad%i<sp/>-<sp/>Start:<sp/>[0x0],<sp/>Size:<sp/>[0x%x/0x%X]\n&quot;</highlight><highlight class="normal">,<sp/>hdC,<sp/>hdd-&gt;<ref refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" kindref="member">hdSize</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" kindref="member">hdSize</ref><sp/>*<sp/>512);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">&quot;ad%ip%i&quot;</highlight><highlight class="normal">,<sp/>hdC,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a3794d7beb8cc95275cd553103c457934" kindref="member">part</ref>);</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="devfs_8c_1ad568bae84bef3691539f1b1d0f6a54b4" kindref="member">devfs_makeNode</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="charliteral">&apos;b&apos;</highlight><highlight class="normal">,<sp/>0x1,<sp/>0x0);</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" kindref="member">hdRead</ref>(devInfo-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,<sp/>data,<sp/>0x0,<sp/>0x1);</highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(d[0].dp_type<sp/>==<sp/>0xEE)<sp/>{</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>MrOlsen<sp/>(2016-01-14)<sp/>DEBUG:<sp/>This<sp/>was<sp/>just<sp/>to<sp/>help<sp/>debug</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(<sp/>&quot;%s<sp/>-<sp/>Type:<sp/>[0x%X<sp/>-<sp/>%s],<sp/>Start:<sp/>[0x%X],<sp/>Size:<sp/>[0x%X]\n&quot;,<sp/>name,<sp/>d[0].dp_type,<sp/>(d[0].dp_type<sp/>&gt;=<sp/>0<sp/>&amp;&amp;<sp/>d[0].dp_type<sp/>&lt;=<sp/>255)<sp/>?<sp/>part_types[d[0].dp_type]<sp/>:<sp/>&quot;Unknown&quot;,<sp/>d[0].dp_start,<sp/>d[0].dp_size<sp/>);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>secbuf<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/><ref refid="kmalloc_8h_1a150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(65536);</highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="gpt_8c_1a70a0e368efe25cb0dacb3fb445466da2" kindref="member">gptread</ref>(&amp;freebsd_ufs_uuid,<sp/>devInfo,<sp/>secbuf)<sp/>==<sp/>-1)<sp/>{</highlight></codeline>
<codeline lineno="104"><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;%s:<sp/>unable<sp/>to<sp/>load<sp/>GPT\n&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;KERNEL&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//return<sp/>(-1);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>devInfo2<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdevice__interface" kindref="compound">device_interface</ref><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="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdd2<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><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="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(devInfo2,<sp/>devInfo,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(hdd2,<sp/>hdd,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//hdd2-&gt;parOffset<sp/>=<sp/>d[i].dp_start;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>devInfo2-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref><sp/>=<sp/>hdd2;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>minor++;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="gpt_8c_1a08130ab1aa44989d74341a21057b62c9" kindref="member">gptfind</ref>(&amp;freebsd_ufs_uuid,<sp/>devInfo2,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a3794d7beb8cc95275cd553103c457934" kindref="member">part</ref>)<sp/>==<sp/>-1)<sp/>{</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//MrOlsen<sp/>(2016-01-11)<sp/>FIX:<sp/>I<sp/>am<sp/>using<sp/>&quot;1&quot;<sp/>as<sp/>partition<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;%s:<sp/>no<sp/>UFS<sp/>partition<sp/>was<sp/>found\n&quot;</highlight><highlight class="normal">,<sp/></highlight><highlight class="stringliteral">&quot;KERNEL&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//return<sp/>(-1);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight><highlight class="comment">//MrOlsen<sp/>(2016-01-14)<sp/>DEBUG:<sp/>This<sp/>was<sp/>just<sp/>debugging<sp/>code</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"></highlight><highlight class="comment">//kprintf(&quot;[%i<sp/>-<sp/>%i]\n&quot;,<sp/>hdd-&gt;parOffset,<sp/>hdd2-&gt;parOffset);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="include_2sys_2device_8h_1a256b750ab99e3be9b83a9bfd37a22388" kindref="member">device_add</ref>(minor,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>devInfo2)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">&quot;ad%ip%i&quot;</highlight><highlight class="normal">,<sp/>hdC,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a3794d7beb8cc95275cd553103c457934" kindref="member">part</ref>);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;%s<sp/>-<sp/>Type:<sp/>[0x%X<sp/>-<sp/>%s],<sp/>Start:<sp/>[%i],<sp/>Offset:<sp/>[%i],<sp/>Size:<sp/>[%i],<sp/>MM:<sp/>[%i:%i]\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>d[0].dp_type,<sp/>(d[0].dp_type<sp/>&gt;=<sp/>0<sp/>&amp;&amp;<sp/>d[0].dp_type<sp/>&lt;=<sp/>255)<sp/>?<sp/>part_types[d[0].dp_type]<sp/>:<sp/></highlight><highlight class="stringliteral">&quot;Unknown&quot;</highlight><highlight class="normal">,<sp/>hdd2-&gt;<ref refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" kindref="member">lba_start</ref>,<sp/>hdd2-&gt;<ref refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" kindref="member">parOffset</ref>,<sp/>hdd2-&gt;<ref refid="structdriveInfo_1a1d9e4b310044ea1eb5250017e8ba5185" kindref="member">lba_end</ref><sp/>-<sp/>hdd2-&gt;<ref refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" kindref="member">lba_start</ref>,<sp/>devInfo-&gt;<ref refid="structdevice__interface_1a7eb42b0bb3e06dbc9183531a5e59ddb8" kindref="member">major</ref>,<sp/>minor);</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="devfs_8c_1ad568bae84bef3691539f1b1d0f6a54b4" kindref="member">devfs_makeNode</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>0x1,<sp/>minor);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="134"><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><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/>0x4;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//MrOlsen<sp/>(2016-01-14)<sp/>DEBUG:<sp/>This<sp/>was<sp/>just<sp/>debugging<sp/>code</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf(<sp/>&quot;Type:<sp/>0x%X\n&quot;,<sp/>d[i].dp_type<sp/>);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"></highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(d[i].dp_type<sp/>==<sp/>0xEE)</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Motherfucker<sp/>Jones!<sp/>We&apos;re<sp/>GPT....<sp/>Lick<sp/>My<sp/>Nuts<sp/>Now<sp/>Bitch!\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(d[i].dp_type<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>devInfo2<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdevice__interface" kindref="compound">device_interface</ref><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="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdd2<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><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="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(devInfo2,<sp/>devInfo,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(hdd2,<sp/>hdd,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdd2-&gt;<ref refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" kindref="member">parOffset</ref><sp/>=<sp/>d[i].<ref refid="structdos__partition_1ab316e0e02d24902172d5edde412f3238" kindref="member">dp_start</ref>;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>devInfo2-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref><sp/>=<sp/>hdd2;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>minor++;</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="include_2sys_2device_8h_1a256b750ab99e3be9b83a9bfd37a22388" kindref="member">device_add</ref>(minor,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>devInfo2)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">&quot;ad%is%i&quot;</highlight><highlight class="normal">,<sp/>hdC,<sp/>i<sp/>+<sp/>1);</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><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;%s<sp/>-<sp/>Type:<sp/>[0x%X<sp/>-<sp/>%s],<sp/>Start:<sp/>[0x%X],<sp/>Size:<sp/>[0x%X],<sp/>MM:<sp/>[%i:%i]\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>d[i].dp_type,<sp/>(d[i].dp_type<sp/>&gt;=<sp/>0<sp/>&amp;&amp;<sp/>d[i].dp_type<sp/>&lt;=<sp/>255)<sp/>?<sp/>part_types[d[i].dp_type]<sp/>:<sp/></highlight><highlight class="stringliteral">&quot;Unknown&quot;</highlight><highlight class="normal">,<sp/>d[i].dp_start,<sp/>d[i].dp_size,<sp/>devInfo-&gt;<ref refid="structdevice__interface_1a7eb42b0bb3e06dbc9183531a5e59ddb8" kindref="member">major</ref>,<sp/>minor);</highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="devfs_8c_1ad568bae84bef3691539f1b1d0f6a54b4" kindref="member">devfs_makeNode</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>0x1,<sp/>minor);</highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><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/>(d[i].dp_type<sp/>==<sp/>0xA5)<sp/>{</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Why<sp/>do<sp/>i<sp/>need<sp/>to<sp/>add<sp/>1?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" kindref="member">hdRead</ref>(devInfo-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>,<sp/>data2,<sp/>d[i].<ref refid="structdos__partition_1ab316e0e02d24902172d5edde412f3238" kindref="member">dp_start</ref><sp/>+<sp/>1,<sp/>0x1);</highlight></codeline>
<codeline lineno="161"><highlight class="normal"></highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(x<sp/>=<sp/>0;<sp/>x<sp/>&lt;<sp/>bsdd-&gt;<ref refid="structbsd__disklabel_1a6a478db13de03d2384bbb5307be1e84c" kindref="member">d_npartitions</ref>;<sp/>x++)<sp/>{</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(bsdd-&gt;<ref refid="structbsd__disklabel_1a60c26768f84bf0061c2436f29a2fdff0" kindref="member">d_partitions</ref>[x].<ref refid="structbsd__disklabel_1_1partition_1ab41df34969d422568cb0cc184db3268a" kindref="member">p_size</ref><sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1ac38cd16373d98782e1465bd3d5aba470" kindref="member">sprintf</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="stringliteral">&quot;ad%is%i%c&quot;</highlight><highlight class="normal">,<sp/>hdC,<sp/>i<sp/>+<sp/>1,<sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal"><sp/>+<sp/>x);</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//New<sp/>Nodes</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>devInfo2<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdevice__interface" kindref="compound">device_interface</ref><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="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdd2<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><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="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(devInfo2,<sp/>devInfo,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdevice__interface" kindref="compound">device_interface</ref>));</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="string_8h_1ae33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(hdd2,<sp/>hdd,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdriveInfo" kindref="compound">driveInfo</ref>));</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//hdd2-&gt;parOffset<sp/>=<sp/>d[i].dp_start<sp/>+<sp/>bsdd-&gt;d_partitions[x].p_offset;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdd2-&gt;<ref refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" kindref="member">lba_start</ref><sp/>=<sp/>d[i].<ref refid="structdos__partition_1ab316e0e02d24902172d5edde412f3238" kindref="member">dp_start</ref>;</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hdd2-&gt;<ref refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" kindref="member">parOffset</ref><sp/>=<sp/>bsdd-&gt;<ref refid="structbsd__disklabel_1a60c26768f84bf0061c2436f29a2fdff0" kindref="member">d_partitions</ref>[x].<ref refid="structbsd__disklabel_1_1partition_1a3af3d4070dabab2ce5df6f1bfbd5616a" kindref="member">p_offset</ref>;</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>devInfo2-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref><sp/>=<sp/>hdd2;</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>minor++;</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="include_2sys_2device_8h_1a256b750ab99e3be9b83a9bfd37a22388" kindref="member">device_add</ref>(minor,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>devInfo2);</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="devfs_8c_1ad568bae84bef3691539f1b1d0f6a54b4" kindref="member">devfs_makeNode</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/></highlight><highlight class="charliteral">&apos;c&apos;</highlight><highlight class="normal">,<sp/>0x1,<sp/>minor);</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><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;%s<sp/>-<sp/>Type:<sp/>[%s],<sp/>Start:<sp/>[0x%X],<sp/>Size:<sp/>[0x%X],<sp/>MM:<sp/>[%i:%i]\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>,<sp/>fstypenames[bsdd-&gt;<ref refid="structbsd__disklabel_1a60c26768f84bf0061c2436f29a2fdff0" kindref="member">d_partitions</ref>[x].<ref refid="structbsd__disklabel_1_1partition_1a234eea6a587c4d889251c2f07d982cef" kindref="member">p_fstype</ref>],<sp/>bsdd-&gt;<ref refid="structbsd__disklabel_1a60c26768f84bf0061c2436f29a2fdff0" kindref="member">d_partitions</ref>[x].<ref refid="structbsd__disklabel_1_1partition_1a3af3d4070dabab2ce5df6f1bfbd5616a" kindref="member">p_offset</ref>,<sp/>bsdd-&gt;<ref refid="structbsd__disklabel_1a60c26768f84bf0061c2436f29a2fdff0" kindref="member">d_partitions</ref>[x].<ref refid="structbsd__disklabel_1_1partition_1ab41df34969d422568cb0cc184db3268a" kindref="member">p_size</ref>,<sp/>devInfo-&gt;<ref refid="structdevice__interface_1a7eb42b0bb3e06dbc9183531a5e59ddb8" kindref="member">major</ref>,<sp/>minor);</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="183"><highlight class="normal"></highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><ref refid="kmalloc_8h_1aaa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(data);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/>hdC++;</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="194"><highlight class="normal">}</highlight></codeline>
<codeline lineno="195"><highlight class="normal"></highlight></codeline>
<codeline lineno="196" refid="hd_8c_1a525245216f426465a3c0f130bd0efd19" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1a525245216f426465a3c0f130bd0efd19" kindref="member">hdStandby</ref>()<sp/>{</highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Not<sp/>Implemented<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="199"><highlight class="normal">}</highlight></codeline>
<codeline lineno="200"><highlight class="normal"></highlight></codeline>
<codeline lineno="201" refid="hd_8c_1a9535712ecc532571658cc6861570dde5" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1a9535712ecc532571658cc6861570dde5" kindref="member">hdStart</ref>()<sp/>{</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Not<sp/>Implemented<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="204"><highlight class="normal">}</highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
<codeline lineno="206" refid="hd_8c_1a7a00465121a584acd10c1ca1b46680a1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1a7a00465121a584acd10c1ca1b46680a1" kindref="member">hdStop</ref>()<sp/>{</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Not<sp/>Implemented<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="209"><highlight class="normal">}</highlight></codeline>
<codeline lineno="210"><highlight class="normal"></highlight></codeline>
<codeline lineno="211" refid="hd_8c_1ace9b924d48cc450c255d1d48fcbc13a5" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1ace9b924d48cc450c255d1d48fcbc13a5" kindref="member">hdIoctl</ref>()<sp/>{</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Not<sp/>Implemented<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="214"><highlight class="normal">}</highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight></codeline>
<codeline lineno="216" refid="hd_8c_1a8e64e509439c31ba2acfe68a7aefcc10" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1a8e64e509439c31ba2acfe68a7aefcc10" kindref="member">hdReset</ref>()<sp/>{</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Not<sp/>Implemented<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="219"><highlight class="normal">}</highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight></codeline>
<codeline lineno="221" refid="hd_8c_1ab01b187dc277e089d0161315437fde41" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1ab01b187dc277e089d0161315437fde41" kindref="member">hdInit</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdevice__node" kindref="compound">device_node</ref><sp/>*dev)<sp/>{</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1ac7c42f52639b9aca7da966a0783996d7" kindref="member">u_int8_t</ref><sp/>retVal<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>counter<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1af7b042408b9b104606f8a9b5035329f3" kindref="member">u_int16_t</ref><sp/>*tmp<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><sp/>*hdd<sp/>=<sp/>dev-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1aeacb2f431b14ddd1e9fe34db278dfc9e" kindref="member">info</ref>;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>1000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7762d2c130e593e92b3c3b521e5779f2" kindref="member">ATA_COMMAND</ref>)<sp/>&amp;<sp/><ref refid="hd_8h_1a676551b0bd38a1bebd58041025e4b5ad" kindref="member">ATA_S_BUSY</ref>;</highlight></codeline>
<codeline lineno="229"><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!retVal)</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ready;</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></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"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error<sp/>Initializing<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="237"><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>ready:</highlight></codeline>
<codeline lineno="239"><highlight class="normal"></highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1aa9ede1f736f86805a4aa00df9543b32f" kindref="member">ATA_DRIVE</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" kindref="member">hdDev</ref>);</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7762d2c130e593e92b3c3b521e5779f2" kindref="member">ATA_COMMAND</ref>,<sp/><ref refid="hd_8h_1a9d19baff12415486088caa92201e9424" kindref="member">ATA_IDENTIFY</ref>);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"></highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//for<sp/>(counter<sp/>=<sp/>1000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>10000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7762d2c130e593e92b3c3b521e5779f2" kindref="member">ATA_COMMAND</ref>);</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((retVal<sp/>&amp;<sp/>1)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error<sp/>Drive<sp/>Not<sp/>Available\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((retVal<sp/>&amp;<sp/>8)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>go;</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="254"><highlight class="normal"></highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Time<sp/>Out<sp/>Waiting<sp/>On<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="257"><highlight class="normal"></highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/>go:</highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/>tmp<sp/>=<sp/>(<ref refid="include_2sys_2types_8h_1af7b042408b9b104606f8a9b5035329f3" kindref="member">u_int16_t</ref><sp/>*)<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>;</highlight></codeline>
<codeline lineno="261"><highlight class="normal"></highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/>for<sp/>(counter<sp/>=<sp/>0;<sp/>counter<sp/>&lt;<sp/>256;<sp/>counter++)<sp/>{</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp[counter]<sp/>=<sp/><ref refid="io_8h_1afb703b187feb4b92444454df6c3dd9e6" kindref="member">inportWord</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a10441946900b59df8e0c67d69a1379f0" kindref="member">ATA_DATA</ref>);</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/>retVal<sp/>=<sp/>tmp[0x2F]<sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="267"><highlight class="normal"></highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(retVal)<sp/>{</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>0:</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>2:</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>4:</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>2;</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><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/>8:</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>3;</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>16:</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>4;</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>32:</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>5;</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>64:</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>6;</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>128:</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>=<sp/>7;</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error<sp/>BLOCK<sp/>Mode<sp/>Unavailable:<sp/>[%x]\n&quot;</highlight><highlight class="normal">,<sp/>retVal);</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="305"><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4545653f06a4195a75edcd29001cb701" kindref="member">command_set_enabled1</ref><sp/>&amp;<sp/><ref refid="hd_8h_1a15501f1f9c1ad7d74f7d18dadc6376de" kindref="member">ATA_IDENTIFY_COMMAND_SET_SUPPORTED1_48BIT_ENABLE</ref>)<sp/>{</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[7]<sp/>&lt;&lt;<sp/>24;</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[6]<sp/>&lt;&lt;<sp/>16;</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[5]<sp/>&lt;&lt;<sp/>8;</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[4];</highlight></codeline>
<codeline lineno="311"><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[3]<sp/>&lt;&lt;<sp/>24;</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[2]<sp/>&lt;&lt;<sp/>16;</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[1]<sp/>&lt;&lt;<sp/>8;</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4edac4a696a504c5625395bb6c9833b9" kindref="member">max_48bit_lba</ref>[0];</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a3266c97773cfa9f7d047f84c4fb13a33" kindref="member">total_num_sectors</ref>[3]<sp/>&lt;&lt;<sp/>24;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a3266c97773cfa9f7d047f84c4fb13a33" kindref="member">total_num_sectors</ref>[2]<sp/>&lt;&lt;<sp/>16;</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a3266c97773cfa9f7d047f84c4fb13a33" kindref="member">total_num_sectors</ref>[1]<sp/>&lt;&lt;<sp/>8;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a3266c97773cfa9f7d047f84c4fb13a33" kindref="member">total_num_sectors</ref>[0];</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="324"><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>If<sp/>the<sp/>ATA<sp/>device<sp/>reports<sp/>its<sp/>sector<sp/>size<sp/>(bit<sp/>12<sp/>of<sp/>Word<sp/>106),<sp/>then<sp/>use<sp/>that<sp/>instead.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1ace8f3708a348109394cdebd41180f7a0" kindref="member">physical_logical_sector_info</ref><sp/>&amp;<sp/><ref refid="hd_8h_1ab3870ab2b5eed5bca15ced1c0e7b8f5c" kindref="member">ATA_IDENTIFY_SECTOR_LARGER_THEN_512_ENABLE</ref>)<sp/>{</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" kindref="member">sector_size</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1ae17c108776507b4a3f9d50dcb0d8fa50" kindref="member">words_per_logical_sector</ref>[3]<sp/>&lt;&lt;<sp/>24;</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" kindref="member">sector_size</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1ae17c108776507b4a3f9d50dcb0d8fa50" kindref="member">words_per_logical_sector</ref>[2]<sp/>&lt;&lt;<sp/>16;</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" kindref="member">sector_size</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1ae17c108776507b4a3f9d50dcb0d8fa50" kindref="member">words_per_logical_sector</ref>[1]<sp/>&lt;&lt;<sp/>8;</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" kindref="member">sector_size</ref><sp/>|=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1ae17c108776507b4a3f9d50dcb0d8fa50" kindref="member">words_per_logical_sector</ref>[0];</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Default<sp/>the<sp/>sector<sp/>size<sp/>to<sp/>512<sp/>bytes</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" kindref="member">sector_size</ref><sp/>=<sp/>512;</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="336"><highlight class="normal"></highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;LBA<sp/>[0x%X<sp/>-<sp/>0x%X],<sp/>LBA_HIGH:<sp/>%i,<sp/>LBA_LOW:<sp/>%i,<sp/>SECTOR_SIZE:<sp/>%i\n&quot;</highlight><highlight class="normal">,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4545653f06a4195a75edcd29001cb701" kindref="member">command_set_enabled1</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2afcf287e4aec52620401806682233a9" kindref="member">ata_identify</ref>-&gt;<ref refid="structata__identify__data_1a4545653f06a4195a75edcd29001cb701" kindref="member">command_set_enabled1</ref><sp/>&amp;<sp/><ref refid="hd_8h_1a15501f1f9c1ad7d74f7d18dadc6376de" kindref="member">ATA_IDENTIFY_COMMAND_SET_SUPPORTED1_48BIT_ENABLE</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a8c8ee3abadd6bfef07f9b1b055818100" kindref="member">sector_size</ref>);</highlight></codeline>
<codeline lineno="338"><highlight class="normal"></highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a8206a5d5a25f1d6fc9e02013572c52db" kindref="member">hdSecCount</ref>,<sp/>retVal);</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1acefc72ce44e542db4580ce7e7c732aab" kindref="member">hdHead</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" kindref="member">hdDev</ref>);</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" kindref="member">hdCmd</ref>,<sp/>0xC6);</highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1aa446858a696dafa8454b90a9d5087aae" kindref="member">hdMask</ref><sp/>=<sp/>retVal;</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//hdd-&gt;hdSize<sp/>=<sp/>(hdd-&gt;hdSector[0x7B]<sp/>*<sp/>256<sp/>*<sp/>256<sp/>*<sp/>256)<sp/>+<sp/>(hdd-&gt;hdSector[0x7A]<sp/>*<sp/>256<sp/>*<sp/>256)<sp/>+<sp/>(hdd-&gt;hdSector[0x79]<sp/>*<sp/>256)<sp/>+<sp/>hdd-&gt;hdSector[0x78];</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="345"><highlight class="normal"></highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>MrOlsen<sp/>(2016-01-11)<sp/>NOTE:<sp/>Must<sp/>phase<sp/>out<sp/>hdSize</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" kindref="member">hdSize</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1aa722897bbc328c24ea2ec4bcae2ed342" kindref="member">lba_low</ref><sp/>+<sp/>hdd-&gt;<ref refid="structdriveInfo_1af93a2156cff0616730ea3b0a9c9fb3bc" kindref="member">lba_high</ref>;</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1af385dccea1485233fc52351a8d7666aa" kindref="member">hdEnable</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Drive:<sp/>[0x%X/0x%X],<sp/>Size:<sp/>[%i<sp/>Sectors/%i<sp/>MB]\n&quot;</highlight><highlight class="normal">,<sp/>hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" kindref="member">hdDev</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" kindref="member">hdSize</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" kindref="member">hdSize</ref><sp/>/<sp/>2048);</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/>dev-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a82fda947114f5c8d53fb7acbd7eb0e21" kindref="member">size</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1ada0977b5e57df10de593d1df22712af8" kindref="member">hdSize</ref><sp/>*<sp/>512;</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/>dev-&gt;<ref refid="structdevice__node_1a588d09d5dabf1c8866d359aaac799b1c" kindref="member">devInfo</ref>-&gt;<ref refid="structdevice__interface_1a561678212ee39a09ce43c1a3567c64e2" kindref="member">initialized</ref><sp/>=<sp/>0x1;</highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="354"><highlight class="normal">}</highlight></codeline>
<codeline lineno="355"><highlight class="normal"></highlight></codeline>
<codeline lineno="356" refid="hd_8c_1a57d5cca1b1006db82038567edf6e6ac1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1a57d5cca1b1006db82038567edf6e6ac1" kindref="member">hdWrite</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><sp/>*hdd,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*baseAddr,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>startSector,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>sectorCount)<sp/>{</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>counter<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>retVal<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>transactionCount<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>*tmp<sp/>=<sp/>(</highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>*)<sp/>baseAddr;</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" kindref="member">lba_start</ref><sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/>startSector<sp/>+=<sp/>hdd-&gt;<ref refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" kindref="member">parOffset</ref>;</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/>startSector<sp/>+=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" kindref="member">lba_start</ref>;</highlight></codeline>
<codeline lineno="365"><highlight class="normal"></highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1af385dccea1485233fc52351a8d7666aa" kindref="member">hdEnable</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Invalid<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((sectorCount<sp/>&gt;&gt;<sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref>)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref><sp/>=<sp/>sectorCount;<sp/></highlight><highlight class="comment">/*<sp/>hdd-&gt;hdMask;<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/>transactionCount<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref>;</highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/>transactionCount<sp/>=<sp/>sectorCount<sp/>&gt;&gt;<sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref>;</highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(;<sp/>transactionCount<sp/>&gt;<sp/>0;<sp/>transactionCount--)<sp/>{</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//for<sp/>(counter<sp/>=<sp/>1000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>10000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a73f0c3f82605d0aa108e8186e4daae6b" kindref="member">hdStat</ref>)<sp/>&amp;<sp/>0x80;</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!retVal)</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ready;</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Time<sp/>Out<sp/>Waiting<sp/>On<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/>ready:<sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a8206a5d5a25f1d6fc9e02013572c52db" kindref="member">hdSecCount</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref>);</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a0fa794dfb3e811122d5eafbe348c368f" kindref="member">hdSecNum</ref>,<sp/>(startSector<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/>startSector<sp/>&gt;&gt;<sp/>8;</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a30a2e624c7eda626a913f0b5b9ed26b7" kindref="member">hdCylLow</ref>,<sp/>(retVal<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>&gt;&gt;=<sp/>8;</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a2a82bac9f72d97307f87e60acb709ebb" kindref="member">hdCylHi</ref>,<sp/>(retVal<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>&gt;&gt;=<sp/>8;</highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>&amp;=<sp/>0x0F;</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>|=<sp/>(hdd-&gt;<ref refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" kindref="member">hdDev</ref><sp/>|<sp/>0xA0);<sp/></highlight><highlight class="comment">//Test<sp/>As<sp/>Per<sp/>TJ</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="396"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1acefc72ce44e542db4580ce7e7c732aab" kindref="member">hdHead</ref>,<sp/>(retVal<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" kindref="member">hdCmd</ref>,<sp/>0xC5);</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" kindref="member">hdCmd</ref>,<sp/>0x30);</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//for<sp/>(counter<sp/>=<sp/>1000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>10000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a73f0c3f82605d0aa108e8186e4daae6b" kindref="member">hdStat</ref>);</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((retVal<sp/>&amp;<sp/>1)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="405"><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;HD<sp/>Write<sp/>Error\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((retVal<sp/>&amp;<sp/>8)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>go;</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Time<sp/>Out<sp/>Waiting<sp/>On<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/>go:<sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>0;<sp/>counter<sp/>&lt;<sp/>(hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref><sp/>&lt;&lt;<sp/>8);<sp/>counter++)<sp/>{</highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a243f6b6d22cc5948908b764d58efc2b0" kindref="member">outportWord</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a1571e7119dfede60820469184878948a" kindref="member">hdData</ref>,<sp/>(</highlight><highlight class="keywordtype">short</highlight><highlight class="normal">)<sp/>tmp[counter]);</highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp<sp/>+=<sp/>(counter<sp/>+<sp/>0);</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/>startSector<sp/>+=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref>;</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="421"><highlight class="normal">}</highlight></codeline>
<codeline lineno="422"><highlight class="normal"></highlight></codeline>
<codeline lineno="423" refid="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="hd_8c_1ac285c40dfad18aac6ae2eaa77b4a06c8" kindref="member">hdRead</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structdriveInfo" kindref="compound">driveInfo</ref><sp/>*hdd,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*baseAddr,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>startSector,<sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>sectorCount)<sp/>{</highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>counter<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>retVal<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>transactionCount<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>*tmp<sp/>=<sp/>(</highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>*)<sp/>baseAddr;</highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/>startSector<sp/>+=<sp/>hdd-&gt;<ref refid="structdriveInfo_1abbb3cbf508e4e7b866eeb658846bd44a" kindref="member">parOffset</ref>;</highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/>startSector<sp/>+=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a3ed5ef43179982d1950cdb710dc9a2eb" kindref="member">lba_start</ref>;</highlight></codeline>
<codeline lineno="430"><highlight class="normal"></highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1af385dccea1485233fc52351a8d7666aa" kindref="member">hdEnable</ref><sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Invalid<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((sectorCount<sp/>&gt;&gt;<sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref>)<sp/>==<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref><sp/>=<sp/>sectorCount;<sp/></highlight><highlight class="comment">/*<sp/>hdd-&gt;hdMask);<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/>transactionCount<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref><sp/>=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a2aa87710c888fee7b587b46e60d2d632" kindref="member">hdMulti</ref>;</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/>transactionCount<sp/>=<sp/>sectorCount<sp/>&gt;&gt;<sp/>hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref>;</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(;<sp/>transactionCount<sp/>&gt;<sp/>0;<sp/>transactionCount--)<sp/>{</highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//for<sp/>(counter<sp/>=<sp/>1000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>10000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a73f0c3f82605d0aa108e8186e4daae6b" kindref="member">hdStat</ref>)<sp/>&amp;<sp/>0x80;</highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!retVal)</highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ready;</highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Time<sp/>Out<sp/>Waiting<sp/>On<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/>ready:<sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a8206a5d5a25f1d6fc9e02013572c52db" kindref="member">hdSecCount</ref>,<sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref>);</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a0fa794dfb3e811122d5eafbe348c368f" kindref="member">hdSecNum</ref>,<sp/>(startSector<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/>startSector<sp/>&gt;&gt;<sp/>8;</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a30a2e624c7eda626a913f0b5b9ed26b7" kindref="member">hdCylLow</ref>,<sp/>(retVal<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>&gt;&gt;=<sp/>8;</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a2a82bac9f72d97307f87e60acb709ebb" kindref="member">hdCylHi</ref>,<sp/>(retVal<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>&gt;&gt;=<sp/>8;</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>&amp;=<sp/>0x0F;</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/>retVal<sp/>|=<sp/>(hdd-&gt;<ref refid="structdriveInfo_1aef8c94d9c3cc8a71e23d8e63abbe38a5" kindref="member">hdDev</ref><sp/>|<sp/>0xA0);<sp/></highlight><highlight class="comment">//Test<sp/>as<sp/>per<sp/>TJ</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//retVal<sp/>|=<sp/>hdd-&gt;hdDev;<sp/>//retVal<sp/>|=<sp/>(hdd-&gt;hdDev<sp/>|<sp/>0xA0);<sp/>//Test<sp/>as<sp/>per<sp/>TJ</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1acefc72ce44e542db4580ce7e7c732aab" kindref="member">hdHead</ref>,<sp/>(retVal<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hdd-&gt;<ref refid="structdriveInfo_1acacd139e4cfe1037afbcf488f2f5d2c3" kindref="member">hdShift</ref><sp/>&gt;<sp/>0)</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" kindref="member">hdCmd</ref>,<sp/>0xC4);</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a7623c70dac9a02ab1f75aa7a6e547c4c" kindref="member">hdCmd</ref>,<sp/>0x20);</highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//for<sp/>(counter<sp/>=<sp/>1000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>10000000;<sp/>counter<sp/>&gt;=<sp/>0;<sp/>counter--)<sp/>{</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>retVal<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a73f0c3f82605d0aa108e8186e4daae6b" kindref="member">hdStat</ref>);</highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((retVal<sp/>&amp;<sp/>1)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="471"><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;HD<sp/>Read<sp/>Error:<sp/>[%i:0x%X:%i]\n&quot;</highlight><highlight class="normal">,<sp/>counter,<sp/>(<ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref>)<sp/>baseAddr,<sp/>startSector);</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((retVal<sp/>&amp;<sp/>8)<sp/>!=<sp/>0x0)<sp/>{</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>go;</highlight></codeline>
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Error:<sp/>Time<sp/>Out<sp/>Waiting<sp/>On<sp/>Drive\n&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(1);</highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/>go:<sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(counter<sp/>=<sp/>0;<sp/>counter<sp/>&lt;<sp/>(hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref><sp/>&lt;&lt;<sp/>8);<sp/>counter++)<sp/>{</highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp[counter]<sp/>=<sp/><ref refid="io_8h_1afb703b187feb4b92444454df6c3dd9e6" kindref="member">inportWord</ref>(hdd-&gt;<ref refid="structdriveInfo_1aad8076fe0ba9c5bdbbc23c79656619ab" kindref="member">hdPort</ref><sp/>+<sp/><ref refid="hd_8h_1a1571e7119dfede60820469184878948a" kindref="member">hdData</ref>);</highlight></codeline>
<codeline lineno="482"><highlight class="normal"></highlight><highlight class="comment">//kprintf(&quot;[0x%X]&quot;,<sp/>tmp[counter]);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/>tmp<sp/>+=<sp/>(counter<sp/>+<sp/>0);</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/>startSector<sp/>+=<sp/>hdd-&gt;<ref refid="structdriveInfo_1a877ef27dad0f84711aedbabb4ff71a2a" kindref="member">hdCalc</ref>;</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="488"><highlight class="normal">}</highlight></codeline>
<codeline lineno="489"><highlight class="normal"></highlight></codeline>
<codeline lineno="490"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="491"><highlight class="comment"><sp/>$Log:<sp/>hd.c,v<sp/>$</highlight></codeline>
<codeline lineno="492"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2006/10/12<sp/>15:00:26<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="493"><highlight class="comment"><sp/>More<sp/>changes</highlight></codeline>
<codeline lineno="494"><highlight class="comment"></highlight></codeline>
<codeline lineno="495"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2006/10/10<sp/>14:14:01<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="496"><highlight class="comment"><sp/>UFS<sp/>Reading</highlight></codeline>
<codeline lineno="497"><highlight class="comment"></highlight></codeline>
<codeline lineno="498"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2006/10/09<sp/>02:58:05<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="499"><highlight class="comment"><sp/>Fixing<sp/>UFS</highlight></codeline>
<codeline lineno="500"><highlight class="comment"></highlight></codeline>
<codeline lineno="501"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2006/10/06<sp/>15:48:01<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="502"><highlight class="comment"><sp/>Starting<sp/>to<sp/>make<sp/>ubixos<sp/>work<sp/>with<sp/>UFS2</highlight></codeline>
<codeline lineno="503"><highlight class="comment"></highlight></codeline>
<codeline lineno="504"><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="505"><highlight class="comment"><sp/>ubix2</highlight></codeline>
<codeline lineno="506"><highlight class="comment"></highlight></codeline>
<codeline lineno="507"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2005/10/12<sp/>00:13:37<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="508"><highlight class="comment"><sp/>Removed</highlight></codeline>
<codeline lineno="509"><highlight class="comment"></highlight></codeline>
<codeline lineno="510"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2005/09/26<sp/>17:24:34<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="511"><highlight class="comment"><sp/>no<sp/>message</highlight></codeline>
<codeline lineno="512"><highlight class="comment"></highlight></codeline>
<codeline lineno="513"><highlight class="comment"><sp/>Revision<sp/>1.16<sp/><sp/>2004/08/26<sp/>22:51:19<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="514"><highlight class="comment"><sp/>TCA<sp/>touched<sp/>me<sp/>:(<sp/>i<sp/>think<sp/>he<sp/>likes<sp/>men....</highlight></codeline>
<codeline lineno="515"><highlight class="comment"></highlight></codeline>
<codeline lineno="516"><highlight class="comment"></highlight></codeline>
<codeline lineno="517"><highlight class="comment"><sp/>sched.h:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>kTask_t<sp/>added<sp/>parentPid</highlight></codeline>
<codeline lineno="518"><highlight class="comment"><sp/>endtask.c:<sp/><sp/><sp/><sp/><sp/>fixed<sp/>term<sp/>back<sp/>to<sp/>parentPid</highlight></codeline>
<codeline lineno="519"><highlight class="comment"><sp/>exec.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>warnings</highlight></codeline>
<codeline lineno="520"><highlight class="comment"><sp/>fork.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>fixed<sp/>term<sp/>to<sp/>childPid</highlight></codeline>
<codeline lineno="521"><highlight class="comment"><sp/>sched.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>clean<sp/>up<sp/>for<sp/>dead<sp/>tasks</highlight></codeline>
<codeline lineno="522"><highlight class="comment"><sp/>systemtask.c:<sp/>clean<sp/>up<sp/>dead<sp/>tasks</highlight></codeline>
<codeline lineno="523"><highlight class="comment"><sp/>kmalloc.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="524"><highlight class="comment"><sp/>udp.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="525"><highlight class="comment"><sp/>bot.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="526"><highlight class="comment"><sp/>shell.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="527"><highlight class="comment"><sp/>tcpdump.c:<sp/><sp/><sp/><sp/><sp/>took<sp/>a<sp/>dump</highlight></codeline>
<codeline lineno="528"><highlight class="comment"><sp/>hd.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cleaned<sp/>up<sp/>warnings</highlight></codeline>
<codeline lineno="529"><highlight class="comment"><sp/>ubixfs.c:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stopped<sp/>prning<sp/>debug<sp/>info</highlight></codeline>
<codeline lineno="530"><highlight class="comment"></highlight></codeline>
<codeline lineno="531"><highlight class="comment"><sp/>Revision<sp/>1.15<sp/><sp/>2004/08/15<sp/>00:33:02<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="532"><highlight class="comment"><sp/>Wow<sp/>the<sp/>ide<sp/>driver<sp/>works<sp/>again</highlight></codeline>
<codeline lineno="533"><highlight class="comment"></highlight></codeline>
<codeline lineno="534"><highlight class="comment"><sp/>Revision<sp/>1.14<sp/><sp/>2004/08/14<sp/>21:56:44<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="535"><highlight class="comment"><sp/>Added<sp/>initialized<sp/>byte<sp/>to<sp/>the<sp/>device<sp/>system<sp/>to<sp/>make<sp/>it<sp/>easy<sp/>to<sp/>add<sp/>child<sp/>devices<sp/>which<sp/>use<sp/>parent<sp/>hardware.</highlight></codeline>
<codeline lineno="536"><highlight class="comment"></highlight></codeline>
<codeline lineno="537"><highlight class="comment"><sp/>Revision<sp/>1.13<sp/><sp/>2004/08/02<sp/>11:43:17<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="538"><highlight class="comment"><sp/>Fixens</highlight></codeline>
<codeline lineno="539"><highlight class="comment"></highlight></codeline>
<codeline lineno="540"><highlight class="comment"><sp/>Revision<sp/>1.12<sp/><sp/>2004/07/21<sp/>10:02:09<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="541"><highlight class="comment"><sp/>devfs:<sp/>renamed<sp/>functions</highlight></codeline>
<codeline lineno="542"><highlight class="comment"><sp/>device<sp/>system:<sp/>renamed<sp/>functions</highlight></codeline>
<codeline lineno="543"><highlight class="comment"><sp/>fdc:<sp/>fixed<sp/>a<sp/>few<sp/>potential<sp/>bugs<sp/>and<sp/>cleaned<sp/>up<sp/>some<sp/>unused<sp/>variables</highlight></codeline>
<codeline lineno="544"><highlight class="comment"><sp/>strol:<sp/>fixed<sp/>definition</highlight></codeline>
<codeline lineno="545"><highlight class="comment"><sp/>endtask:<sp/>made<sp/>it<sp/>print<sp/>out<sp/>freepage<sp/>debug<sp/>info</highlight></codeline>
<codeline lineno="546"><highlight class="comment"><sp/>kmalloc:<sp/>fixed<sp/>a<sp/>huge<sp/>memory<sp/>leak<sp/>we<sp/>had<sp/>some<sp/>unhandled<sp/>descriptor<sp/>insertion<sp/>so<sp/>some<sp/>descriptors<sp/>were<sp/>lost</highlight></codeline>
<codeline lineno="547"><highlight class="comment"><sp/>ld:<sp/>fixed<sp/>a<sp/>pointer<sp/>conversion</highlight></codeline>
<codeline lineno="548"><highlight class="comment"><sp/>file:<sp/>cleaned<sp/>up<sp/>a<sp/>few<sp/>unused<sp/>variables</highlight></codeline>
<codeline lineno="549"><highlight class="comment"><sp/>sched:<sp/>broke<sp/>task<sp/>deletion</highlight></codeline>
<codeline lineno="550"><highlight class="comment"><sp/>kprintf:<sp/>fixed<sp/>ogPrintf<sp/>definition</highlight></codeline>
<codeline lineno="551"><highlight class="comment"></highlight></codeline>
<codeline lineno="552"><highlight class="comment"><sp/>Revision<sp/>1.11<sp/><sp/>2004/05/19<sp/>23:36:52<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="553"><highlight class="comment"><sp/>Bug<sp/>Fixes</highlight></codeline>
<codeline lineno="554"><highlight class="comment"></highlight></codeline>
<codeline lineno="555"><highlight class="comment"><sp/>Revision<sp/>1.10<sp/><sp/>2004/05/19<sp/>15:20:06<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="556"><highlight class="comment"><sp/>Fixed<sp/>reference<sp/>problems<sp/>due<sp/>to<sp/>changes<sp/>in<sp/>drive<sp/>subsystem</highlight></codeline>
<codeline lineno="557"><highlight class="comment"></highlight></codeline>
<codeline lineno="558"><highlight class="comment"><sp/>Revision<sp/>1.9<sp/><sp/>2004/05/19<sp/>15:07:59<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="559"><highlight class="comment"><sp/>Typo<sp/>defInfo<sp/>should<sp/>of<sp/>been<sp/>devInfo</highlight></codeline>
<codeline lineno="560"><highlight class="comment"></highlight></codeline>
<codeline lineno="561"><highlight class="comment"><sp/>Revision<sp/>1.7<sp/><sp/>2004/05/19<sp/>04:07:43<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="562"><highlight class="comment"><sp/>kmalloc(size,pid)<sp/>no<sp/>more<sp/>it<sp/>is<sp/>no<sp/>kmalloc(size);<sp/>the<sp/>way<sp/>it<sp/>should<sp/>of<sp/>been</highlight></codeline>
<codeline lineno="563"><highlight class="comment"></highlight></codeline>
<codeline lineno="564"><highlight class="comment"><sp/>Revision<sp/>1.6<sp/><sp/>2004/04/28<sp/>21:10:40<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="565"><highlight class="comment"><sp/>Lots<sp/>Of<sp/>changes<sp/>to<sp/>make<sp/>it<sp/>work<sp/>with<sp/>existing<sp/>os</highlight></codeline>
<codeline lineno="566"><highlight class="comment"></highlight></codeline>
<codeline lineno="567"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2004/04/28<sp/>02:37:34<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="568"><highlight class="comment"><sp/>More<sp/>updates<sp/>for<sp/>using<sp/>the<sp/>new<sp/>driver<sp/>subsystem</highlight></codeline>
<codeline lineno="569"><highlight class="comment"></highlight></codeline>
<codeline lineno="570"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2004/04/28<sp/>02:22:54<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="571"><highlight class="comment"><sp/>This<sp/>is<sp/>a<sp/>fiarly<sp/>large<sp/>commit<sp/>but<sp/>we<sp/>are<sp/>starting<sp/>to<sp/>use<sp/>new<sp/>driver<sp/>model</highlight></codeline>
<codeline lineno="572"><highlight class="comment"><sp/>all<sp/>around</highlight></codeline>
<codeline lineno="573"><highlight class="comment"></highlight></codeline>
<codeline lineno="574"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2004/04/27<sp/>21:05:19<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="575"><highlight class="comment"><sp/>Updating<sp/>drivers<sp/>to<sp/>use<sp/>new<sp/>model</highlight></codeline>
<codeline lineno="576"><highlight class="comment"></highlight></codeline>
<codeline lineno="577"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2004/04/26<sp/>22:22:33<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="578"><highlight class="comment"><sp/>DevFS<sp/>now<sp/>uses<sp/>correct<sp/>size<sp/>of<sp/>device</highlight></codeline>
<codeline lineno="579"><highlight class="comment"></highlight></codeline>
<codeline lineno="580"><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="581"><highlight class="comment"><sp/>UbixOS<sp/>v1.0</highlight></codeline>
<codeline lineno="582"><highlight class="comment"></highlight></codeline>
<codeline lineno="583"><highlight class="comment"><sp/>Revision<sp/>1.12<sp/><sp/>2004/04/13<sp/>16:36:33<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="584"><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="585"><highlight class="comment"></highlight></codeline>
<codeline lineno="586"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="587"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/pci/hd.c"/>
  </compounddef>
</doxygen>
