summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/fdc.4 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man4/fdc.4 3.html')
-rw-r--r--static/freebsd/man4/fdc.4 3.html313
1 files changed, 0 insertions, 313 deletions
diff --git a/static/freebsd/man4/fdc.4 3.html b/static/freebsd/man4/fdc.4 3.html
deleted file mode 100644
index 012d0888..00000000
--- a/static/freebsd/man4/fdc.4 3.html
+++ /dev/null
@@ -1,313 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">FDC(4)</td>
- <td class="head-vol">Device Drivers Manual</td>
- <td class="head-rtitle">FDC(4)</td>
- </tr>
-</table>
-<div class="manual-text">
-<section class="Sh">
-<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
-<p class="Pp"><code class="Nm">fdc</code> &#x2014; <span class="Nd">PC
- architecture floppy disk controller driver</span></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
-<p class="Pp"><code class="Cd">device fdc</code></p>
-<p class="Pp">In <span class="Pa">/boot/device.hints</span>:
- <br/>
- <code class="Cd">hint.fdc.0.at=&quot;isa&quot;</code>
- <br/>
- <code class="Cd">hint.fdc.0.port=&quot;0x3F0&quot;</code>
- <br/>
- <code class="Cd">hint.fdc.0.irq=&quot;6&quot;</code>
- <br/>
- <code class="Cd">hint.fdc.0.drq=&quot;2&quot;</code>
- <br/>
- <code class="Cd">hint.fdc.0.flags=&quot;0x0&quot;</code>
- <br/>
- <code class="Cd">hint.fd.0.at=&quot;fdc0&quot;</code>
- <br/>
- <code class="Cd">hint.fd.0.drive=&quot;0&quot;</code>
- <br/>
- <code class="Cd">hint.fd.0.flags=&quot;0x0&quot;</code>
- <br/>
- <code class="Cd">hint.fd.1.at=&quot;fdc0&quot;</code>
- <br/>
- <code class="Cd">hint.fd.1.drive=&quot;1&quot;</code>
- <br/>
- <code class="Cd">hint.fd.1.flags=&quot;0x0&quot;</code></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DEPRECATION_NOTICE"><a class="permalink" href="#DEPRECATION_NOTICE">DEPRECATION
- NOTICE</a></h1>
-<p class="Pp">The <code class="Nm">fdc</code> driver is deprecated and may not
- be present in <span class="Ux">FreeBSD 16.0</span> and later.</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<section class="Ss">
-<h2 class="Ss" id="Device_Usage"><a class="permalink" href="#Device_Usage">Device
- Usage</a></h2>
-<p class="Pp">This driver provides access to floppy disk drives. Floppy disks
- using either FM (single-density) or MFM (double or high-density) recording
- can be handled.</p>
-<p class="Pp" id="enhanced">Floppy disk controllers can connect up to four
- drives each. The <code class="Nm">fdc</code> driver can currently handle up
- to two drives per controller (or four drives on ACPI). Upon driver
- initialization, an attempt is made to find out the type of the floppy
- controller in use. The known controller types are either the original NE765
- or i8272 chips, or alternatively
- <a class="permalink" href="#enhanced"><i class="Em">enhanced</i></a>
- controllers that are compatible with the NE72065 or i82077 chips. These
- enhanced controllers (among other enhancements) implement a FIFO for floppy
- data transfers that will automatically be enabled once an enhanced chip has
- been detected. This FIFO activation can be disabled using the per-controller
- flags value of <var class="Ar">0x1</var>.</p>
-<p class="Pp">By default, this driver creates a single device node
- <span class="Pa">/dev/fd</span><var class="Ar">N</var> for each attached
- drive with number <var class="Ar">N</var>. For historical reasons, device
- nodes that use a trailing UFS-style partition letter (ranging from
- &#x2018;a&#x2019; through &#x2018;h&#x2019;) can also be accessed, which
- will be implemented as symbolic links to the main device node.</p>
-<p class="Pp">Accessing the main device node will attempt to autodetect the
- density of the available medium for multi-density devices. Thus it is
- possible to use either a 720 KB medium or a 1440 KB medium in a high-density
- 3.5 inch standard floppy drive. Normally, this autodetection will only
- happen once at the first call to <a class="Xr">open(2)</a> for the device
- after inserting the medium. This assumes the drive offers proper changeline
- support so media changes can be detected by the driver. To indicate a drive
- that does not have the changeline support, this can be overridden using the
- per-drive device flags value of <var class="Ar">0x10</var> (causing each
- call to <a class="Xr">open(2)</a> to perform the autodetection).</p>
-<p class="Pp">When trying to use a floppy device with special-density media,
- other device nodes can be created, of the form
- <span class="Pa">/dev/fd</span><var class="Ar">N</var>.<var class="Ar">MMMM</var>,
- where <var class="Ar">N</var> is the drive number, and
- <var class="Ar">MMMM</var> is a number between one and four digits
- describing the device density. Up to 15 additional subdevices per drive can
- be created that way. The administrator is free to decide on a policy how to
- assign these numbers. The two common policies are to either implement
- subdevices numbered 1 through 15, or to use a number that describes the
- medium density in kilobytes. Initially, each of those devices will be
- configured to the maximal density that is possible for the drive type (like
- 1200 KB for 5.25 inch HD drives or 1440 KB for 3.5 inch HD drives). The
- desired density to be used on that subdevice needs to be configured using
- <a class="Xr">fdcontrol(8)</a>.</p>
-<p class="Pp">Drive types are configured using the lower four bits of the
- per-drive device flags. The following values can be specified:</p>
-<div class="Bd-indent">
-<dl class="Bl-tag">
- <dt><var class="Ar">1</var></dt>
- <dd>5.25 inch double-density device with 40 cylinders (360 KB native
- capacity)</dd>
- <dt><var class="Ar">2</var></dt>
- <dd>5.25 inch high-density device with 80 cylinders (1200 KB native
- capacity)</dd>
- <dt><var class="Ar">3</var></dt>
- <dd>3.5 inch double-density device with 80 cylinders (720 KB native
- capacity)</dd>
- <dt><var class="Ar">4</var></dt>
- <dd>3.5 inch high-density device with 80 cylinders (1440 KB native
- capacity)</dd>
- <dt><var class="Ar">5</var></dt>
- <dd>3.5 inch extra-density device with 80 cylinders (2880 KB native capacity,
- usage currently restricted to at most 1440 KB media)</dd>
- <dt><var class="Ar">6</var></dt>
- <dd>Same as type 5, available for compatibility with some BIOSes</dd>
-</dl>
-</div>
-<p class="Pp">On IA32 architectures, the drive type can be specified as 0 for
- the drives. In that case, the CMOS configuration memory will be consulted to
- obtain the value for that drive. The ACPI probe automatically determines
- these values via the _FDE and _FDI methods, but this can be overridden by
- specifying a drive type hint.</p>
-<p class="Pp">Normally, each configured drive will be probed at initialization
- time, using a short seek sequence. This is intended to find out about drives
- that have been configured but are actually missing or otherwise not
- responding. (The ACPI probe method does not perform this seek.) In some
- environments (like laptops with detachable drives), it might be desirable to
- bypass this drive probe, and pretend a drive to be there so the driver
- autoconfiguration will work even if the drive is currently not present. For
- that purpose, a per-drive device flags value of <var class="Ar">0x20</var>
- needs to be specified.</p>
-</section>
-<section class="Ss">
-<h2 class="Ss" id="Programming_Interface"><a class="permalink" href="#Programming_Interface">Programming
- Interface</a></h2>
-<p class="Pp">In addition to the normal read and write functionality, the
- <code class="Nm">fdc</code> driver offers a number of configurable options
- using <a class="Xr">ioctl(2)</a>. In order to access any of this
- functionality, programmers need to include the header file
- <code class="In">&lt;<a class="In">sys/fdcio.h</a>&gt;</code> into their
- programs. The call to <a class="Xr">open(2)</a> can be performed in two
- possible ways. When opening the device without the
- <code class="Dv">O_NONBLOCK</code> flag set, the device is opened in a
- normal way, which would cause the main device nodes to perform automatic
- media density selection, and which will yield a file descriptor that is
- fully available for any I/O operation or any of the following
- <a class="Xr">ioctl(2)</a> commands.</p>
-<p class="Pp">When opening the device with <code class="Dv">O_NONBLOCK</code>
- set, automatic media density selection will be bypassed, and the device
- remains in a half-opened state. No actual I/O operations are possible, but
- many of the <a class="Xr">ioctl(2)</a> commands described below can be
- performed. This mode is intended for access to the device without the
- requirement to have an accessible media present, like for status inquiries
- to the drive, or in order to format a medium.
- <code class="Dv">O_NONBLOCK</code> needs to be cleared before I/O operations
- are possible on the descriptor, which requires a prior specification of the
- density using the <code class="Dv">FD_STYPE</code> command (see below).
- Operations that are not allowed on the half-opened descriptor will cause an
- error value of <code class="Er">EAGAIN</code>.</p>
-<p class="Pp">The following <a class="Xr">ioctl(2)</a> commands are currently
- available:</p>
-<dl class="Bl-tag">
- <dt id="FD_FORM"><a class="permalink" href="#FD_FORM"><code class="Dv">FD_FORM</code></a></dt>
- <dd>Used to format a floppy disk medium. Third argument is a pointer to a
- <var class="Vt">struct fd_formb</var> specifying which track to format,
- and which parameters to fill into the ID fields of the floppy disk
- medium.</dd>
- <dt id="FD_GTYPE"><a class="permalink" href="#FD_GTYPE"><code class="Dv">FD_GTYPE</code></a></dt>
- <dd>Returns the current density definition record for the selected device.
- Third argument is a pointer to <var class="Vt">struct fd_type</var>.</dd>
- <dt id="FD_STYPE"><a class="permalink" href="#FD_STYPE"><code class="Dv">FD_STYPE</code></a></dt>
- <dd>Adjusts the density definition of the selected device. Third argument is a
- pointer to <var class="Vt">struct fd_type</var>. For the fixed-density
- subdevices (1 through 15 per drive), this operation is restricted to a
- process with superuser privileges. For the auto-selecting subdevice 0, the
- operation is temporarily allowed to any process, but this setting will be
- lost again upon the next autoselection. This can be used when formatting a
- new medium (which will require to open the device using
- <code class="Dv">O_NONBLOCK</code>, and thus to later adjust the density
- using <code class="Dv">FD_STYPE</code>).</dd>
- <dt id="FD_GOPTS"><a class="permalink" href="#FD_GOPTS"><code class="Dv">FD_GOPTS</code></a></dt>
- <dd>Obtain the current drive options. Third argument is a pointer to
- <var class="Vt">int</var>, containing a bitwise union of the following
- possible flag values:
- <dl class="Bl-tag">
- <dt id="FDOPT_NORETRY"><a class="permalink" href="#FDOPT_NORETRY"><code class="Dv">FDOPT_NORETRY</code></a></dt>
- <dd>Do not automatically retry operations upon failure.</dd>
- <dt id="FDOPT_NOERRLOG"><a class="permalink" href="#FDOPT_NOERRLOG"><code class="Dv">FDOPT_NOERRLOG</code></a></dt>
- <dd>Do not cause &#x201C;hard error&#x201D; kernel logs for failed I/O
- operations.</dd>
- <dt id="FDOPT_NOERROR"><a class="permalink" href="#FDOPT_NOERROR"><code class="Dv">FDOPT_NOERROR</code></a></dt>
- <dd>Do not indicate I/O errors when returning from
- <a class="Xr">read(2)</a> or <a class="Xr">write(2)</a> system calls.
- The caller is assumed to use <code class="Dv">FD_GSTAT</code> calls in
- order to inquire about the success of each operation. This is intended
- to allow even erroneous data from bad blocks to be retrieved using
- normal I/O operations.</dd>
- <dt id="FDOPT_AUTOSEL"><a class="permalink" href="#FDOPT_AUTOSEL"><code class="Dv">FDOPT_AUTOSEL</code></a></dt>
- <dd>Device performs automatic density selection. Unlike the above flags,
- this one is read-only.</dd>
- </dl>
- </dd>
- <dt id="FD_SOPTS"><a class="permalink" href="#FD_SOPTS"><code class="Dv">FD_SOPTS</code></a></dt>
- <dd>Set device options, see above for their meaning. Third argument is a
- pointer to <var class="Vt">int</var>. Drive options will always be cleared
- when closing the descriptor.</dd>
- <dt id="FD_CLRERR"><a class="permalink" href="#FD_CLRERR"><code class="Dv">FD_CLRERR</code></a></dt>
- <dd>Clear the internal low-level error counter. Normally, controller-level I/O
- errors are only logged up to <code class="Dv">FDC_ERRMAX</code> errors
- (currently defined to 100). This command resets the counter. Requires
- superuser privileges.</dd>
- <dt id="FD_READID"><a class="permalink" href="#FD_READID"><code class="Dv">FD_READID</code></a></dt>
- <dd>Read one sector ID field from the floppy disk medium. Third argument is a
- pointer to <var class="Vt">struct fdc_readid</var>, where the read data
- will be returned. Can be used to analyze a floppy disk medium.</dd>
- <dt id="FD_GSTAT"><a class="permalink" href="#FD_GSTAT"><code class="Dv">FD_GSTAT</code></a></dt>
- <dd>Return the recent floppy disk controller status, if available. Third
- argument is a pointer to <var class="Vt">struct fdc_status</var>, where
- the status registers (ST0, ST1, ST2, C, H, R, and N) are being returned.
- <code class="Er">EINVAL</code> will be caused if no recent status is
- available.</dd>
- <dt id="FD_GDTYPE"><a class="permalink" href="#FD_GDTYPE"><code class="Dv">FD_GDTYPE</code></a></dt>
- <dd>Returns the floppy disk drive type. Third argument is a pointer to
- <var class="Vt">enum fd_drivetype</var>. This type is the same as being
- used in the per-drive configuration flags, or in the CMOS configuration
- data or ACPI namespace on IA32 systems.</dd>
-</dl>
-</section>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SYSCTL_VARIABLES"><a class="permalink" href="#SYSCTL_VARIABLES">SYSCTL
- VARIABLES</a></h1>
-<dl class="Bl-tag">
- <dt id="debug.fdc.debugflags"><a class="permalink" href="#debug.fdc.debugflags"><code class="Dv">debug.fdc.debugflags</code></a></dt>
- <dd>Selectively enable debugging by setting one or more flags.
- <dl class="Bl-tag">
- <dt id="0x01"><a class="permalink" href="#0x01"><code class="Dv">0x01</code></a></dt>
- <dd>Dump device registers on reset.</dd>
- <dt id="0x02"><a class="permalink" href="#0x02"><code class="Dv">0x02</code></a></dt>
- <dd>When an IO operation completes, print the number of retries when that
- number is greater than zero.</dd>
- <dt id="0x04"><a class="permalink" href="#0x04"><code class="Dv">0x04</code></a></dt>
- <dd>Print when the number of retries exceeds
- <code class="Dv">debug.fdc.retries</code>
- (<code class="Dv">EIO</code>). Print when the option
- <code class="Dv">FDOPT_NOERROR</code> is set and an error would have
- returned from a write operation.</dd>
- <dt id="0x08"><a class="permalink" href="#0x08"><code class="Dv">0x08</code></a></dt>
- <dd>Print detailed IO command information.</dd>
- <dt id="0x10"><a class="permalink" href="#0x10"><code class="Dv">0x10</code></a></dt>
- <dd>Print status registers.</dd>
- <dt id="0x20"><a class="permalink" href="#0x20"><code class="Dv">0x20</code></a></dt>
- <dd>Print detailed status registers when interrupts complete. Print the
- source code line number close to the source of a non-zero return from
- a thread worker operation.</dd>
- <dt id="0x40"><a class="permalink" href="#0x40"><code class="Dv">0x40</code></a></dt>
- <dd>Print when the disk appears to be lost. Print cylinder, head, sector,
- and sector shift information after a request to read an ID field.
- Notify whether a disk probe resulted in finding a disk. When detecting
- the density of media present, indicate whether the autosensing was
- successful, and if so, the size of the medium in kilobytes. Print
- detailed type information when setting the drive type.</dd>
- <dt id="0x80"><a class="permalink" href="#0x80"><code class="Dv">0x80</code></a></dt>
- <dd>Print when an unknown IOCTL is used.</dd>
- </dl>
- </dd>
- <dt id="debug.fdc.fifo"><a class="permalink" href="#debug.fdc.fifo"><code class="Dv">debug.fdc.fifo</code></a></dt>
- <dd>For enhanced controllers, allows a non-default FIFO threshold setting. The
- default is 8 bytes.</dd>
- <dt id="debug.fdc.retries"><a class="permalink" href="#debug.fdc.retries"><code class="Dv">debug.fdc.retries</code></a></dt>
- <dd>Maximum number of retries to attempt. The default is 10.</dd>
- <dt id="debug.fdc.spec1"><a class="permalink" href="#debug.fdc.spec1"><code class="Dv">debug.fdc.spec1</code></a></dt>
- <dd>Specification byte one (step-rate + head unload). The default step rate is
- 6 ms. The default head unload time is 240 ms.</dd>
- <dt id="debug.fdc.spec2"><a class="permalink" href="#debug.fdc.spec2"><code class="Dv">debug.fdc.spec2</code></a></dt>
- <dd>Specification byte two (head load time + no-dma). The default head load
- time is 16 ms, and no-dma is 0 (disabled).</dd>
- <dt id="debug.fdc.settle"><a class="permalink" href="#debug.fdc.settle"><code class="Dv">debug.fdc.settle</code></a></dt>
- <dd>Head settling time in
- <a class="permalink" href="#settle"><b class="Sy" id="settle">settle</b></a>
- / hz seconds. The default value is set during device attach.</dd>
-</dl>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
-<dl class="Bl-tag Bl-compact">
- <dt><span class="Pa">/dev/fd*</span></dt>
- <dd>floppy disk device nodes</dd>
-</dl>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
- ALSO</a></h1>
-<p class="Pp"><a class="Xr">fdread(1)</a>, <a class="Xr">fdwrite(1)</a>,
- <a class="Xr">ioctl(2)</a>, <a class="Xr">open(2)</a>,
- <a class="Xr">read(2)</a>, <a class="Xr">write(2)</a>,
- <a class="Xr">fdcontrol(8)</a>, <a class="Xr">fdformat(8)</a></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
-<p class="Pp">This man page was initially written by <span class="An">Wilko
- Bulte</span>, and later vastly rewritten by <span class="An">J&#x00F6;rg
- Wunsch</span>.</p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">November 16, 2025</td>
- <td class="foot-os">FreeBSD 15.0</td>
- </tr>
-</table>