From c50847e51ed0351d262b844919d67bee6372b25a Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Fri, 15 Nov 2019 18:58:54 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/36863 Reviewed-by: Patrick Georgi Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/security/vboot/bootmode.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src') diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c index bc89e732cf..0cab0c8559 100644 --- a/src/security/vboot/bootmode.c +++ b/src/security/vboot/bootmode.c @@ -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; -- cgit v1.2.3