summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-05-27 09:06:41 -0600
committerCommit Bot <commit-bot@chromium.org>2020-06-09 16:30:58 +0000
commit15651696684fce77f2e978c03342f3fe80fc546b (patch)
tree374e5787c68709b55691f156c88682e2a142b2a2
parentc95ea3f2cb7b9aaf64d8b2d7ede13783191e0b73 (diff)
downloadvboot-15651696684fce77f2e978c03342f3fe80fc546b.tar.gz
crossystem: x86: switch to VBNV backup using flashrom instead of mosys
Previously, x86 platforms with vboot2 will backup VBNV in SPI flash using mosys, which will in turn execute flashrom to preform the underlying operation. The set of parent CLs to this commit port this functionality from mosys directly to vboot's host libraries. This CL switches to use the new functionality. (The CL to switch is provided as a separate CL for x86 only so it's an easy and clean revert should something go wrong.) BUG=chromium:1032351,chromium:1030473,chromium:789276 BRANCH=none TEST=On octupus, write VBNV using crossystem and manually inspect RW_NVRAM region in SPI flash. Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9f945dca99ebd394abea1490fa25d3763834bfa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218890 Reviewed-by: Joel Kitching <kitching@chromium.org>
-rw-r--r--host/arch/x86/lib/crossystem_arch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 00c844b4..f39d31c5 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -193,11 +193,11 @@ int vb2_write_nv_storage(struct vb2_context *ctx)
if (0 != VbCmosWrite(offs, expectsz, ctx->nvdata))
return -1;
- /* Also attempt to write using mosys if using vboot2 */
+ /* Also attempt to write using flashrom if using vboot2 */
VbSharedDataHeader *sh = VbSharedDataRead();
if (sh) {
if (sh->flags & VBSD_BOOT_FIRMWARE_VBOOT2)
- vb2_write_nv_storage_mosys(ctx);
+ vb2_write_nv_storage_flashrom(ctx);
free(sh);
}