Host Protected Area - How IT Works

How It Works

The IDE controller has registers that contain data that can be queried using ATA commands. The data returned gives information about the drive attached to the controller. There are three ATA commands involved in creating and using a hidden protected area. The commands are:

  • IDENTIFY DEVICE
  • SET MAX ADDRESS
  • READ NATIVE MAX ADDRESS

Operating systems use the IDENTIFY DEVICE command to find out the addressable space of a hard drive. The IDENTIFY DEVICE command queries a particular register on the IDE controller to establish the size of a drive.

This register however can be changed using the SET MAX ADDRESS ATA command. If the value in the register is set to less than the actual hard drive size then effectively a host protected area is created. It is protected because the OS will work with only the value in the register that is returned by the IDENTIFY DEVICE command and thus will normally be unable to address the parts of the drive that lie within the HPA.

The HPA is useful only if other software or firmware (e.g. BIOS) is able to use it. Software and firmware that are able to use the HPA are referred to as 'HPA aware'. The ATA command that these entities use is called READ NATIVE MAX ADDRESS. This command accesses a register that contains the true size of the hard drive. To use the area, the controlling HPA-aware program changes the value of the register read by IDENTIFY DEVICE to that found in the register read by READ NATIVE MAX ADDRESS. When its operations are complete, the register read by IDENTIFY DEVICE is returned to its original fake value.

Read more about this topic:  Host Protected Area

Famous quotes containing the word works:

    Reason, the prized reality, the Law, is apprehended, now and then, for a serene and profound moment, amidst the hubbub of cares and works which have no direct bearing on it;Mis then lost, for months or years, and again found, for an interval, to be lost again. If we compute it in time, we may, in fifty years, have half a dozen reasonable hours.
    Ralph Waldo Emerson (1803–1882)