Hardware Reference
In-Depth Information
leaving the sector count unchanged. The power of 2 used depends on the cylinder count, as indicated
in Table 7.20 .
Here is an example of CHS bit-shift translation:
Click here to view code image
Bit-shift
P-CHS L-CHS
Parameters Parameters
----------------------------------------------
Cylinders 8,000 1,000
Heads 16 128
Sectors/Track 63 63
==============================================
Total Sectors 8,064,000 8,064,000
----------------------------------------------
Total Bytes 4,128,768,000 4,128,768,000
Megabytes (MB) 4,129 4,129
Mebibytes (MiB) 3,938 3,938
Gigabytes (GB) 4.13 4.13
Gibibytes (GiB) 3.85 3.85
This example shows a drive with 8,000 cylinders and 16 heads. The physical cylinder count is way
above the BIOS limit of 1,024, so if CHS bit-shift translation is selected in the BIOS Setup, the BIOS
then divides the cylinder count by 2, 4, 8, or 16 to bring it below 1,024. In this case, it would divide
by 8, which results in a new logical cylinder count of 1,000—which is below the 1,024 maximum.
Because the cylinder count is divided by 8, the head count is then multiplied by the same number,
resulting in 128 logical heads, which is also below the limit the BIOS can handle.
So, although the drive reports having 8,000 cylinders and 16 heads, the BIOS and all software
(including the operating system) instead see the drive as having 1,000 cylinders and 128 heads. Note
that the 63 sectors/track figure is simply carried over without change. The result is that by using the
logical parameters, the BIOS can see the entire 4.13GB drive and won't be limited to just the first
528MB.
When you install a drive, you don't have to perform the translation math to convert the cylinders and
heads; the BIOS does that for you automatically. All you have to do is allow the BIOS to autodetect
the P-CHS parameters and then enable the translation in the BIOS Setup. Selecting Large or ECHS
translation in the BIOS Setup enables the CHS bit-shift. The BIOS does the rest of the work for you.
CHS bit-shift is a simple and fast (code-wise) scheme that can work with all drives, but unfortunately
it can't properly translate all theoretically possible drive geometries for drives under 8.4GB. To
solve this, an addendum was added to the ATA-2 specification to specifically require drives to
report certain ranges of geometries to allow bit-shift translation to work. Thus, all drives that
conform to the ATA-2 specification (or higher) can be translated using this method.
The 2.1GB and 4.2GB Barriers
Some BIOSs incorrectly allocated only 12 bits for the P-CHS cylinder field, thereby allowing a
maximum of 4,096 cylinders. Combined with the standard 16-head and 63-sector limits, this resulted
in the inability to support any drives over 2.1GB in capacity. Fortunately, this BIOS defect affected
only a limited number of systems with BIOS dates prior to about mid-1996.
Even so, some problems still existed with bit-shift translation. Because of the way DOS and
Windows 9x/Me were written, they could not properly handle a drive with 256 heads. This was a
 
 
 
Search WWH ::




Custom Search