aboutsummaryrefslogtreecommitdiff
path: root/src/security/vboot/bootmode.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-05-17 14:26:01 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-05-20 12:48:19 +0000
commit7576bd7f4299a3af220a7ba3d6c4928812c2982b (patch)
treea73993f9b448d8aed23ad2fe006b5a999af1cddf /src/security/vboot/bootmode.c
parentfc46ad8a8b99fbfaf5f2e9112abbb26221c1aeff (diff)
vboot: save whether developer mode is enabled
Save whether or not vboot has selected developer mode as a flag in vboot_working_data. Other coreboot code may access this flag without needing to consult vboot_handoff (which is in the process of being deprecated). BUG=b:124141368, b:124192753 TEST=make clean && make test-abuild BRANCH=none Change-Id: Ieb6ac4937c943aea78ddc762595a05387d2b8114 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32843 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/vboot/bootmode.c')
-rw-r--r--src/security/vboot/bootmode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c
index e6e53b6f33..68749f008b 100644
--- a/src/security/vboot/bootmode.c
+++ b/src/security/vboot/bootmode.c
@@ -164,10 +164,8 @@ int vboot_recovery_mode_memory_retrain(void)
int vboot_developer_mode_enabled(void)
{
- if (cbmem_possibly_online() && vboot_handoff_check_developer_flag())
- return 1;
-
- return 0;
+ return cbmem_possibly_online() &&
+ vboot_get_working_data()->flags & VBOOT_WD_FLAG_DEVELOPER_MODE;
}
#if CONFIG(VBOOT_NO_BOARD_SUPPORT)