summaryrefslogtreecommitdiff
path: root/tests/vboot_api_kernel3_tests.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-09-20 11:18:08 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-02-14 16:27:41 +0000
commita7548035646e9ed6e4164ba9d37d65c7914ae1d9 (patch)
tree7ab6b1df62c1b5c9483aa3a1a6ef4f7f70a4d2a5 /tests/vboot_api_kernel3_tests.c
parent462a3cadc717201345bd8f74cb7018cd4e60c3e5 (diff)
downloadvboot-a7548035646e9ed6e4164ba9d37d65c7914ae1d9.tar.gz
It's possible for the AP to get updated and remove the RO-normal flag without needing to update EC-RW firmware - for example, if it only needs to update the BIOS. In this case, the EC doesn't need update, but does need to jump to its RW firmware. But if the EC is already booted RO-normal with jump disabled, it will refuse that request and go to recovery mode. The fix is simply to check if the request to jump to RW requires the EC to cold-boot first, and pass through that error code to the caller. BUG=chrome-os-partner:22617 BRANCH=none (affects all platforms, but only in this odd case, and this is a change to the RW portion of the code) TEST=pass new unit test which triggers this condition Orig-Change-Id: Ia8d64dff784a9135ef23f6eb26bbca4ad9df57c3 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/170168 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> (cherry picked from commit bbc76063294f4b9fcca6b581d9831595d840a1a3) Change-Id: Ib4f3ca230d7247b28e639fcd3434445b7d5a7530 Reviewed-on: https://chromium-review.googlesource.com/185962 Commit-Queue: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'tests/vboot_api_kernel3_tests.c')
-rw-r--r--tests/vboot_api_kernel3_tests.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/vboot_api_kernel3_tests.c b/tests/vboot_api_kernel3_tests.c
index cefbf416..49bc7aad 100644
--- a/tests/vboot_api_kernel3_tests.c
+++ b/tests/vboot_api_kernel3_tests.c
@@ -340,6 +340,11 @@ static void VbSoftwareSyncTest(void)
VBNV_RECOVERY_EC_JUMP_RW, "Jump to RW fail");
ResetMocks();
+ run_retval = VBERROR_EC_REBOOT_TO_RO_REQUIRED;
+ test_ssync(VBERROR_EC_REBOOT_TO_RO_REQUIRED,
+ 0, "Jump to RW fail because locked");
+
+ ResetMocks();
protect_retval = VBERROR_SIMULATED;
test_ssync(VBERROR_SIMULATED,
VBNV_RECOVERY_EC_PROTECT, "Protect error");