summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2018-02-26 17:01:24 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-03-07 16:55:15 -0800
commita80a79f9f5ca0250eb31330d9dfdacf3a250efb0 (patch)
tree8a3bba693db4514e8a8ae5649b94e4c0b7b94605 /firmware/include
parent7bb45097af1e8b5f2bcf8e7a8bc6557c6505693b (diff)
downloadvboot-a80a79f9f5ca0250eb31330d9dfdacf3a250efb0.tar.gz
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
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/vboot_struct.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index 6036dc8f..fd5777a2 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -246,6 +246,8 @@ typedef struct VbKernelPreambleHeader {
#define VBSD_NOFAIL_BOOT 0x00040000
/* VbInit() was told that the EC firmware supports EFS */
#define VBSD_EC_EFS 0x00080000
+/* NvStorage uses 64-byte record, not 16-byte */
+#define VBSD_NVDATA_V2 0x00100000
/*
* Supported flags by header version. It's ok to add new flags while keeping