diff options
author | Joel Kitching <kitching@google.com> | 2020-02-13 18:01:42 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-14 11:51:37 +0000 |
commit | 19788a7d88397e2d9df3881c39a9111f365fa3cf (patch) | |
tree | 8bfe45d1a07cb5134c10ca2d37b82637fe461079 /firmware/lib/vboot_api_kernel.c | |
parent | 8cb57f3498f00cf599be8acc54e272896237ec85 (diff) | |
download | vboot-19788a7d88397e2d9df3881c39a9111f365fa3cf.tar.gz |
vboot: use VB2_SD_FLAG_KERNEL_SIGNED
Use vboot2 variant VB2_SD_FLAG_KERNEL_SIGNED instead of
vboot1 VBSD flag VBSD_KERNEL_KEY_VERIFIED. Export the
flag back to vboot1 at the end of VBSLK.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ie7516195b95a9ef2ca254616c9486991b1a418fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2053181
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware/lib/vboot_api_kernel.c')
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index 36bac6ed..822f1cbe 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -428,6 +428,10 @@ vb2_error_t VbSelectAndLoadKernel(struct vb2_context *ctx, if (rv == VB2_SUCCESS) vb2_kernel_fill_kparams(ctx, kparams); + /* Translate vboot2 flags and fields into vboot1. */ + if (sd->flags & VB2_SD_FLAG_KERNEL_SIGNED) + sd->vbsd->flags |= VBSD_KERNEL_KEY_VERIFIED; + /* Commit data, but retain any previous errors */ call_rv = vb2_commit_data(ctx); if (rv == VB2_SUCCESS) |