Content-type: text/html Man page of fd

fd

Section: Environments, Tables, and Troff Macros (7)
Index Return to Main Contents
 

NAME

fd - Floppy disk interface  

SYNOPSIS

controller fdi0 at * vector fdintr
device disk fd0 at fdi0 drive 0
device disk fd1 at fdi0 drive 1  

DESCRIPTION

The fd device driver and fdi controller make up the interface to Digital's integrated Floppy Disk Interface (FDI).

If the minor number is less than 64, the driver select number is indicated by bits 4 and 5, and the partition by bits 0 through 3. If the minor number is one of 64, 65, 66, or 67, the drive select number is indicated by bits 0 and 1, and disk partitions are disabled. In the latter case, the entire surface of the media is treated as one large partition, and attempts to change the partition table fail. The major number is 14 for both the block interface and the raw (character) interface.

The device names have the format rfd0, which indicates the raw device interface, or fd0p, which indicates the block interface and where p indicates the partition using the characters a through h. If you do not specify a partition with the block interface, partitioning is disabled. Default file protection for /dev/fd0 is 666.

The block interface is restricted to 512-byte, disk-sector aligned accesses. Reads or writes that attempt to start at the middle of a sector actually start at the beginning of the sector.

There is no sector-boundary limitation if you use the raw interface.

The driver protects the process that opens the floppy disk device from an accidental media change by preventing access to the device if the media is removed and then reinserted. To access the drive after the media has been changed, either you must close and then reopen the device, or you must issue a DEVIOCGET or FDIOTPRRST ioctl. You can use the fddisk command with the -new option to issue the FDIOTPRRST ioctl.

When a floppy disk device is first opened after changing media, a delay occurs while the partition table is read from the media if the device is not of type rfd0. If the device is opened with FNDELAY, partition table reading may be delayed until the first actual read or write request.

If you access media containing non-UFS data, the data on the media may appear to be a valid partition table. In this case, the user will probably not be able to access the media. To work around the problem, use the rfd0 device.

Partitions a and c begin at physical sector 0 and occupy the entire disk. All other partitions also begin at physical sector 0, but are of zero (0) length. You can change partition sizes by using the disklabel command.

The currently supported floppy disk drive is the RX26. The supported media types in the RX26 are the 350DD of size 737280 (1440 sectors), 350HD of size 1474560 (2880 sectors), and 350ED of size 2949120 (5760 sectors), as shown in the following partition layouts for the media types:

RX26, Double Density:


          disk      start     length


          rz?a      0         1440
          rz?b      0         0
          rz?c      0         1440
          rz?d      0         0
          rz?e      0         0
          rz?f      0         0
          rz?g      0         0
          rz?h      0         0

RX26, High Density:


          disk      start     length


          rz?a      0         2880
          rz?b      0         0
          rz?c      0         2880
          rz?d      0         0
          rz?e      0         0
          rz?f      0         0
          rz?g      0         0
          rz?h      0         0

RX26, Extra Density:


          disk      start     length


          rz?a      0         5760
          rz?b      0         0
          rz?c      0         5760
          rz?d      0         0
          rz?e      0         0
          rz?f      0         0
          rz?g      0         0
          rz?h      0         0  

Ioctl Support

Several special ioctls are defined for use with the fd device driver. Use of these requires that /usr/include/sys/ioctl.h and /sys/io/fd/mips/fdi.h are included. See the fdi.h file for reference purposes.

FDIOSENSE returns information about the current state of the drive via the structure fd_sense. All elements of this structure are initialized by this call. See comments in fdi.h for use of each element.

FDIOGETMTYP returns information about the media currently in the drive via the structure fd_mt. All elements of this structure are initialized by this call. See comments in fdi.h for use of each element.

FDIOFMTDSK, FDIOFFBSETUP, FDIOFFBNEXT, and FDIOFMTTRK are used for disk formatting. Data is passed to and from these calls via certain elements of a structure of type fd_fmt_spec. See comments in fdi.h for use of each element. FDIOFMTDSK causes the entire disk to be formatted. FDIOFMTTRK causes a specified track to be formatted. The combination of FDIOFFBSETUP and FDIOFFBNEXT cause the entire disk to be formatted, a little at a time, allowing the calling process to display an updated status line indicating the progress of the format.

FDIOTPRRST causes the driver to ignore the fact that the media might have just been removed and reinserted. Status information is returned via a fd_sense structure, just as with the FDIOSENSE call.

FDIOSEEK allows the user to specify the position of the next single-sector access (and only the next access) in any of several formats. These formats include logical-sector-number format, physical-sector-number format, and cylinder-head-sector format. These formats are specified in a structure of type fd_seek. See comments in fdi.h for use of each element.

FDIOMKCHS and FDIOMKPSN are used to translate between cylinder-head-sector sector specification and physical-sector-number sector specification. Data is passed to and from these calls via certain elements of a structure of type fd_chs_psn. See comments in fdi.h for use of each element.

The calls DEVIOCGET, DEVGETGEOM, DIOCGETPT, DIOCDGTPT, and DIOCSETPT are also supported and perform in their expected manner. A call to DEVIOCGET also has the effect of calling FDIOTPRRST.  

FILES

 

RELATED INFORMATION

Commands: disklabel(8), fddisk(8), MAKEDEV(8), uerf(8) delim off


 

Index

NAME
SYNOPSIS
DESCRIPTION
Ioctl Support
FILES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:19 GMT, October 02, 2010