B.2. Access Modes

Addressing data blocks can be done in multiple ways. The older ways (CHS, ECHS) operate in terms of physical disk properties (geometry). The second system for addressing blocks (LBA) has been an option in almost every disk drive since 1996 [53].

[Note]Note

Later we'll see the problems caused by the radically different and conflicting way the ATA/Int 13h standards are defined.

B.2.1. CHS Addressing

In the beginning data on disk drives was addressed by describing the physical geometry of the disk using a combination of its distance from the center of the disk (track), its rotation around the disk (sector), and the read-write head which accesses its side of the platter. This addressing system is called Cylinder-Head-Sector (CHS) [54] . This method of access was provided via a BIOS service commonly referred to as Int 13h. While this system was quite straightforward, it provided no abstraction between the physical location of data and the act of requesting data from the drive. To read/write data you simply called Int 13h and specified the physical cylinder, head, and sector on the disk drive of what you were requesting. It began breaking down when drive capacities exceeded what the standards at the time were capable of describing. You can think of this like running out of telephone numbers.

One way this was addressed was through the Int 13h Extensions. The original Int 13h system used 24 bits for addressing data, the extensions bumped that number up to 64 bits. To put that into perspective, the maximum addressable range of data went from 8.46 GB up to 9,400,000,000,000 GB [55] .

At the same time this was happening, technology was advancing to the point where it was becoming logically impossible to represent the physical drive geometry to the BIOS in a way compatible with the ATA/Int 13h systems [56] . To work around this, disk drives began reporting their Logical Geometry to the BIOS. In this way only the disk drive knows it's actual physical (CHS) geometry. Access requests from the BIOS are translated internally on the hard disk controller into actual physical disk geometry. A disk's logical geometry will have a number of sectors approximately equal to, but never more than, the physical number of sectors on the disk. The reported logical geometry fits within the limits of the ATA standard, but not necessarily (most often not) within the limits of the Int 13h standard.

B.2.2. LBA Addressing

Up to this point we've been discussing addressing modes based on the properties of the physical disk drive. Now the discussion will transition to the modern Logical Block Addressing.

Another important thing that happened was the introduction of geometry translation at the BIOS level. This is an addressing mode which the BIOS will enable that translates the logical drive geometry [57] into CHS tuples compatible with the Int 13h system. This addressing mode is often called Extended CHS, or Large mode [58] .

In LBA mode there is an abstraction between the operating system and the devices where the data is stored. Using LBA the operating system accesses data by unique identifiers. Each block is addressed by a simple identifier which increases sequentially. This system requires that all involved components are LBA aware: the disk drive controller, the BIOS, and the operating system.

Eventually disk drive capacities exceeded the maximum addressable range defined in original ATA-1 standard. In 2002 the T13 group released the ATA-6 standard [59] which introduced 48b addressing. This increased the maximum addressable capacity to 128PiB.



[54] PC Guide - Cylinder-Head-Sector: http://www.pcguide.com/ref/hdd/geom/geom.htm

[56] Zoned Bit Recording (PC Guide: http://www.pcguide.com/ref/hdd/geom/tracks_ZBR.htm) is an example of something logically impossible to represent with Int 13h

[57] Recall: this logical geometry has already been translated once to fit ATA standards for the BIOS by the disk controller

[59] INCITS 361-2002 (1410D): AT Attachment - 6 with Packet Interface (ATA/ATAPI - 6): http://www.t13.org/documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf