Files
OpenCellular/host
Randall Spangler a80a79f9f5 2lib: Add support for 64-byte nvstorage record
The calling firmware can set ctx->flags VB2_CONTEXT_NVDATA_V2 to tell
vboot that nvdata is a 64-byte record instead of a 16-byte record, or
equivalently, set the VBSD_NVDATA_V2 flag if calling the old vboot1
API.

If calling firmware does not (which is the current coreboot and
depthcharge default), then the 16-byte record is used, and V2 fields
return explicit default values.

Added the fw_max_rollforward V2 field, which defaults to 0xfffffffe on
V1.  This will be used by a subsequent CL.

Added unit tests to verify all that.

Added crossystem support, though it will only work with the current
16-byte records until firmware sets the VBSD flag and mosys supports
larger records.

(Note that because coreboot/depthcharge do not yet set the new context
flag, this CL should not change ToT firmware behavior.)

See go/vboot-nvstorage for design doc.

BUG=chromium:789276
BRANCH=none
TEST=make runtests

Change-Id: I43072ef153dfa016c051f560892af1fbb3508e3a
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/942031
2018-03-07 16:55:15 -08:00
..