*BSD News Article 14328


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!decwrl!netcomsv!netcom.com!jmonroy
From: jmonroy@netcom.com (Jesus Monroy Jr)
Subject: IMPROVEMENTS to the boot block -- idea
Message-ID: <jmonroyC5BGsM.IMB@netcom.com>
Keywords: boot block FDC  
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
Date: Sun, 11 Apr 1993 11:19:34 GMT
Lines: 57

                IMPROVEMENTS TO THE BOOT BLOCK
                ------------------------------
 
        I am about to add to /sys/i386/isa/stand/fdbootblk.c,
        but first I need as many thoughts on this as I can get
        from you. Don't be afraid to pass this on.
        I also want to finish the QIC driver before the 0.2 release
        of 386bsd.
 
        This is the idea I have on how to boot the OS in a
        single floppy disk load.
 
        The way it works is this:
 
                After the FDC does a transfer, it leaves the results
        register pointing to the next logical sector.  Said in a
        different manner, what happens is that after it terminates
        a read/write, the sector number gets incremented. If the
        drive is at the end of the track, it sets the sector number
        to 1 and the head to 1.  If the drive is at the end of a
        cylinder, then the cylinder count gets incremented by 1,
        the head value gets complemented, and the sector number
        goes to 1.
 
        Here is a snip from the 1981 NEC data guide for the uPD765:
 
 
    MT  HD  final sector transferred to processor   C    H    R    N
  +---+---+---------------------------------------+----+----+----+----+
  | 1 | 0 |      less than EOT                    | NC | NC | R+1| NC |
  | 1 | 0 |      equal to EOT                     | NC |LSB | R=1| NC |
  | 1 | 1 |      less than EOT                    | NC | NC | R+1| NC |
  | 1 | 1 |      equal to EOT                     |C+1 |LSB | R=1| NC |
  +---+---+---------------------------------------+----+----+----+----+
 
        MT  - Multi-Track Mode
        HD  - Head Requested
        C   - Cylinder Returned
        H   - Head Returned
        R   - Sector Returned
        N   - Number of Data Bytes
        NC  - No Change
        LSB - Least Significant Bit of H Complemented
 
 
        It is a trick, but I can almost guarantee that it will
        work in all cases.
 
        The trick now will be to store the results as the next
        request in transfer.  That is, the results will be the
        parameters feed to the next read request of the FDC.
___________________________________________________________________________
Jesus Monroy Jr                                          jmonroy@netcom.com
/386BSD/device-drivers /fd /qic /clock /documentation
___________________________________________________________________________