diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-11-21 15:22:26 -0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-11-26 12:04:42 -0800 |
commit | 640b1c420748049c796b3f9d59406e38ff8f4774 (patch) | |
tree | 8430fe504b05dad2bc82baea79c767ff38310e9f /tests | |
parent | b08c46a0dad2c0eb2f8590a896bd09d3c01d43c6 (diff) | |
download | vboot-640b1c420748049c796b3f9d59406e38ff8f4774.tar.gz |
Add more recovery_reason codes
There are several places where the same recovery_reason was used to report
slightly different points of failure. Let's create some new codes instead.
Remember that recovery mode is handled by RO firmware, so if an updated RW
firmware uses one of the new error codes, pressing TAB at the recovery
screen will say "We have no idea what this means". That's not a bug. This CL
deprecates the original codes, so the fact that the RO firmware doesn't
recognize it just means it's a new code reported by a new RW BIOS.
BUG=chromium-os:36562
TEST=manual
BRANCH=parrot
Run
make && make runtests
It should pass. You can test some of the error cases on actual hardware by
using
crossystem recovery_reason=86
reboot
and pressing TAB at the recovery screen. For that example you should see the
message
recovery_reason: 0x56 TPM lock error in rewritable firmare
Change-Id: I123c781e6c6f6fe0284c4fd49f5f5a855eece7df
Reviewed-on: https://gerrit.chromium.org/gerrit/38652
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vboot_api_firmware_tests.c | 6 | ||||
-rw-r--r-- | tests/vboot_api_init_tests.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/vboot_api_firmware_tests.c b/tests/vboot_api_firmware_tests.c index 03f67b5b..e6a84ee0 100644 --- a/tests/vboot_api_firmware_tests.c +++ b/tests/vboot_api_firmware_tests.c @@ -207,7 +207,7 @@ static void VbSelectFirmwareTest(void) { ResetMocks(); mock_lf_tpm_version = 0x30005; mock_rfw_retval = TPM_E_IOERROR; - TestVbSf(VBERROR_TPM_WRITE_FIRMWARE, VBNV_RECOVERY_RO_TPM_ERROR, + TestVbSf(VBERROR_TPM_WRITE_FIRMWARE, VBNV_RECOVERY_RO_TPM_W_ERROR, "TPM version update failure"); /* If no change to TPM version, RollbackFirmwareWrite() not called */ @@ -221,7 +221,7 @@ static void VbSelectFirmwareTest(void) { /* Check errors from SetTPMBootModeState() */ ResetMocks(); mock_stbms_retval = TPM_E_IOERROR; - TestVbSf(VBERROR_TPM_SET_BOOT_MODE_STATE, VBNV_RECOVERY_RO_TPM_ERROR, + TestVbSf(VBERROR_TPM_SET_BOOT_MODE_STATE, VBNV_RECOVERY_RO_TPM_U_ERROR, "TPM set boot mode state failure"); ResetMocks(); mock_stbms_retval = TPM_E_IOERROR; @@ -231,7 +231,7 @@ static void VbSelectFirmwareTest(void) { /* Handle RollbackFirmwareLock() errors */ ResetMocks(); mock_rfl_retval = TPM_E_IOERROR; - TestVbSf(VBERROR_TPM_LOCK_FIRMWARE, VBNV_RECOVERY_RO_TPM_ERROR, + TestVbSf(VBERROR_TPM_LOCK_FIRMWARE, VBNV_RECOVERY_RO_TPM_L_ERROR, "TPM lock firmware failure"); } diff --git a/tests/vboot_api_init_tests.c b/tests/vboot_api_init_tests.c index c10e7d08..dd6daee4 100644 --- a/tests/vboot_api_init_tests.c +++ b/tests/vboot_api_init_tests.c @@ -327,7 +327,7 @@ static void VbInitTestTPM(void) { ResetMocks(); mock_rfs_retval = TPM_E_IOERROR; mock_tpm_version = 0x20002; - TestVbInit(VBERROR_TPM_FIRMWARE_SETUP, VBNV_RECOVERY_RO_TPM_ERROR, + TestVbInit(VBERROR_TPM_FIRMWARE_SETUP, VBNV_RECOVERY_RO_TPM_S_ERROR, "Rollback TPM setup error - not in recovery"); TEST_EQ(shared->fw_version_tpm, 0, " shared fw_version_tpm not set"); ResetMocks(); |