vboot: remove vboot_possibly_executed function

vboot_possibly_executed previously provided some better
compile-time code elimination, before CB:32716 made
vboot_logic_executed capable of that directly.

BUG=b:124141368,
TEST=make clean && make test-abuild
BRANCH=none

Change-Id: If5ca8f03c51e1ced20e1215b1cfdde54da3d001f
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36863
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Joel Kitching 2019-11-15 18:58:54 +08:00 committed by Patrick Georgi
parent 751c496c74
commit c50847e51e
1 changed files with 1 additions and 23 deletions

View File

@ -64,27 +64,6 @@ static void vboot_clear_recovery_reason_vbnv(void *unused)
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT,
vboot_clear_recovery_reason_vbnv, NULL);
/*
* Returns 1 if vboot is being used and currently in a stage which might have
* already executed vboot verification.
*/
static int vboot_possibly_executed(void)
{
if (CONFIG(VBOOT_STARTS_IN_BOOTBLOCK)) {
if (ENV_BOOTBLOCK && CONFIG(VBOOT_SEPARATE_VERSTAGE))
return 0;
return 1;
}
if (CONFIG(VBOOT_STARTS_IN_ROMSTAGE)) {
if (ENV_BOOTBLOCK)
return 0;
return 1;
}
return 0;
}
/*
* vb2_check_recovery_request looks up different components to identify if there
* is a recovery request and returns appropriate reason code:
@ -113,8 +92,7 @@ int vboot_check_recovery_request(void)
* Identify if vboot verification is already complete and no slot
* was selected i.e. recovery path was requested.
*/
if (vboot_possibly_executed() && vboot_logic_executed() &&
!vboot_is_slot_selected())
if (vboot_logic_executed() && !vboot_is_slot_selected())
return vboot_get_recovery_reason_shared_data();
return 0;