vboot: Add vb2api_phone_recovery_enabled() to vboot API

In order to implement a kill switch for phone recovery in recovery UI,
add VB2_SECDATA_KERNEL_FLAGS to enum vb2_secdata_kernel_flags, and
add VB2_SECDATA_KERNEL_FLAG_PHONE_RECOVERY_DISABLED to the flags to
indicate whether to disable phone recovery. Set this flag to 1 in
vb2api_kernel_phase1().

Also add vb2api_phone_recovery_enabled() to vboot API.

BRANCH=none
BUG=b:146399181, b:147744345
TEST=make runtests

Change-Id: I65c8faa593f5f90dd762f0092058048983c5b3a2
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2131236
Reviewed-by: Joel Kitching <kitching@chromium.org>
9 files changed