diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2015-03-12 19:22:51 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-22 08:41:11 +0200 |
commit | fe4253c8598cb60653c7eaadbee7a4aec128efd3 (patch) | |
tree | 8672ec7042025cd0bb643328711743965ab13a24 /src/vendorcode | |
parent | a32b6f0b7d3f35f58d2cfefd8d28c46a80a78ef7 (diff) | |
download | coreboot-fe4253c8598cb60653c7eaadbee7a4aec128efd3.tar.xz |
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@chromium.org>
Original-Commit-Id: f70e03e9a8c55bf3c45b075ae4fecfd25da4f446
Original-Change-Id: I4c2192da4fabfdef34d527e5b80d137634eb6987
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/259843
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/9862
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r-- | src/vendorcode/google/chromeos/Kconfig | 8 | ||||
-rw-r--r-- | src/vendorcode/google/chromeos/vboot2/verstage.c | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig index fa382aee33..b3efc6cecd 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 0ce4e89246..26e7c53537 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"); |