summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-11-15 18:58:54 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-11-16 20:38:50 +0000
commitc50847e51ed0351d262b844919d67bee6372b25a (patch)
tree5bfba4ee87e26bbf77f008742a01581e079b7bd7 /src/security
parent751c496c742ad7ea0c35b138cc3bf02d6856e4b3 (diff)
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>
Diffstat (limited to 'src/security')
-rw-r--r--src/security/vboot/bootmode.c24
1 files changed, 1 insertions, 23 deletions
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
@@ -65,27 +65,6 @@ 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:
* 1. Checks if recovery mode is initiated by EC. If yes, returns
@@ -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;