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>
(cherry picked from commit 7b50512ccf17f1a0f138c2ef2bb5d3984e0e89de)
Reviewed-on: https://chromium-review.googlesource.com/270004
Reviewed-by: Patrick Sosinski <sosinski@google.com>
Commit-Queue: Patrick Sosinski <sosinski@google.com>
Tested-by: Patrick Sosinski <sosinski@google.com>
9 files changed