Host protected area

The IDENTIFY DEVICE command queries a particular register on the IDE controller to establish the size of a drive.

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.

When its operations are complete, the register read by IDENTIFY DEVICE is returned to its original fake value.

Identification of HPA on a hard drive can be achieved by a number of tools and methods:

Creation of an HPA. The diagram shows how a host protected area (HPA) is created.
  1. IDENTIFY DEVICE returns the true size of the hard drive. READ NATIVE MAX ADDRESS returns the true size of the hard drive.
  2. SET MAX ADDRESS reduces the reported size of the hard drive. READ NATIVE MAX ADDRESS returns the true size of the hard drive. An HPA has been created.
  3. IDENTIFY DEVICE returns the now fake size of the hard drive. READ NATIVE MAX ADDRESS returns the true size of the hard drive, the HPA is in existence.