diff options
author | Randall Spangler <rspangler@chromium.org> | 2014-09-23 12:20:31 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-04 00:59:48 +0000 |
commit | 782300d093a2fbf2ca24e446fb6d65f9f28e56a6 (patch) | |
tree | 07e711928061b4b1c19845ca6bb17f4992ae5487 /tests/vb2_nvstorage_tests.c | |
parent | 80872dbffcb2e0079bfe095d770ccc6c8bd5fd7a (diff) | |
download | vboot-782300d093a2fbf2ca24e446fb6d65f9f28e56a6.tar.gz |
vboot2: Add previously tried slot and result to NV storage
This gives recovery mode information on two boots back instead of one,
which may be handy for debugging.
It also allows determining whether a failure of the current boot
should try the other slot or go to recovery, using only information
stored in NV storage.
Added crossystem support for printing the fields, and unit tests.
BUG=chrome-os-partner:32585
BRANCH=none
TEST=make runtests; VBOOT2=1 make runtests
Change-Id: Ia9f4186210d30217b902db7c513ae4ab8851f8f4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221230
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'tests/vb2_nvstorage_tests.c')
-rw-r--r-- | tests/vb2_nvstorage_tests.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/vb2_nvstorage_tests.c b/tests/vb2_nvstorage_tests.c index b648ca95..46547f8f 100644 --- a/tests/vb2_nvstorage_tests.c +++ b/tests/vb2_nvstorage_tests.c @@ -34,6 +34,8 @@ static struct nv_field nvfields[] = { {VB2_NV_TRY_COUNT, 0, 6, 15, "try B count"}, {VB2_NV_FW_TRIED, 0, 1, 0, "firmware tried"}, {VB2_NV_FW_RESULT, 0, 1, 2, "firmware result"}, + {VB2_NV_FW_PREV_TRIED, 0, 1, 0, "firmware prev tried"}, + {VB2_NV_FW_PREV_RESULT, 0, 1, 3, "firmware prev result"}, {VB2_NV_RECOVERY_REQUEST, 0, 0x42, 0xED, "recovery request"}, {VB2_NV_RECOVERY_SUBCODE, 0, 0x56, 0xAC, "recovery subcode"}, {VB2_NV_LOCALIZATION_INDEX, 0, 0x69, 0xB0, "localization index"}, |