diff options
author | Hsin-Te Yuan <yuanhsinte@google.com> | 2022-06-23 18:37:45 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-28 12:59:30 +0000 |
commit | 57eb6ea8e8ebf6ecb859815ef15b962a38803bd2 (patch) | |
tree | c243a33c6955e83081a3b858e6cdd92d37a1e149 /firmware/2lib/include/2api.h | |
parent | 9867ce3ed708b3b89f4f547e263a87c8b34cc945 (diff) | |
download | vboot-57eb6ea8e8ebf6ecb859815ef15b962a38803bd2.tar.gz |
2kernel: Add vb2api_kernel_phase2 and vb2api_normal_bootfirmware-chameleon-14947.Bfirmware-14947.B
Extract the middle part of VbSelectAndLoadKernel as vb2api_kernel_phase2
and call it from VbSelectAndLoadKernel. Also, remove vb2_nv_init in
VbSelectAndLoadKernel. Furthermore, publicize vb2_normal_boot as
vb2api_normal_boot in preparation for moving the content of
VbSelectAndLoadKernel to depthcharge. Besides, when NO_BOOT is set,
manual recovery should be disallowed (unless
VB2_GBB_FLAG_FORCE_MANUAL_RECOVERY is set). Therefore, print the NO_BOOT
debug log only for the broken screen case.
BUG=b:172339016
BRANCH=none
TEST=make runtests
Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com>
Change-Id: I4dc5ee4fb80ecc8c24a992a489c3bf6fe267046d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3720975
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2api.h')
-rw-r--r-- | firmware/2lib/include/2api.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index bd0d14ed..6db87b6a 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -512,7 +512,8 @@ enum vb2_pcr_digest { * use to verify kernel data - the recovery key from the GBB, or the * kernel subkey from the firmware verification stage. * - * Kernel phase 2 is finding loading, and verifying the kernel partition. + * Call vb2api_kernel_phase2(). Do EC and auxfw software sync, clear + * recovery and commit nvdata if needed. * * Find a boot device (you're on your own here). * @@ -818,6 +819,24 @@ vb2_error_t vb2api_get_pcr_digest(struct vb2_context *ctx, vb2_error_t vb2api_kernel_phase1(struct vb2_context *ctx); /** + * Do kernel verification. + * + * Must be called after vb2api_kernel_phase1. + * + * @param ctx Vboot context + * @return VB2_SUCCESS, or error code on error. + */ +vb2_error_t vb2api_kernel_phase2(struct vb2_context *ctx); + +/** + * Handle a normal boot. + * + * @param ctx Vboot context. + * @return VB2_SUCCESS, or error code on error. + */ +vb2_error_t vb2api_normal_boot(struct vb2_context *ctx); + +/** * Finalize for kernel verification stage. * * Handle NO_BOOT flag. |