Windows NT can take advantage of hard drives with more than 1024cylinders if your computer hardware permits. While Windows NT does nothave an internal limit to the number of cylinders it can address,there are some hardware configurations where Windows NT must contendwith a 10 bit (1024 cylinder) limitation, imposed by the supportinghardware (the hard drive controller or system BIOS in most cases).
The following section describes how the ATDISK driver determines drivegeometry. Other hard disk drivers are not included here, as the 1024cylinder limitation usually doesn't apply. The other drivers,including SCSI disk drivers, use absolute block addressing.
How the ATDISK Driver Determines Drive Geometry
All hard disk drivers report drive geometry (CHS or number ofcylinders, heads, and sectors per track) so that Windows NT can writestructures in the file system boot sectors, information such aspartition table entries in the MBR (master boot record) and the BPB(BIOS parameter block). Although Windows NT does not actually use CHSvalues in either of these structures, WinDisk and Format(respectively) must write them so that MS-DOS can understand the diskstructures Windows NT creates.
ATDISK supports up to two hard drive controllers and up to two disksper controller. Drive geometry information is available in the driveparameter table in the BIOS. The BIOS may consist of more than onecomponent (system ROM and an option ROM on a disk controller, forexample). The BIOS typically keeps information on the first two disksin a system.
There are a couple of ways to get the geometry information from thedrive parameter tables. The first (which Windows NT does not useexcept in a special case noted later) is to read the CMOS locationsdefined for computers that contain a drive type for the first andsecond disk in the system. A drive type is used as an index into thedrive parameter table to point to an entry that describes disks ofthat type. In addition, the BIOS typically keeps two vectors thatpoint to the two geometry entries for the first two disks as a bit ofhousekeeping to keep from having to read CMOS and index into thetable.
Because Interrupt 13H uses CHS addressing and only defines 10 bits forthe cylinder count, only 1024 cylinders can be addressed. Becauselarger disks may have more than 1024 cylinders, there are severaldrive translation algorithms that increase the other two parameters toreduce the cylinder count. The most common one is called headdoubling. The number of heads are doubled and the number of cylindersare halved. These translated or logical parameters are called"apparent geometry." The physical geometry is called "actualgeometry." A drive parameter table has reserved areas for the apparentgeometry. These fields are valid only if the high bit of the vendorsignature is set in the driver parameter table entry. (Compaq andUltrastor use this mechanism for describing translation.)
On some systems (IBM PS/1s and ValuePoints for example), the driveparameter table is not available. On these systems, Windows NT relieson Interrupt 13H function 8H, GetDriveParameter, informationcollected during the boot process by NTDETECT.COM (executed by NTLDR).If this information is available, it is used for both the apparentand actual parameters.
If neither drive parameter tables nor Interrupt 13H information isavailable (which is typically the case with disks attached to secondand subsequent controllers), then ATDISK calls the IDENTIFY command toask the disk directly what its parameters are. In these cases theIDENTIFY data is used for both actual and apparent geometry. IDENTIFYdata is the last choice for geometry information, as it describes theraw disk. Often disk controllers translate parameters; for example,they might use spare sector pooling (for hot-fixing) or reserve thelast cylinder for diagnostics and configuration information. (Both IBMand Compaq do this.)
Compaq has defined special CMOS locations for the third and fourthdisk in Compaq systems. Although this special code is in Windows NTdrivers, Compaq is the only company known to do this.
The Registry contains information describing disks serviced by theATDISK driver. The path is as follows:
The vendor identification from the IDENTIFY command, the geometryparameters, and the apparent and actual geometry are available.