diff options
author | Randall Spangler <rspangler@chromium.org> | 2017-10-20 12:38:40 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-17 20:18:19 -0800 |
commit | 4aaaeca130a701a06cb898d9a17eddf67daa3617 (patch) | |
tree | 1f656152480b06b1c62589282249058d58702f88 /utility | |
parent | 6014de9844835472b821d8ca61909a0ed6930dfe (diff) | |
download | vboot-4aaaeca130a701a06cb898d9a17eddf67daa3617.tar.gz |
nvstorage: Add kernel max rollforward NV storage field
This just adds the kernel_max_rollforward field to the nvstorage
libraries and crossystem. The firmware does not use it yet; that's
coming in a subsequent CL.
16 of the fields's 32 bits are taken from unused bytes of the kernel
field. This has no effect on existing usage.
BUG=chromium:783997
BRANCH=none
TEST=make runtests
Also manual testing. In a root shell:
crossystem kernel_max_rollforward --> Should default to 0
crossystem kernel_max_rollforward=0xfffffffe
crossystem kernel_max_rollforward --> Should be 0xfffffffe
(Note that setting it to 0xffffffff is indistinguishable from the
-1 value that the crossystem library uses to indicate error, so
0xffffffff isn't actually usable as a max rollforward limit. But
0xfffffffe is, and if we ever get so close to the limit that we
need to use 0xffffffff, something has already gone horribly wrong
with our versioning strategy...)
Change-Id: I008f412e6ed3c0b59beb9881268585af69d1ff2e
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/765572
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r-- | utility/crossystem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utility/crossystem.c b/utility/crossystem.c index 62e8a921..911d585d 100644 --- a/utility/crossystem.c +++ b/utility/crossystem.c @@ -70,7 +70,9 @@ const Param sys_param_list[] = { {"fw_prev_result", IS_STRING, "Firmware result of previous boot (vboot2)"}, {"hwid", IS_STRING, "Hardware ID"}, {"inside_vm", 0, "Running in a VM?"}, - {"kern_nv", 0, "Non-volatile field for kernel use", "0x%08x"}, + {"kern_nv", 0, "Non-volatile field for kernel use", "0x%04x"}, + {"kernel_max_rollforward", CAN_WRITE, "Max kernel version to store into TPM", + "0x%08x"}, {"kernkey_vfy", IS_STRING, "Type of verification done on kernel key block"}, {"loc_idx", CAN_WRITE, "Localization index for firmware screens (writable)"}, {"mainfw_act", IS_STRING, "Active main firmware"}, |