[coreboot-gerrit] Patch set updated for coreboot: 2c4bf9a vboot2: provide config option to clear dev mode state on recovery

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Apr 21 11:19:10 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9878

-gerrit

commit 2c4bf9a408cbfea4ebca2e19c998f9e60bb7b845
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Fri Mar 20 16:11:13 2015 -0700

    vboot2: provide config option to clear dev mode state on recovery
    
    On embedded devices with limited input capabilities it is necessary to
    clear the developer mode condition when entering recovery. The new
    configuration option will enable such behavior using the new vboot2
    flag.
    
    CQ-DEPEND=CL:261630
    BRANCH=storm
    BUG=chrome-os-partner:36059
    TEST=with the rest of the patches applies observed desired behavior on
         SP5
    
    Change-Id: I99c3d1330bea9980a2af3b9fd99e29ab96f2cf07
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 4c0a6315d6b4ede8d43e736ee6c82f1023f4716d
    Original-Change-Id: I8e4a521e574b53a670daf692f7b45dc21635f272
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/261620
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 src/vendorcode/google/chromeos/vboot2/Kconfig    | 9 +++++++++
 src/vendorcode/google/chromeos/vboot2/verstage.c | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/src/vendorcode/google/chromeos/vboot2/Kconfig b/src/vendorcode/google/chromeos/vboot2/Kconfig
index 20d2f1f..7ea53fd 100644
--- a/src/vendorcode/google/chromeos/vboot2/Kconfig
+++ b/src/vendorcode/google/chromeos/vboot2/Kconfig
@@ -41,3 +41,12 @@ config VBOOT_ROMSTAGE_INDEX
 	help
 	  This is the index of the romstage component in the verified
 	  firmware block.
+
+config VBOOT_DISABLE_DEV_ON_RECOVERY
+	bool "Disable dev mode on recovery requests"
+	default n
+	depends on VBOOT2_VERIFY_FIRMWARE
+	help
+	  When this option is enabled, the Chrome OS device leaves the
+	  developer mode as soon as recovery request is detected. This is
+	  handy on embedded devices with limited input capabilities.
diff --git a/src/vendorcode/google/chromeos/vboot2/verstage.c b/src/vendorcode/google/chromeos/vboot2/verstage.c
index ee57475..c62c102 100644
--- a/src/vendorcode/google/chromeos/vboot2/verstage.c
+++ b/src/vendorcode/google/chromeos/vboot2/verstage.c
@@ -247,6 +247,8 @@ void verstage_main(void)
 	if (get_recovery_mode_switch()) {
 		clear_recovery_mode_switch();
 		ctx.flags |= VB2_CONTEXT_FORCE_RECOVERY_MODE;
+		if (IS_ENABLED(CONFIG_VBOOT_DISABLE_DEV_ON_RECOVERY))
+			ctx.flags |= VB2_DISABLE_DEVELOPER_MODE;
 	}
 
 	if (IS_ENABLED(CONFIG_WIPEOUT_SUPPORTED) && get_wipeout_mode_switch())



More information about the coreboot-gerrit mailing list