• No results found

The ST412/506 Interface

In the very beginning there were no hard disk drives for PCs and, as a result, no inbuilt BIOS support for them. Hard disks had been available to mainframe and minicomputer systems for many years prior to this time, so it was not long before this technology was targeted at the new Personal Computer. It initially came in the form of a separate cabinet which contained the hard disk drive itself, the disk controller electronics, and an internal power supply. In addition, an 8 bit host adaptor expansion cardwould be fitted inside the PC in a spare expansion slot, and this would be connected by cables to the disk controller in the cabinet. The controller in turn was connected to the hard disk drive (see Fig. 5.13).

Hard disks such as these became known asWinchester Drives.The term seems to have been taken from an old IBM drive of the 1960s which had 30 Mbyte of fixed storage and an option for a further 30 Mbyte of removable storage. This drive was informally known as the “30-30” and from this name came an association with the calibre (.30) and the number of grains of black powder (30) used by the famous “30- 30” Remington rifle, otherwise known as the “Winchester”. The term “Winchester” soon came to signify any fixed disk for the PC.

There were no INT 13h BIOS functions for the PC at this time, so special-purpose software had to be provided. The host adaptor in the expansion slot would be addressed by this special software, through which would be sent appropriate commands to the disk controller. The disk controller would then transfer the required data to and from the hard disk itself.

A system typical of the time was the Seagate ST-506, introduced in 1980, which had a formatted capacity of just 5 Mbyte. At Fig. 5.14 is shown part of its specification (Seagate, 1991a). It may be noted that it used MFM encoding, had a stepper type actuator, 153 cylinders, 4 heads and 17 sectors per track. This gave it a capacity of 153 × 4 × 17 × 512 = 5,326,848 bytes. The ST-506 design incorporated a very well defined interface between the disk drive and the controller.

Introduced about a year later, its successor, the Seagate ST-412 (Seagate, 1991b), had a 10 Mbyte capacity and a slightly modified interface which added a “buffered seeks” facility. It was these two, now obsolete, systems that contributed their interface specifications and their combined names to what became thede factostandard for connecting hard disk drives to controllers in the early 1980s: theST412/506 Interface.

PC special software Disk controller Hard disk drive 5–10 MB Seagate ST412/506 Host adaptor expansion card

Fig. 5.13 ST412/506 hard disk drives.

UNFORMATTED CAPACITY (MB) ________________6.38 FORMATTED CAPACITY (17 SECTORS) (MB) _____5.0 ACTUATOR TYPE ____________________________STEPPER TRACKS ___________________________________612 CYLINDERS ________________________________153 HEADS ____________________________________4 DISCS ____________________________________2 MEDIA TYPE _______________________________OXIDE RECORDING METHOD _________________________MFM TRANSFER RATE (mbits/sec) ________________5.0 INTERFACE ________________________________ST506

Fig. 5.14 Part of the ST-506 specification (with kind permission of Seagate Technology).

In the ST412/506 design, up to two disk drives could be connected to the controller by a single 34 line control cable and separate 20 line data cables for each drive. None of the intelligence was in the drives, which responded to very simple control signals from the controller, such as: switch the head assembly to move in a particular direction, step the head assembly one step, select a particular head and so forth. The control program for all of these actions was held in the controller itself, which was also responsible for interpreting all commands from the PC, encoding and decoding read and write serial data to and from the drive, transferring 8 bit bytes to and from the PC, generating and identifying address marks and other formatting information, and similar housekeeping activities. At the PC interface the commands to the controller, sent by the special software referred to above, were the forerunners of the INT 13h BIOS functions, such as: read a sector, write a sector, format a track and seek to a specific cylinder.

In 1983, when theIBM XT(eXtended Technology) became available, with its built- in 10 Mbyte fixed disk, some of these ideas were seen to have evolved further. First of all, the disk controller35had been removed from the disk drive box and built right onto a bus interface expansion card, thus doing away with the host adaptor expansion card. Further, program code had been provided on a ROM chip on the controller card itself which supplemented the standard BIOS functions and obviated the need for the special software to be installed. The design utilized interrupt request line 5 (IRQ 5), I/O port addresses 320h to 32fh anddirect memory accesschannel 3 (DMA 3). From an earlier section, we may recall that the IRQ channel permits a hardware interrupt to be raised by the connected device, in this case the hard disk controller. Such an interrupt will cause the processor to suspend temporarily its current activity and execute code designed to service the device raising the interrupt. In addition, we may recall that the port addresses are the outlets through which commands and data are sent to and received from hardware devices, and the DMA channel permits a hardware device to send and receive data autonomously from the PC’s memory without involving the processor.

In 1984, the introduction of theIBM AT(Advanced Technology) saw a complete overhaul of the hard disk system. The PC command interface to the controller was now incorporated into the ROM BIOS on the motherboard of the PC as standard INT 13h functions (today known as the INT 13hlegacyfunctions), thus removing the need for a separate ROM BIOS chip on the controller card. Disk drive parameters as well as other motherboard configuration details were held in a low-powerComple- mentary Metal Oxide Silicon(CMOS) RAM chip that was used by the real-time clock and backed up by a small battery. Some 14 different disk types were initially recog- nized, ranging from 10 to 112 Mbyte capacity. Any drive with physical parameters which did not match one of the 14 had to be incorporated either by means of a ROM extension on the disk controller card or by using special device driver software loaded at boot time. The AT design for hard disks utilized interrupt request line 14 (IRQ 14) and I/O port addresses 1f0h to 1f8h, but did not use a direct memory access channel at all. This was because the DMA controller and the buses to which it was

35 These were often called WD1003 controllers after a Western Digital design of that name. See Western Digital (undated a).

connected were found to be too slow for efficient disk data transfers and so programmed input output(PIO) was used instead. In this approach, the processor carries out all the transfer activity itself by means of IN and OUT instructions and no autonomous transfers take place.

This is broadly the hard disk system structure that we have today. The number of supported disk types has expanded considerably and current BIOSes provide a user- definable type which allows parameters to be set to match any drive. Most BIOSes now have an autoconfiguration mode which enables the drive to be interrogated by the BIOS and to provide its own parameter information at boot time, a facility that became standardized when the AT Attachment (ATA) specifications were implemented.