

fd                        Device Driver                        fd




Floppy disk driver


The files /dev/f* are entries for the diskette drives of COHERENT
on the IBM AT.  Each entry  is assigned major device number 4, is
accessed  as  a block-special  device,  and  has a  corresponding
character-special device entry.

The device entries are linked to a driver that handles up to four
5.25  inch disk  drives,  each in  one of  several formats.   The
least-significant  four bits  of an  entry's minor  device number
identify the type  of drive.  The next least-significant two bits
identify  the drive.   The following  table summarizes  the name,
minor device  number, sectors  per track, partition  sector size,
characteristics, and  addressing method for each  device entry of
floppy disk drive 0.


     _9 _s_e_c_t_o_r_s/_t_r_a_c_k

     ff99dd00    4    9   720   DSDD   surface (5.25 inch)
     ffqqaa00   13    9  1440   DSQD   cylinder (3.25 inch)
     ff99aa00   12    9   720   DSDD   cylinder (5.25 inch)



     _1_5 _s_e_c_t_o_r_s/_t_r_a_c_k

     ffhhaa00   14   15  2400   DSHD   cylinder (5.25 inch)



     _1_8 _s_e_c_t_o_r_s/_t_r_a_c_k

     ffvvaa00   15   18  2880   DSHD   cylinder



Prefixing an r  to a name given above gives  the name of the cor-
responding character-device  entry.  Corresponding device entries
for drives 1, 2, and 3 have minor numbers with offsets of 16, 32,
and 48 from the minor numbers  given above and have 1, 2, or 3 in
place of 0 in the names given above.

For device entries  whose minor number's fourth least-significant
bit is zero  (minor numbers 0 through 7 for  drive 0), the driver
uses  surface addressing rather  than cylinder  addressing.  This
means that it  increments tracks before heads when computing sec-
tor addresses  and  the first  surface is used  completely before
the second surface is accessed.  For devices whose minor number's
fourth least significant bit is 1 (minor numbers 8 through 15 for
drive 0), the driver uses cylinder addressing.




COHERENT Lexicon                                           Page 1




fd                        Device Driver                        fd



For  a diskette  to  be accessible  from the  COHERENT system,  a
device  file  must be  present  in directory  /dev  with the  ap-
propriate type, major  and minor device numbers, and permissions.
The command mknod creates a special file for a device.

***** Files *****

<ffddiiooccttll.hh> -- Driver command header file
/ddeevv/ffdd* -- Block-special files
/ddeevv/rrffdd* -- Character special files

***** See Also *****

device drivers, fdformat, mkfs, mknod,

***** Diagnostics *****

The driver reports  any error status received from the controller
and retries the operation  several times before it reports an er-
ror to the program that initiated an operation.

***** Notes *****

The driver  assumes that the disk is  formatted with eight, nine,
15, or 18 sectors of 512 bytes each per track, depending upon the
/ddeevv entry.  Cylinder addressing is the norm for COHERENT.

Programs that  use the raw device interface  must read whole sec-
tors into buffers that do not straddle DMA boundaries.




























COHERENT Lexicon                                           Page 2


