summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-03-12 18:58:13 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-13 21:36:25 +0000
commit7b50512ccf17f1a0f138c2ef2bb5d3984e0e89de (patch)
tree3886256032cfbe154a5fc6726240a88f0a9ca411 /host
parentd574f070c52f913790dd0c69b178de3dbeac3078 (diff)
downloadvboot-7b50512ccf17f1a0f138c2ef2bb5d3984e0e89de.tar.gz
vboot: allow firmware to signal a wipeout request
It has become necessary to be able to "factory reset" certain devices on firmware request. The best mechanism for this is NVRAM, as the request needs to be detected very early in the boot process, before other means of communications with the upper layers are available. A previously unused NVRAM bit (bit 0x08 at offset zero) is taken for this purpose. A new flag is introduced to allow the firmware to signal the need to assert this bit. A new variable name/parameter ('wipeout_request') added to crossystem to provide user space access to the setting of the dedicated NVRAM bit. 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: If1f6f061ce5b3f357b92aaa74cb129671dc30446 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/259857 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/lib/crossystem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 43dcc2a4..1eef737b 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -496,6 +496,8 @@ int VbGetSystemPropertyInt(const char* name) {
value = VbGetNvStorage(VBNV_OPROM_NEEDED);
} else if (!strcasecmp(name,"recovery_subcode")) {
value = VbGetNvStorage(VBNV_RECOVERY_SUBCODE);
+ } else if (!strcasecmp(name,"wipeout_request")) {
+ value = VbGetNvStorage(VBNV_FW_REQ_WIPEOUT);
}
/* Other parameters */
else if (!strcasecmp(name,"cros_debug")) {