1024 Cylinder Limit, How Windows NT Gets Drive Geometry

Last reviewed: December 29, 1997
Article ID: Q98080
The information in this article applies to:
  • Microsoft Windows NT operating system version 3.1
  • Microsoft Windows NT Advanced Server version 3.1
  • Microsoft Windows NT Workstation versions 3.5, 3.51, and 4.0
  • Microsoft Windows NT Server versions 3.5, 3.51, and 4.0

SUMMARY

Windows NT can take advantage of hard drives with more than 1024 cylinders if your computer hardware permits. While Windows NT does not have an internal limit to the number of cylinders it can address, there are some hardware configurations where Windows NT must contend with a 10 bit (1024 cylinder) limitation, imposed by the supporting hardware (the hard drive controller or system BIOS in most cases).

The following section describes how the ATDISK driver determines drive geometry. Other hard disk drivers are not included here, as the 1024 cylinder 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 of cylinders, heads, and sectors per track) so that Windows NT can write structures in the file system boot sectors, information such as partition table entries in the MBR (master boot record) and the BPB (BIOS parameter block). Although Windows NT does not actually use CHS values in either of these structures, WinDisk and Format (respectively) must write them so that MS-DOS can understand the disk structures Windows NT creates.

ATDISK supports up to two hard drive controllers and up to two disks per controller. Drive geometry information is available in the drive parameter table in the BIOS. The BIOS may consist of more than one component (system ROM and an option ROM on a disk controller, for example). The BIOS typically keeps information on the first two disks in a system.

There are a couple of ways to get the geometry information from the drive parameter tables. The first (which Windows NT does not use except in a special case noted later) is to read the CMOS locations defined for computers that contain a drive type for the first and second disk in the system. A drive type is used as an index into the drive parameter table to point to an entry that describes disks of that type. In addition, the BIOS typically keeps two vectors that point to the two geometry entries for the first two disks as a bit of housekeeping to keep from having to read CMOS and index into the table.

Because Interrupt 13H uses CHS addressing and only defines 10 bits for the cylinder count, only 1024 cylinders can be addressed. Because larger disks may have more than 1024 cylinders, there are several drive translation algorithms that increase the other two parameters to reduce the cylinder count. The most common one is called head doubling. The number of heads are doubled and the number of cylinders are halved. These translated or logical parameters are called "apparent geometry." The physical geometry is called "actual geometry." A drive parameter table has reserved areas for the apparent geometry. These fields are valid only if the high bit of the vendor signature is set in the driver parameter table entry. (Compaq and Ultrastor use this mechanism for describing translation.)

On some systems (IBM PS/1s and ValuePoints for example), the drive parameter table is not available. On these systems, Windows NT relies on Interrupt 13H function 8H, GetDriveParameter, information collected during the boot process by NTDETECT.COM (executed by NTLDR). If this information is available, it is used for both the apparent and actual parameters.

If neither drive parameter tables nor Interrupt 13H information is available (which is typically the case with disks attached to second and subsequent controllers), then ATDISK calls the IDENTIFY command to ask the disk directly what its parameters are. In these cases the IDENTIFY data is used for both actual and apparent geometry. IDENTIFY data is the last choice for geometry information, as it describes the raw disk. Often disk controllers translate parameters; for example, they might use spare sector pooling (for hot-fixing) or reserve the last cylinder for diagnostics and configuration information. (Both IBM and Compaq do this.)

Compaq has defined special CMOS locations for the third and fourth disk in Compaq systems. Although this special code is in Windows NT drivers, Compaq is the only company known to do this.

The Registry contains information describing disks serviced by the ATDISK driver. The path is as follows:

   HKEY_LOCAL_MACHINE\hardware\devicemap\atdisk\<controller#>\<disk#>

The vendor identification from the IDENTIFY command, the geometry parameters, and the apparent and actual geometry are available.


Additional query words: prodnt
Keywords : ntfilesys kbother
Version : 3.1
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.