Learn about the technologies behind the Internet with The TCP/IP Guide!|
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
|View over 750 of my fine art photos any time for free at DesktopScenes.com!|
Extended CHS (ECHS) / Large Mode
Extended CHS, also called ECHS or large mode in some BIOSes, uses BIOS translation to get around the 504 MiB size barrier inherent in standard CHS mode. It's kind of amusing to realize this, but the BIOS translation that is usually used to get around the 504 MiB barrier is not a great innovation of any sort. In fact, it's basically a hack. :^) It's a trick that is employed to get around a problem.
The idea behind translation is as follows. Recall that the 504 MiB barrier is a combination of the limitations of the IDE/ATA standard and the BIOS Int 13h routines, due to the different limits they place on the numbers of cylinders, heads and sectors allowed for a drive. This table shows how the 504 MiB barrier comes about:
As you can see, the IDE/ATA standard allows for many more cylinders than the BIOS does, and the BIOS allows for many more heads than IDE/ATA does. (In practice, no IDE/ATA hard disk ever specifies more than 63 logical sectors--despite the theoretical limit of 256--for the exact reason that the BIOS's limit is 63. If they did go over 63, this would confuse matters even more). Again, remember that these are logical disk parameters, not physical ones.
BIOS translation works by having the BIOS act as a "middleman" of sorts between the IDE/ATA hard disk and the standard BIOS Int 13h, and by taking advantage of the fact that one standard allows more heads than the other but fewer cylinders. The BIOS takes the logical geometry that the hard disk specifies according to the IDE/ATA standard, and translates it into an equivalent geometry that will "fit" into the maximums allowed by the BIOS Int 13h standard. This is done by dividing the number of logical cylinders by an integer, and then multiplying the number of logical heads by the same number. The technique is sometimes called bit shift translation (since the multiplication and division is done by shifting the cylinder and head bits).
This is hard to understand, so here is an example (you may find referring to the table immediately below helpful when reading this). Let's take the case of a 3.1 GB Western Digital Caviar hard drive, AC33100. This drive actually has a capacity of 2.95 binary GB, and logical geometry of 6,136 cylinders, 16 heads and 63 sectors. This is well within the bounds of the IDE/ATA limitations, but exceeds the BIOS limit of 1,024 cylinders. The BIOS picks a translation factor such that dividing the logical number of cylinders by this number will produce a number of cylinders below 1,024. Usually one of 2, 4, 8, or 16 are selected; in this case the optimal number is 8. The BIOS then divides the number of cylinders by 8 and multiplies the number of heads by 8. This results in a translated geometry of 767 cylinders, 128 heads and 63 sectors. The capacity is of course unchanged, and the new geometry fits quite nicely into the BIOS limits:
The BIOS presents the translated geometry to the operating system and application, and as far as basically every piece of software in the PC is concerned, the hard disk really has 767 cylinders, 128 heads and 63 sectors. Whenever the operating system or an application wants to use BIOS Int13h calls, they use this geometry. The BIOS, when it executes its disk access routines, translates back to the real logical geometry used by the hard disk before sending its request to the disk. The result is that everyone is happy, and there is a minor amount of extra work for the BIOS to do, but not very much.
Extended CHS or large mode are important to understand, but in practice are not that frequently used. Instead, LBA mode is more popular; it is similar in concept but does the translation differently. It is described in the next section.