<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>UbixOS V2: src/sys/include/pci/hd.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <div class="nav"> <a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a> » <a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a> » <a class="el" href="dir_caf4200c438ae9601464168e21e8e4d8.html">include</a> » <a class="el" href="dir_912887cea1b4cb6e273c4527a2250d09.html">pci</a></div> <h1>hd.h</h1><a href="hd_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*****************************************************************************************</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (c) 2002-2004 The UbixOS Project</span> <a name="l00003"></a>00003 <span class="comment"> All rights reserved.</span> <a name="l00004"></a>00004 <span class="comment"></span> <a name="l00005"></a>00005 <span class="comment"> Redistribution and use in source and binary forms, with or without modification, are</span> <a name="l00006"></a>00006 <span class="comment"> permitted provided that the following conditions are met:</span> <a name="l00007"></a>00007 <span class="comment"></span> <a name="l00008"></a>00008 <span class="comment"> Redistributions of source code must retain the above copyright notice, this list of</span> <a name="l00009"></a>00009 <span class="comment"> conditions, the following disclaimer and the list of authors. Redistributions in binary</span> <a name="l00010"></a>00010 <span class="comment"> form must reproduce the above copyright notice, this list of conditions, the following</span> <a name="l00011"></a>00011 <span class="comment"> disclaimer and the list of authors in the documentation and/or other materials provided</span> <a name="l00012"></a>00012 <span class="comment"> with the distribution. Neither the name of the UbixOS Project nor the names of its</span> <a name="l00013"></a>00013 <span class="comment"> contributors may be used to endorse or promote products derived from this software</span> <a name="l00014"></a>00014 <span class="comment"> without specific prior written permission.</span> <a name="l00015"></a>00015 <span class="comment"></span> <a name="l00016"></a>00016 <span class="comment"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY</span> <a name="l00017"></a>00017 <span class="comment"> EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span> <a name="l00018"></a>00018 <span class="comment"> MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL</span> <a name="l00019"></a>00019 <span class="comment"> THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span> <a name="l00020"></a>00020 <span class="comment"> SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT</span> <a name="l00021"></a>00021 <span class="comment"> OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)</span> <a name="l00022"></a>00022 <span class="comment"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR</span> <a name="l00023"></a>00023 <span class="comment"> TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span> <a name="l00024"></a>00024 <span class="comment"> SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span> <a name="l00025"></a>00025 <span class="comment"></span> <a name="l00026"></a>00026 <span class="comment"> $Id: hd_8h-source.html 88 2016-01-12 00:11:29Z reddawg $</span> <a name="l00027"></a>00027 <span class="comment"></span> <a name="l00028"></a>00028 <span class="comment">*****************************************************************************************/</span> <a name="l00029"></a>00029 <a name="l00030"></a>00030 <span class="preprocessor">#ifndef _HD_H</span> <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define _HD_H</span> <a name="l00032"></a>00032 <span class="preprocessor"></span> <a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="ubixfs_8h.html">ubixfs/ubixfs.h</a>></span> <a name="l00034"></a>00034 <a name="l00035"></a><a class="code" href="hd_8h.html#1571e7119dfede60820469184878948a">00035</a> <span class="preprocessor">#define hdData 0x0</span> <a name="l00036"></a><a class="code" href="hd_8h.html#98d5f3b47b6afa2948cb1db2a9e0cd36">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define hdError 0x1</span> <a name="l00037"></a><a class="code" href="hd_8h.html#8206a5d5a25f1d6fc9e02013572c52db">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define hdSecCount 0x2</span> <a name="l00038"></a><a class="code" href="hd_8h.html#0fa794dfb3e811122d5eafbe348c368f">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define hdSecNum 0x3</span> <a name="l00039"></a><a class="code" href="hd_8h.html#30a2e624c7eda626a913f0b5b9ed26b7">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define hdCylLow 0x4</span> <a name="l00040"></a><a class="code" href="hd_8h.html#2a82bac9f72d97307f87e60acb709ebb">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define hdCylHi 0x5</span> <a name="l00041"></a><a class="code" href="hd_8h.html#cefc72ce44e542db4580ce7e7c732aab">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define hdHead 0x6</span> <a name="l00042"></a><a class="code" href="hd_8h.html#73f0c3f82605d0aa108e8186e4daae6b">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define hdStat 0x7</span> <a name="l00043"></a><a class="code" href="hd_8h.html#7623c70dac9a02ab1f75aa7a6e547c4c">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define hdCmd 0x7</span> <a name="l00044"></a>00044 <span class="preprocessor"></span> <a name="l00045"></a>00045 <a name="l00046"></a><a class="code" href="structdriveInfo.html">00046</a> <span class="keyword">struct </span><a class="code" href="structdriveInfo.html">driveInfo</a> { <a name="l00047"></a><a class="code" href="structdriveInfo.html#16f2a2a3b5ea803c987edc8659d16559">00047</a> <span class="keyword">struct </span>driveDiskLabel *<a class="code" href="structdriveInfo.html#16f2a2a3b5ea803c987edc8659d16559">diskLabel</a>; <a name="l00048"></a><a class="code" href="structdriveInfo.html#ce7d3b12f76a7f0b5dba53b1904be35a">00048</a> <span class="keywordtype">char</span> <a class="code" href="structdriveInfo.html#ce7d3b12f76a7f0b5dba53b1904be35a">hdSector</a>[512]; <a name="l00049"></a><a class="code" href="structdriveInfo.html#f385dccea1485233fc52351a8d7666aa">00049</a> <span class="keywordtype">char</span> <a class="code" href="structdriveInfo.html#f385dccea1485233fc52351a8d7666aa">hdEnable</a>; <a name="l00050"></a><a class="code" href="structdriveInfo.html#ef8c94d9c3cc8a71e23d8e63abbe38a5">00050</a> <span class="keywordtype">char</span> <a class="code" href="structdriveInfo.html#ef8c94d9c3cc8a71e23d8e63abbe38a5">hdDev</a>; <a name="l00051"></a><a class="code" href="structdriveInfo.html#0ede68cc430fe1c49e9c234bbbe5ec11">00051</a> <span class="keywordtype">char</span> <a class="code" href="structdriveInfo.html#0ede68cc430fe1c49e9c234bbbe5ec11">hdFlags</a>; <a name="l00052"></a><a class="code" href="structdriveInfo.html#cacd139e4cfe1037afbcf488f2f5d2c3">00052</a> <span class="keywordtype">char</span> <a class="code" href="structdriveInfo.html#cacd139e4cfe1037afbcf488f2f5d2c3">hdShift</a>; <a name="l00053"></a><a class="code" href="structdriveInfo.html#a446858a696dafa8454b90a9d5087aae">00053</a> <span class="keywordtype">long</span> <a class="code" href="structdriveInfo.html#a446858a696dafa8454b90a9d5087aae">hdMask</a>; <a name="l00054"></a><a class="code" href="structdriveInfo.html#c6d14ed915761c07077af5d64fa0b83e">00054</a> <span class="keywordtype">long</span> <a class="code" href="structdriveInfo.html#c6d14ed915761c07077af5d64fa0b83e">hdMulti</a>; <a name="l00055"></a><a class="code" href="structdriveInfo.html#ad8076fe0ba9c5bdbbc23c79656619ab">00055</a> <span class="keywordtype">long</span> <a class="code" href="structdriveInfo.html#ad8076fe0ba9c5bdbbc23c79656619ab">hdPort</a>; <a name="l00056"></a><a class="code" href="structdriveInfo.html#da0977b5e57df10de593d1df22712af8">00056</a> <span class="keywordtype">long</span> <a class="code" href="structdriveInfo.html#da0977b5e57df10de593d1df22712af8">hdSize</a>; <a name="l00057"></a><a class="code" href="structdriveInfo.html#877ef27dad0f84711aedbabb4ff71a2a">00057</a> <span class="keywordtype">long</span> <a class="code" href="structdriveInfo.html#877ef27dad0f84711aedbabb4ff71a2a">hdCalc</a>; <a name="l00058"></a><a class="code" href="structdriveInfo.html#bbb3cbf508e4e7b866eeb658846bd44a">00058</a> <span class="keywordtype">long</span> <a class="code" href="structdriveInfo.html#bbb3cbf508e4e7b866eeb658846bd44a">parOffset</a>; <a name="l00059"></a>00059 }; <a name="l00060"></a>00060 <a name="l00061"></a>00061 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#a6ffe735243161c69ce0930999e02f88">initHardDisk</a>(); <a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="hd_8h.html#6bbbb9d4c1c81ca945bf093cbba5490c">hdWrite</a>(<span class="keyword">struct</span> <a class="code" href="structdriveInfo.html">driveInfo</a> *hdd,<span class="keywordtype">void</span> *,<a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>,<a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>); <a name="l00063"></a>00063 <span class="keywordtype">void</span> <a class="code" href="hd_8h.html#bda1e72920488b35bcfc9ed68bf4c268">hdRead</a>(<span class="keyword">struct</span> <a class="code" href="structdriveInfo.html">driveInfo</a> *hdd,<span class="keywordtype">void</span> *,<a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>,<a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a>); <a name="l00064"></a>00064 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#8e64e509439c31ba2acfe68a7aefcc10">hdReset</a>(); <a name="l00065"></a>00065 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#ce9b924d48cc450c255d1d48fcbc13a5">hdIoctl</a>(); <a name="l00066"></a>00066 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#9535712ecc532571658cc6861570dde5">hdStart</a>(); <a name="l00067"></a>00067 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#7a00465121a584acd10c1ca1b46680a1">hdStop</a>(); <a name="l00068"></a>00068 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#525245216f426465a3c0f130bd0efd19">hdStandby</a>(); <a name="l00069"></a>00069 <span class="keywordtype">int</span> <a class="code" href="hd_8h.html#b01b187dc277e089d0161315437fde41">hdInit</a>(<span class="keyword">struct</span> <a class="code" href="structdevice__node.html">device_node</a> *dev); <a name="l00070"></a>00070 <a name="l00071"></a><a class="code" href="structdos__partition.html">00071</a> <span class="keyword">struct </span><a class="code" href="structdos__partition.html">dos_partition</a> { <a name="l00072"></a><a class="code" href="structdos__partition.html#76754d1c9c64baa477f45dac3b258a40">00072</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#76754d1c9c64baa477f45dac3b258a40">dp_flag</a>; <span class="comment">/* bootstrap flags */</span> <a name="l00073"></a><a class="code" href="structdos__partition.html#43c14b7f158728b75f4fa550ee7ec75f">00073</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#43c14b7f158728b75f4fa550ee7ec75f">dp_shd</a>; <span class="comment">/* starting head */</span> <a name="l00074"></a><a class="code" href="structdos__partition.html#bd8bc367d5183d55902ab1175f63343b">00074</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#bd8bc367d5183d55902ab1175f63343b">dp_ssect</a>; <span class="comment">/* starting sector */</span> <a name="l00075"></a><a class="code" href="structdos__partition.html#3a8d760608768cd64c6c5765aeac7a40">00075</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#3a8d760608768cd64c6c5765aeac7a40">dp_scyl</a>; <span class="comment">/* starting cylinder */</span> <a name="l00076"></a><a class="code" href="structdos__partition.html#817b13493937968e878385eeede34f0b">00076</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#817b13493937968e878385eeede34f0b">dp_type</a>; <span class="comment">/* partition type */</span> <a name="l00077"></a><a class="code" href="structdos__partition.html#bb8315c288cd2fb600b593867f7fe9db">00077</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#bb8315c288cd2fb600b593867f7fe9db">dp_ehd</a>; <span class="comment">/* end head */</span> <a name="l00078"></a><a class="code" href="structdos__partition.html#7c867bf1f30a039de242889af824d188">00078</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#7c867bf1f30a039de242889af824d188">dp_esect</a>; <span class="comment">/* end sector */</span> <a name="l00079"></a><a class="code" href="structdos__partition.html#36e0dc33679a315c60056b2a8e865598">00079</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structdos__partition.html#36e0dc33679a315c60056b2a8e865598">dp_ecyl</a>; <span class="comment">/* end cylinder */</span> <a name="l00080"></a><a class="code" href="structdos__partition.html#b316e0e02d24902172d5edde412f3238">00080</a> <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> <a class="code" href="structdos__partition.html#b316e0e02d24902172d5edde412f3238">dp_start</a>; <span class="comment">/* absolute starting sector number */</span> <a name="l00081"></a><a class="code" href="structdos__partition.html#f001423f7cab0f911f83d19906c9018f">00081</a> <a class="code" href="types_8h.html#5847ea0262a5aa61eee48cbe95544a78">uInt32</a> <a class="code" href="structdos__partition.html#f001423f7cab0f911f83d19906c9018f">dp_size</a>; <span class="comment">/* partition size in sectors */</span> <a name="l00082"></a>00082 }; <a name="l00083"></a>00083 <a name="l00084"></a><a class="code" href="hd_8h.html#b365aa9aae531413e33947aba3d079cc">00084</a> <span class="preprocessor">#define MAXPARTITIONS 8</span> <a name="l00085"></a>00085 <span class="preprocessor"></span> <a name="l00086"></a><a class="code" href="structbsd__disklabel.html">00086</a> <span class="keyword">struct </span><a class="code" href="structbsd__disklabel.html">bsd_disklabel</a> { <a name="l00087"></a><a class="code" href="structbsd__disklabel.html#4cd5d09a3a36da18477d178762fdfd97">00087</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#4cd5d09a3a36da18477d178762fdfd97">d_magic</a>; <span class="comment">/* the magic number */</span> <a name="l00088"></a><a class="code" href="structbsd__disklabel.html#339de842bcffc11bce9a34fc53b03362">00088</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#339de842bcffc11bce9a34fc53b03362">d_type</a>; <span class="comment">/* drive type */</span> <a name="l00089"></a><a class="code" href="structbsd__disklabel.html#c6a9dfd75ae82c8c45e86726ca9cdd3b">00089</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#c6a9dfd75ae82c8c45e86726ca9cdd3b">d_subtype</a>; <span class="comment">/* controller/d_type specific */</span> <a name="l00090"></a><a class="code" href="structbsd__disklabel.html#d6a5a058cc4fa40a5a0a5cb305104569">00090</a> <span class="keywordtype">char</span> <a class="code" href="structbsd__disklabel.html#d6a5a058cc4fa40a5a0a5cb305104569">d_typename</a>[16]; <span class="comment">/* type name, e.g. "eagle" */</span> <a name="l00091"></a>00091 <a name="l00092"></a><a class="code" href="structbsd__disklabel.html#327daaf81e47645765fce50925f63030">00092</a> <span class="keywordtype">char</span> <a class="code" href="structbsd__disklabel.html#327daaf81e47645765fce50925f63030">d_packname</a>[16]; <span class="comment">/* pack identifier */</span> <a name="l00093"></a>00093 <a name="l00094"></a>00094 <span class="comment">/* disk geometry: */</span> <a name="l00095"></a><a class="code" href="structbsd__disklabel.html#79153fe068fdf0406a058bde26cc878a">00095</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#79153fe068fdf0406a058bde26cc878a">d_secsize</a>; <span class="comment">/* # of bytes per sector */</span> <a name="l00096"></a><a class="code" href="structbsd__disklabel.html#941fd2872c4114f45aa6351d274146de">00096</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#941fd2872c4114f45aa6351d274146de">d_nsectors</a>; <span class="comment">/* # of data sectors per track */</span> <a name="l00097"></a><a class="code" href="structbsd__disklabel.html#d4d554a81a0a40ea3798534bbcaea9cb">00097</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#d4d554a81a0a40ea3798534bbcaea9cb">d_ntracks</a>; <span class="comment">/* # of tracks per cylinder */</span> <a name="l00098"></a><a class="code" href="structbsd__disklabel.html#b714391225d73f1d54cfed83bb856b33">00098</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#b714391225d73f1d54cfed83bb856b33">d_ncylinders</a>; <span class="comment">/* # of data cylinders per unit */</span> <a name="l00099"></a><a class="code" href="structbsd__disklabel.html#b5b34b633875649ac99cec0d15e0499d">00099</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#b5b34b633875649ac99cec0d15e0499d">d_secpercyl</a>; <span class="comment">/* # of data sectors per cylinder */</span> <a name="l00100"></a><a class="code" href="structbsd__disklabel.html#a29883ea8626c0690b18d62a7c6592d9">00100</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#a29883ea8626c0690b18d62a7c6592d9">d_secperunit</a>; <span class="comment">/* # of data sectors per unit */</span> <a name="l00101"></a>00101 <a name="l00102"></a>00102 <span class="comment">/*</span> <a name="l00103"></a>00103 <span class="comment"> * Spares (bad sector replacements) below are not counted in</span> <a name="l00104"></a>00104 <span class="comment"> * d_nsectors or d_secpercyl. Spare sectors are assumed to</span> <a name="l00105"></a>00105 <span class="comment"> * be physical sectors which occupy space at the end of each</span> <a name="l00106"></a>00106 <span class="comment"> * track and/or cylinder.</span> <a name="l00107"></a>00107 <span class="comment"> */</span> <a name="l00108"></a><a class="code" href="structbsd__disklabel.html#70038e5db15a12985955a06daa31b2b6">00108</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#70038e5db15a12985955a06daa31b2b6">d_sparespertrack</a>; <span class="comment">/* # of spare sectors per track */</span> <a name="l00109"></a><a class="code" href="structbsd__disklabel.html#66e9626c5aa0312540d253599483b6b6">00109</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#66e9626c5aa0312540d253599483b6b6">d_sparespercyl</a>; <span class="comment">/* # of spare sectors per cylinder */</span> <a name="l00110"></a>00110 <span class="comment">/*</span> <a name="l00111"></a>00111 <span class="comment"> * Alternate cylinders include maintenance, replacement, configuration</span> <a name="l00112"></a>00112 <span class="comment"> * description areas, etc.</span> <a name="l00113"></a>00113 <span class="comment"> */</span> <a name="l00114"></a><a class="code" href="structbsd__disklabel.html#1a2e5096cbd1ebe4fe430f882c52c57d">00114</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#1a2e5096cbd1ebe4fe430f882c52c57d">d_acylinders</a>; <span class="comment">/* # of alt. cylinders per unit */</span> <a name="l00115"></a>00115 <a name="l00116"></a>00116 <span class="comment">/* hardware characteristics: */</span> <a name="l00117"></a>00117 <span class="comment">/*</span> <a name="l00118"></a>00118 <span class="comment"> * d_interleave, d_trackskew and d_cylskew describe perturbations</span> <a name="l00119"></a>00119 <span class="comment"> * in the media format used to compensate for a slow controller.</span> <a name="l00120"></a>00120 <span class="comment"> * Interleave is physical sector interleave, set up by the</span> <a name="l00121"></a>00121 <span class="comment"> * formatter or controller when formatting. When interleaving is</span> <a name="l00122"></a>00122 <span class="comment"> * in use, logically adjacent sectors are not physically</span> <a name="l00123"></a>00123 <span class="comment"> * contiguous, but instead are separated by some number of</span> <a name="l00124"></a>00124 <span class="comment"> * sectors. It is specified as the ratio of physical sectors</span> <a name="l00125"></a>00125 <span class="comment"> * traversed per logical sector. Thus an interleave of 1:1</span> <a name="l00126"></a>00126 <span class="comment"> * implies contiguous layout, while 2:1 implies that logical</span> <a name="l00127"></a>00127 <span class="comment"> * sector 0 is separated by one sector from logical sector 1.</span> <a name="l00128"></a>00128 <span class="comment"> * d_trackskew is the offset of sector 0 on track N relative to</span> <a name="l00129"></a>00129 <span class="comment"> * sector 0 on track N-1 on the same cylinder. Finally, d_cylskew</span> <a name="l00130"></a>00130 <span class="comment"> * is the offset of sector 0 on cylinder N relative to sector 0</span> <a name="l00131"></a>00131 <span class="comment"> * on cylinder N-1.</span> <a name="l00132"></a>00132 <span class="comment"> */</span> <a name="l00133"></a><a class="code" href="structbsd__disklabel.html#08bc0c83a73009a0886aeadae13adf9f">00133</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#08bc0c83a73009a0886aeadae13adf9f">d_rpm</a>; <span class="comment">/* rotational speed */</span> <a name="l00134"></a><a class="code" href="structbsd__disklabel.html#9f251fc6b92836fc3df6fdcf5ada1eaf">00134</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#9f251fc6b92836fc3df6fdcf5ada1eaf">d_interleave</a>; <span class="comment">/* hardware sector interleave */</span> <a name="l00135"></a><a class="code" href="structbsd__disklabel.html#16886f26e50cfa69d6f8a83c3ec74d3f">00135</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#16886f26e50cfa69d6f8a83c3ec74d3f">d_trackskew</a>; <span class="comment">/* sector 0 skew, per track */</span> <a name="l00136"></a><a class="code" href="structbsd__disklabel.html#8a1ea7da1a561dc09e78d9fd510cc9d7">00136</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#8a1ea7da1a561dc09e78d9fd510cc9d7">d_cylskew</a>; <span class="comment">/* sector 0 skew, per cylinder */</span> <a name="l00137"></a><a class="code" href="structbsd__disklabel.html#f4d4f387f5a586b7b7207b627ad97fe8">00137</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#f4d4f387f5a586b7b7207b627ad97fe8">d_headswitch</a>; <span class="comment">/* head switch time, usec */</span> <a name="l00138"></a><a class="code" href="structbsd__disklabel.html#22be9443e1f538e456eb0ecdee8a3b56">00138</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#22be9443e1f538e456eb0ecdee8a3b56">d_trkseek</a>; <span class="comment">/* track-to-track seek, usec */</span> <a name="l00139"></a><a class="code" href="structbsd__disklabel.html#8c414f88561a87791b7275c85093a497">00139</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#8c414f88561a87791b7275c85093a497">d_flags</a>; <span class="comment">/* generic flags */</span> <a name="l00140"></a><a class="code" href="hd_8h.html#24fef906c993a6511034377118497b67">00140</a> <span class="preprocessor">#define NDDATA 5</span> <a name="l00141"></a><a class="code" href="structbsd__disklabel.html#ee88bede04d4e92e3e35ce8b3fa96c53">00141</a> <span class="preprocessor"></span> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#ee88bede04d4e92e3e35ce8b3fa96c53">d_drivedata</a>[<a class="code" href="hd_8h.html#24fef906c993a6511034377118497b67">NDDATA</a>]; <span class="comment">/* drive-type specific information */</span> <a name="l00142"></a><a class="code" href="hd_8h.html#a7634e74ec4ca64b3a931b89c07ece15">00142</a> <span class="preprocessor">#define NSPARE 5</span> <a name="l00143"></a><a class="code" href="structbsd__disklabel.html#17cd3e21e9fe8f67745c28330f31db11">00143</a> <span class="preprocessor"></span> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#17cd3e21e9fe8f67745c28330f31db11">d_spare</a>[<a class="code" href="hd_8h.html#a7634e74ec4ca64b3a931b89c07ece15">NSPARE</a>]; <span class="comment">/* reserved for future use */</span> <a name="l00144"></a><a class="code" href="structbsd__disklabel.html#1791efc5907c820e31113c0c9a645602">00144</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#1791efc5907c820e31113c0c9a645602">d_magic2</a>; <span class="comment">/* the magic number (again) */</span> <a name="l00145"></a><a class="code" href="structbsd__disklabel.html#c509dd0d343b76b9dc7dc75973219a7e">00145</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#c509dd0d343b76b9dc7dc75973219a7e">d_checksum</a>; <span class="comment">/* xor of data incl. partitions */</span> <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="comment">/* filesystem and partition information: */</span> <a name="l00148"></a><a class="code" href="structbsd__disklabel.html#6a478db13de03d2384bbb5307be1e84c">00148</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel.html#6a478db13de03d2384bbb5307be1e84c">d_npartitions</a>; <span class="comment">/* number of partitions in following */</span> <a name="l00149"></a><a class="code" href="structbsd__disklabel.html#e6fd038ae8f29755866e1c6fcfbfd11f">00149</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#e6fd038ae8f29755866e1c6fcfbfd11f">d_bbsize</a>; <span class="comment">/* size of boot area at sn0, bytes */</span> <a name="l00150"></a><a class="code" href="structbsd__disklabel.html#bbdfb5c93b11731acef587db4f9492ff">00150</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel.html#bbdfb5c93b11731acef587db4f9492ff">d_sbsize</a>; <span class="comment">/* max size of fs superblock, bytes */</span> <a name="l00151"></a><a class="code" href="structbsd__disklabel_1_1partition.html">00151</a> <span class="keyword">struct </span><a class="code" href="structbsd__disklabel_1_1partition.html">partition</a> { <span class="comment">/* the partition table */</span> <a name="l00152"></a><a class="code" href="structbsd__disklabel_1_1partition.html#5663ff994f70fcc34ce0587012a2339b">00152</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel_1_1partition.html#5663ff994f70fcc34ce0587012a2339b">p_size</a>; <span class="comment">/* number of sectors in partition */</span> <a name="l00153"></a><a class="code" href="structbsd__disklabel_1_1partition.html#8bc8426239533bd9dfdce0f25190da06">00153</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel_1_1partition.html#8bc8426239533bd9dfdce0f25190da06">p_offset</a>; <span class="comment">/* starting sector */</span> <a name="l00154"></a><a class="code" href="structbsd__disklabel_1_1partition.html#28f6899ed90435dd6e7a0b737718d703">00154</a> <a class="code" href="types_8h.html#ba29fd78d95cce0ecb249c24b58d07da">u_int32_t</a> <a class="code" href="structbsd__disklabel_1_1partition.html#28f6899ed90435dd6e7a0b737718d703">p_fsize</a>; <span class="comment">/* filesystem basic fragment size */</span> <a name="l00155"></a><a class="code" href="structbsd__disklabel_1_1partition.html#234eea6a587c4d889251c2f07d982cef">00155</a> <a class="code" href="types_8h.html#c7c42f52639b9aca7da966a0783996d7">u_int8_t</a> <a class="code" href="structbsd__disklabel_1_1partition.html#234eea6a587c4d889251c2f07d982cef">p_fstype</a>; <span class="comment">/* filesystem type, see below */</span> <a name="l00156"></a><a class="code" href="structbsd__disklabel_1_1partition.html#d200bba4ef05cb1d2824c6b93092f711">00156</a> <a class="code" href="types_8h.html#c7c42f52639b9aca7da966a0783996d7">u_int8_t</a> <a class="code" href="structbsd__disklabel_1_1partition.html#d200bba4ef05cb1d2824c6b93092f711">p_frag</a>; <span class="comment">/* filesystem fragments per block */</span> <a name="l00157"></a><a class="code" href="structbsd__disklabel_1_1partition.html#26963c89dd04bf274c1f31b1d76dee89">00157</a> <a class="code" href="types_8h.html#f7b042408b9b104606f8a9b5035329f3">u_int16_t</a> <a class="code" href="structbsd__disklabel_1_1partition.html#26963c89dd04bf274c1f31b1d76dee89">p_cpg</a>; <span class="comment">/* filesystem cylinders per group */</span> <a name="l00158"></a>00158 } <a class="code" href="structbsd__disklabel.html#60c26768f84bf0061c2436f29a2fdff0">d_partitions</a>[<a class="code" href="hd_8h.html#b365aa9aae531413e33947aba3d079cc">MAXPARTITIONS</a>]; <span class="comment">/* actually may be more */</span> <a name="l00159"></a>00159 }; <a name="l00160"></a>00160 <a name="l00161"></a><a class="code" href="hd_8h.html#6ef530d16811c8a4680c136ed9e72cbf">00161</a> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="hd_8h.html#6ef530d16811c8a4680c136ed9e72cbf">fstypenames</a>[] = { <a name="l00162"></a>00162 <span class="stringliteral">"unused"</span>, <a name="l00163"></a>00163 <span class="stringliteral">"swap"</span>, <a name="l00164"></a>00164 <span class="stringliteral">"Version 6"</span>, <a name="l00165"></a>00165 <span class="stringliteral">"Version 7"</span>, <a name="l00166"></a>00166 <span class="stringliteral">"System V"</span>, <a name="l00167"></a>00167 <span class="stringliteral">"4.1BSD"</span>, <a name="l00168"></a>00168 <span class="stringliteral">"Eighth Edition"</span>, <a name="l00169"></a>00169 <span class="stringliteral">"4.2BSD"</span>, <a name="l00170"></a>00170 <span class="stringliteral">"MSDOS"</span>, <a name="l00171"></a>00171 <span class="stringliteral">"4.4LFS"</span>, <a name="l00172"></a>00172 <span class="stringliteral">"unknown"</span>, <a name="l00173"></a>00173 <span class="stringliteral">"HPFS"</span>, <a name="l00174"></a>00174 <span class="stringliteral">"ISO9660"</span>, <a name="l00175"></a>00175 <span class="stringliteral">"boot"</span>, <a name="l00176"></a>00176 <span class="stringliteral">"vinum"</span>, <a name="l00177"></a>00177 <span class="stringliteral">"raid"</span>, <a name="l00178"></a>00178 <span class="stringliteral">"?"</span>, <a name="l00179"></a>00179 <span class="stringliteral">"?"</span>, <a name="l00180"></a>00180 <span class="stringliteral">"?"</span>, <a name="l00181"></a>00181 <span class="stringliteral">"?"</span>, <a name="l00182"></a>00182 <span class="stringliteral">"jfs"</span>, <a name="l00183"></a>00183 <a class="code" href="types_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> <a name="l00184"></a>00184 }; <a name="l00185"></a>00185 <a name="l00186"></a>00186 <span class="preprocessor">#endif</span> <a name="l00187"></a>00187 <span class="preprocessor"></span> <a name="l00188"></a>00188 <span class="comment">/***</span> <a name="l00189"></a>00189 <span class="comment"> $Log: hd_8h-source.html,v $ <a name="l00189"></a>00189 <span class="comment"> Revision 1.7 2006/12/15 17:47:05 reddawg <a name="l00189"></a>00189 <span class="comment"> Updates <a name="l00189"></a>00189 <span class="comment"></span> <a name="l00190"></a>00190 <span class="comment"> Revision 1.2 2006/10/09 02:58:05 reddawg</span> <a name="l00191"></a>00191 <span class="comment"> Fixing UFS</span> <a name="l00192"></a>00192 <span class="comment"></span> <a name="l00193"></a>00193 <span class="comment"> Revision 1.1.1.1 2006/06/01 12:46:14 reddawg</span> <a name="l00194"></a>00194 <span class="comment"> ubix2</span> <a name="l00195"></a>00195 <span class="comment"></span> <a name="l00196"></a>00196 <span class="comment"> Revision 1.2 2005/10/12 00:13:37 reddawg</span> <a name="l00197"></a>00197 <span class="comment"> Removed</span> <a name="l00198"></a>00198 <span class="comment"></span> <a name="l00199"></a>00199 <span class="comment"> Revision 1.1.1.1 2005/09/26 17:23:50 reddawg</span> <a name="l00200"></a>00200 <span class="comment"> no message</span> <a name="l00201"></a>00201 <span class="comment"></span> <a name="l00202"></a>00202 <span class="comment"> Revision 1.7 2004/08/15 00:33:02 reddawg</span> <a name="l00203"></a>00203 <span class="comment"> Wow the ide driver works again</span> <a name="l00204"></a>00204 <span class="comment"></span> <a name="l00205"></a>00205 <span class="comment"> Revision 1.6 2004/07/21 10:02:09 reddawg</span> <a name="l00206"></a>00206 <span class="comment"> devfs: renamed functions</span> <a name="l00207"></a>00207 <span class="comment"> device system: renamed functions</span> <a name="l00208"></a>00208 <span class="comment"> fdc: fixed a few potential bugs and cleaned up some unused variables</span> <a name="l00209"></a>00209 <span class="comment"> strol: fixed definition</span> <a name="l00210"></a>00210 <span class="comment"> endtask: made it print out freepage debug info</span> <a name="l00211"></a>00211 <span class="comment"> kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost</span> <a name="l00212"></a>00212 <span class="comment"> ld: fixed a pointer conversion</span> <a name="l00213"></a>00213 <span class="comment"> file: cleaned up a few unused variables</span> <a name="l00214"></a>00214 <span class="comment"> sched: broke task deletion</span> <a name="l00215"></a>00215 <span class="comment"> kprintf: fixed ogPrintf definition</span> <a name="l00216"></a>00216 <span class="comment"></span> <a name="l00217"></a>00217 <span class="comment"> Revision 1.5 2004/05/21 15:05:07 reddawg</span> <a name="l00218"></a>00218 <span class="comment"> Cleaned up</span> <a name="l00219"></a>00219 <span class="comment"></span> <a name="l00220"></a>00220 <span class="comment"></span> <a name="l00221"></a>00221 <span class="comment"> END</span> <a name="l00222"></a>00222 <span class="comment"> ***/</span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Dec 15 11:18:54 2006 for UbixOS V2 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>