summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/bootmode.h1
-rw-r--r--src/vendorcode/google/chromeos/Kconfig8
-rw-r--r--src/vendorcode/google/chromeos/vboot2/verstage.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/src/include/bootmode.h b/src/include/bootmode.h
index 55e3f5f36fb7..bad17af27d37 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 fa382aee33d5..b3efc6cecd73 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 0ce4e892467f..26e7c535376c 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");