From 15651696684fce77f2e978c03342f3fe80fc546b Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Wed, 27 May 2020 09:06:41 -0600 Subject: 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 Change-Id: I9f945dca99ebd394abea1490fa25d3763834bfa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218890 Reviewed-by: Joel Kitching --- host/arch/x86/lib/crossystem_arch.c | 4 ++-- 1 file 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); } -- cgit v1.2.1