vboot: Add a new post code for TPM failure

If the kernel does not properly handle the TPM and send it a
TPM_SaveState command before suspend then it will not be in
the correct state on resume.  In order to easily detect this
case add a new post code for TPM failure and use it in the
vboot resume path.

BUG=chromium:371105
TEST=Build and boot on wtm2.

Change-Id: I412520b521387a8e18ad1c6f5a64b39cdd5c88ec
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/199371
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Duncan Laurie 2014-05-12 10:22:01 -07:00 committed by chrome-internal-fetch
commit ff2f0dc56c
2 changed files with 8 additions and 0 deletions

View file

@ -219,6 +219,13 @@
*/
#define POST_JUMPING_TO_PAYLOAD 0xf3
/**
* \brief TPM failure
*
* An error with the TPM, either unexepcted state or communications failure.
*/
#define POST_TPM_FAILURE 0xed
/**
* \brief Not supposed to get here
*

View file

@ -233,6 +233,7 @@ static void init_vboot(int bootmode)
#if !MOCK_TPM
printk(BIOS_ERR, "TPM: Error code 0x%x. Hard reset!\n", result);
post_code(POST_TPM_FAILURE);
hard_reset();
#endif
}