[coreboot-gerrit] Patch set updated for coreboot: 0f4a629 vboot: when configured, pass the wipeout request to vboot

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Apr 21 11:18:23 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/9862

-gerrit

commit 0f4a6290cebb9e07cb914647ce1ab451d015dd7a
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Thu Mar 12 19:22:51 2015 -0700

    vboot: when configured, pass the wipeout request to vboot
    
    It has become necessary to be able to "factory reset" certain devices
    on firmware request.
    
    The vboot package has been modified to provide the necessary API, this
    patch introduces a configuration option and uses the API when
    enabled.
    
    CQ-DEPEND=CL:259857
    BRANCH=storm
    BUG=chrome-os-partner:37219
    TEST=with all the patches applied, on storm, holding the recovery
         button at startup for 10 seconds, causes 'crossystem
         wipeout_request' to report '1'.
    
    Change-Id: I5e57bc05af3753f451626021ba30c7726badb7b4
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: f70e03e9a8c55bf3c45b075ae4fecfd25da4f446
    Original-Change-Id: I4c2192da4fabfdef34d527e5b80d137634eb6987
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/259843
    Original-Reviewed-by: David Hendricks <dhendrix at chromium.org>
---
 src/include/bootmode.h                           | 1 +
 src/vendorcode/google/chromeos/Kconfig           | 8 ++++++++
 src/vendorcode/google/chromeos/vboot2/verstage.c | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/src/include/bootmode.h b/src/include/bootmode.h
index 55e3f5f..bad17af 100644
--- a/src/include/bootmode.h
+++ b/src/include/bootmode.h
@@ -26,6 +26,7 @@ int get_write_protect_state(void);
 int get_developer_mode_switch(void);
 int get_recovery_mode_switch(void);
 int clear_recovery_mode_switch(void);
+int get_wipeout_mode_switch(void);
 
 
 int gfx_get_init_done(void);
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index fa382ae..b3efc6c 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -166,6 +166,14 @@ config PHYSICAL_REC_SWITCH
 	help
 	  Whether this platform has a physical recovery switch
 
+config WIPEOUT_SUPPORTED
+	bool "User is able to request factory reset"
+	default n
+	help
+	  When this option is enabled, the firmware provides the ability to
+	  signal the application the need for factory reset (a.k.a. wipe
+	  out) of the device
+
 source src/vendorcode/google/chromeos/vboot1/Kconfig
 source src/vendorcode/google/chromeos/vboot2/Kconfig
 
diff --git a/src/vendorcode/google/chromeos/vboot2/verstage.c b/src/vendorcode/google/chromeos/vboot2/verstage.c
index 0ce4e89..26e7c53 100644
--- a/src/vendorcode/google/chromeos/vboot2/verstage.c
+++ b/src/vendorcode/google/chromeos/vboot2/verstage.c
@@ -246,6 +246,10 @@ void verstage_main(void)
 		clear_recovery_mode_switch();
 		ctx.flags |= VB2_CONTEXT_FORCE_RECOVERY_MODE;
 	}
+#if IS_ENABLED(CONFIG_WIPEOUT_SUPPORTED)
+	if (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");



More information about the coreboot-gerrit mailing list