Hardware Reference
In-Depth Information
(usingATAcommands).Thespecificcommandsattheselevelsaredifferent,butbothsup-
port CHS and LBA modes. Figure 7.12 illustrates the two interface levels.
Figure 7.12 The relationship between BIOS and physical sector addressing. (In this figure, L-CHS stands
for Logical CHS, and P-CHS stands for Physical CHS.)
When the operating system talks to the BIOS to read or write sectors, it issues commands
via software interrupt (not the same as an IRQ) INT13h, which is how the BIOS sub-
routines for disk access are called. Various INT13h subfunctions allow sectors to be read
orwrittenusingeitherCHSorLBAaddressing.TheBIOSroutinesthenconverttheBIOS
commands into ATA hardware-level commands, which are sent over the bus I/O ports to
the drive controller. Commands at the ATA hardware level can also use either CHS or
LBA addressing, although the limitations are different. Whether your BIOS and drive use
CHS or LBA addressing depends on the drive capacity, age of the BIOS and drive, BIOS
Setup settings used, and operating system used.
CHS Limitations (the 528MB Barrier)
The original BIOS-based driver for hard disks is accessed via software interrupt 13h
(13 hex) and offers functions for reading and writing drives at the sector level. Standard
INT13h functions require that a particular sector be addressed by its cylinder, head, and
sector location—otherwise known as CHS addressing . This interface is used by the op-
erating system and low-level disk utilities to access the drive. IBM originally wrote the
INT13hinterfacefortheBIOSonthePCXTharddiskcontrollerin1983,andin1984the
company incorporated it into the AT motherboard BIOS. This interface used numbers to
define the particular cylinder, head, and sector being addressed. Table 7.17 , which shows
the standard INT13h BIOS CHS parameter limits, includes the maximum values for these
numbers.
Table 7.17 INT13h BIOS CHS Parameter Limits
 
 
Search WWH ::




Custom Search