From bab5fdecb72d8a7f38c25067c62e224036952524 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Fri, 20 Mar 2015 15:18:37 -0700 Subject: vboot2: ignore physical dev switch in case virtual mode is configured It is better to explicitly disable the call to read the physical switch setting than to leave it up to implementation. In fact no implementation would be even required. BRANCH=none BUG=none TEST=verified that storm works as expected Change-Id: I4b39827dba34ec0124960d0634e45d4554252d9b Signed-off-by: Patrick Georgi Original-Commit-Id: c9fd014f1bfec6570b20ed8fed16d14d7e4e11b9 Original-Change-Id: I5d6d223f0c684e105a5e3d0b407e0fb181c7a7df Original-Signed-off-by: Vadim Bendebury Original-Reviewed-on: https://chromium-review.googlesource.com/261588 Original-Reviewed-by: Julius Werner Reviewed-on: http://review.coreboot.org/9876 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/vendorcode/google/chromeos/vboot2/verstage.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/vendorcode') diff --git a/src/vendorcode/google/chromeos/vboot2/verstage.c b/src/vendorcode/google/chromeos/vboot2/verstage.c index 26e7c53537..ee574751a0 100644 --- a/src/vendorcode/google/chromeos/vboot2/verstage.c +++ b/src/vendorcode/google/chromeos/vboot2/verstage.c @@ -240,16 +240,17 @@ void verstage_main(void) antirollback_read_space_firmware(&ctx); timestamp_add_now(TS_END_TPMINIT); - if (get_developer_mode_switch()) + if (!IS_ENABLED(CONFIG_VIRTUAL_DEV_SWITCH) && + get_developer_mode_switch()) ctx.flags |= VB2_CONTEXT_FORCE_DEVELOPER_MODE; + if (get_recovery_mode_switch()) { clear_recovery_mode_switch(); ctx.flags |= VB2_CONTEXT_FORCE_RECOVERY_MODE; } -#if IS_ENABLED(CONFIG_WIPEOUT_SUPPORTED) - if (get_wipeout_mode_switch()) + + if (IS_ENABLED(CONFIG_WIPEOUT_SUPPORTED) && get_wipeout_mode_switch()) ctx.flags |= VB2_CONTEXT_FORCE_WIPEOUT_MODE; -#endif /* Do early init (set up secdata and NVRAM, load GBB) */ printk(BIOS_INFO, "Phase 1\n"); -- cgit v1.2.3