diff options
author | Joel Kitching <kitching@google.com> | 2020-01-20 10:55:28 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-21 12:54:54 +0000 |
commit | f5367d598a985520a8c935f68ac90d295c7b8d8e (patch) | |
tree | c32c50ae6994e39f3976ea13f929784776c2dc5a /firmware/lib/vboot_ui.c | |
parent | e6d3c638095ea8c4cc050ad42c1f439e79b6b641 (diff) | |
download | vboot-f5367d598a985520a8c935f68ac90d295c7b8d8e.tar.gz |
vboot: translate recovery reason info from vboot 2->1
Recovery reason should be passed into vboot kernel verification
API using vboot 2 data structures. Upon arrival, translate to
vboot 1 data structures for legacy purposes.
Also switch to using vboot 2 recovery_reason field in other parts
of vboot code.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ic590db46d57ffbd8829f8f3ad784ea46184ceabc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2008534
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'firmware/lib/vboot_ui.c')
-rw-r--r-- | firmware/lib/vboot_ui.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c index d584ac8b..2c99884f 100644 --- a/firmware/lib/vboot_ui.c +++ b/firmware/lib/vboot_ui.c @@ -794,9 +794,8 @@ static vb2_error_t recovery_ui(struct vb2_context *ctx) * reboot to workaround a boot hiccup. */ VB2_DEBUG("VbBootRecovery() saving recovery reason (%#x)\n", - shared->recovery_reason); - vb2_nv_set(ctx, VB2_NV_RECOVERY_SUBCODE, - shared->recovery_reason); + sd->recovery_reason); + vb2_nv_set(ctx, VB2_NV_RECOVERY_SUBCODE, sd->recovery_reason); /* * Non-manual recovery mode is meant to be left via three-finger |