mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
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>
Here's what's what in the firmware/ directory. include/ lib/ These are the original structures and APIs used in the earliest Chromebooks and continuing through 2014. It never had a version as such to begin with, but we now refer to this implementation as "vboot1" or "vboot version 1.0". linktest/ stub/ These are stubs used to link the vboot1 libraries into host-side test executables so we can run some tests on the build machine instead of a Chromebook. 2lib/ In 2014 we began work on a new vboot API. The first step was just a refactoring and renaming of the verification API. The public functions and external headers that are exported for use by the Chrome OS firmware (or anything else that wants to use vboot) live in here. The internal structures and implementations go elsewhere. lib20/ This is an early implementation of the public (2lib/) API. It is binary-compatible with vboot1, so although the interface details are different, any existing on-device structures or signatures created by the vboot1 tools can be validated using this implementation. This was deployed slightly before it was ready. That's not a problem, thanks to the binary compatibility, but this directory will be abandoned Real Soon Now, except for the product support branches. lib21/ This is where the current development of the second-generation vboot API is taking place. It uses the public (2lib/) API, but will NOT be binary compatible with vboot1 structs. Because of the early release of the lib20 stuff, we're actually calling this lib21.