There are a few concepts that are applicable to what you are asking about. The TPM is a "core root of trust" for reporting and storage. In the Trusted Computing Group (TCG--the organization that maintains the standard for the TPM) specification for PC Client Implementation for BIOS, the BIOS bootstrap code is the core root of trust for measurement.
The BIOS bootstrap code measures itself (generally, by means of a cryptographic hash), and then the rest of the BIOS code and configuration. This measurement chain is carried through to the boot sector of the hard drive (or whatever other boot device is used). As these measurements are taken, they are extended into Platform Configuration Registers (PCRs) held in the TPM. With the exception of that BIOS bootstrap code, all code is measured, and the PCRs are irreversibly extended (until next boot), before the code is allowed to run. This system should ensure that any modification for the code running on the system should be reflected in a different set of PCR values.
The TPM also secure's keys and key material. When these keys are secured by the TPM, it can be specified that they should not be made available unless the PCRs have some specified set of values. This key material can be used by drive encryption software. There are a handful of different drive encryption systems that have been engineered to use the TPM in this way, and they all operate slightly differently. You'll need to investigate those systems to see how they use the key or key material from the TPM for drive encryption.
As for documentation, you can check out the TPM specification and the PC Client specification from the TCG. Microsoft uses Bitlocker. You can also check out this system, which uses LUKS, the TPM, and TrustedGrub for Linux drive encryption.