Return to BSD News archive
Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!crcnis1.unl.edu!wupost!csus.edu!netcom.com!jmonroy
From: jmonroy@netcom.com (Jesus Monroy Jr)
Subject: FDC Flow charts #1
Message-ID: <jmonroyC62GI7.5oC@netcom.com>
Keywords: FDC flow chart logic
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
Date: Mon, 26 Apr 1993 01:08:31 GMT
Lines: 154
mail julian@jules.dialix.oz.au
flow chart #1
This posting is for the FDC & QIC-40/80 group.
What follows is the logic for the FDC through the function
calls and Macros. "Decision" logic is not included, except
where a Macro or Function was called.
Logic for What?
---------------
This is the logic for a FDC "boot-time" routines.
The OS (Operating System) passes control to the routines,
at which time they determine their availablity to the OS
and what equipment (devices) is at it's disposal.
___________________________________________________________________________
Jesus Monroy Jr jmonroy@netcom.com
/386BSD/device-drivers /fd /qic /clock /documentation
___________________________________________________________________________
+-------------
|* Boot time - funtions in order run
~~~~~~| logical and physical
|
+-------------
+-----------------+ +---------------
| | fdprobe() | | |* Probe - start here
| | | | |
| | | |~~~~~~~~~~~~~~~|
| | | | |
| | | | |
+-----------------+ +---------------
!
!
V
+-----------------+ +---------------
| | check_fdc() | | |* make sure the chip works
| | | | |
+~~| | | |~~~~~~~~~~~~~~~|
! | | | | |
! | | | | |
! +-----------------+ +---------------
! !
! !
! V
! +---------------------+ +---------------
! | | check_autoseek()| | |* is it a NS capable of
! | | | | | auto track seek after
F | | | |~~~~~~~~~~~| a read/write
A | | | | |
I | | | | |
L +---------------------+ +---------------
U !
R !
E V
! +---------------------+ +---------------
! | | check_lowpower()| | |* is it a WD or NS capable of
! | | | | | shutting the chip down
! | | | |~~~~~~~~~~~| automatically
! | | | | |
! | | | | |
! +---------------------+ +---------------
! !
+~~~~~~~+ ! +---------------
! ! |* If probe Successful
V V | call attach
---------------~~~~~~~~~~~~~~~~~| else
RETURN | contiune without fdc
TO |
OS +---------------
---------------
!
!
V
+-----------------+ +---------------
| | fd_attach() | | |* test for type of drive attached
| | | | | (fake it for now - just read
| | | |~~~~~~~~~~~~~~~| the CMOS)
| | | | |
| | | | |
+-----------------+ +---------------
!
!
V
+-----------------+ +---------------
| | rtcin() | | |* read the CMOS
| | | | |
| | ASM-MACRO | |~~~~~~~~~~~~~~~|
| | | | |
| | | | |
+-----------------+ +---------------
!
!
V
+------------------------------+
|+---------------------+ | +---------------
|| | INITStatusBits()| | | |* Initalize the status bits
|| | | |<~~+ | | for each drive
|| | C-MACRO | | ! |~~~~~~|
|| | | | T! | |
|| | | | e! | |
|+---------------------+ s! | +---------------
| ! t! |
| ! ! |
| V f! |
| +--------------+ o! | +---------------
| | | r! | |* If is works report
| | Report | ! | | the logical number and
| | | e! |~~~~~~| drive size
| | stdout(err) | a! | |
| | - -_ | c! | |
| - - - - h! | +---------------
| - - - ! |
| - - l! |
| - - o! |
| ! g! |
| ! i! |
| V c! |
|+-----------------+ a! | +---------------
|| | turnoff() | | l! | |* turn off the fd motor
|| | | | ! | |
|| | C-MACRO | |~~~~~~~+ |~~~~~~|
|| | | | | |
|| | | | | |
|+-----------------+ | +---------------
+------------------------------+
!
!
V
+-------------------------+ +---------------
| | SET_Transfer_Speed()| | |* set the tranfer speed
| | | | | for the drive
| | C-MACRO | |~~~~~~~~~~| (may cause an interrupt
| | | | |
| | | | |
+-------------------------+ +---------------
!
!
V
+-------------+
( )
( END )
+-------------+
___________________________________________________________________________
Jesus Monroy Jr jmonroy@netcom.com
/386BSD/device-drivers /fd /qic /clock /documentation
___________________________________________________________________________