diff options
author | Randall Spangler <rspangler@chromium.org> | 2018-01-02 12:32:16 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-09 14:14:16 -0800 |
commit | 39427240693b31942f89385d3b01083fea1b0678 (patch) | |
tree | e1a8dad5e269bd8f6b1530ab307841b486957b47 /firmware/2lib | |
parent | 46b7e0dae409ad83797a0b2feff314417bbb7b1c (diff) | |
download | vboot-39427240693b31942f89385d3b01083fea1b0678.tar.gz |
ec_sync: Use vboot2 context instead of cparams
Copy sync-related flags from cparams / vboot1 shared data to the
equivalent vboot2 structs. This removes the need for ec_sync to
access the old structs, which are on their way out.
No change in functionality.
BUG=chromium:611535
BRANCH=none
TEST=make -j runtests; build bob firmware and boot it
Change-Id: I50ee76cf275a7fba894c2ec2c3dd83b9a8d91b53
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/852489
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'firmware/2lib')
-rw-r--r-- | firmware/2lib/include/2api.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index 21865783..97b5cca6 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -118,7 +118,10 @@ enum vb2_context_flags { */ VB2_CONTEXT_ALLOW_KERNEL_ROLL_FORWARD = (1 << 11), - /* Boot optimistically: don't touch failure counters */ + /* + * Boot optimistically: don't touch failure counters. Caller may set + * this flag when initializing the context. + */ VB2_CONTEXT_NOFAIL_BOOT = (1 << 12), /* @@ -130,8 +133,37 @@ enum vb2_context_flags { */ VB2_CONTEXT_SECDATA_WANTS_REBOOT = (1 << 13), - /* Boot is S3->S0 resume, not S5->S0 normal boot */ + /* + * Boot is S3->S0 resume, not S5->S0 normal boot. Caller may set this + * flag when initializing the context. + */ VB2_CONTEXT_S3_RESUME = (1 << 14), + + /* + * System supports EC software sync. Caller may set this flag at any + * time before calling VbSelectAndLoadKernel(). + */ + VB2_CONTEXT_EC_SYNC_SUPPORTED = (1 << 15), + + /* + * EC software sync is slow to update; warning screen should be + * displayed. Caller may set this flag at any time before calling + * VbSelectAndLoadKernel(). + */ + VB2_CONTEXT_EC_SYNC_SLOW = (1 << 16), + + /* + * EC firmware supports early firmware selection; two EC images exist, + * and EC may have already verified and jumped to EC-RW prior to EC + * software sync. + */ + VB2_CONTEXT_EC_EFS = (1 << 17), + + /* + * Software write protect for the RO firmware was enabled at boot. + * Caller may set this flag when initializing the context. + */ + VB2_CONTEXT_SW_WP_ENABLED = (1 << 18), }; /* |