summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShik Chen <shik@chromium.org>2020-06-10 07:28:27 +0000
committerShik Chen <shik@chromium.org>2020-06-10 10:27:16 +0000
commit5cd75be8d1e908adbf73edf04c903539864efab0 (patch)
treea0f8c39cfb33fc37ef7ecd222841e8da810f31de
parenta85dfbc994fd1d66c4d2fdbe0e32ea531e29eaf9 (diff)
downloadvboot-5cd75be8d1e908adbf73edf04c903539864efab0.tar.gz
Revert "crossystem: arm: switch to VBNV using flashrom from mosys"
This reverts commit 9a923c7dba003a5ddbc55937469c975689effa62. Reason for revert: https://crbug.com/1093191 Original change's description: > crossystem: arm: switch to VBNV using flashrom from mosys > > Most ARM platforms will store VBNV in SPI flash by calling out to > mosys, which in turn calls out to flashrom. > > 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 ARM only so it's an > easy and clean revert should something go wrong.) > > BUG=chromium:1032351,chromium:1030473,chromium:789276 > BRANCH=none > TEST=On scarlet, read and write VBNV using crossystem > > Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> > Change-Id: I1949522b665170ebeb35f3c46177f1957980d6a3 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218891 > Reviewed-by: Joel Kitching <kitching@chromium.org> Bug: chromium:1032351, chromium:1030473, chromium:789276 Change-Id: I3ccb6c6653e24e61072ee9227e870a2f211cd114 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2237617 Reviewed-by: Shik Chen <shik@chromium.org> Commit-Queue: Shik Chen <shik@chromium.org> Commit-Queue: Stimim Chen <stimim@chromium.org> Tested-by: Stimim Chen <stimim@chromium.org>
-rw-r--r--host/arch/arm/lib/crossystem_arch.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c
index 579be85d..43a59cf2 100644
--- a/host/arch/arm/lib/crossystem_arch.c
+++ b/host/arch/arm/lib/crossystem_arch.c
@@ -431,13 +431,11 @@ int vb2_read_nv_storage(struct vb2_context *ctx)
if (!FdtPropertyExist(FDT_NVSTORAGE_TYPE_PROP))
return vb2_read_nv_storage_disk(ctx);
media = ReadFdtString(FDT_NVSTORAGE_TYPE_PROP);
- if (!strcmp(media, "flash"))
- return vb2_read_nv_storage_flashrom(ctx);
if (!strcmp(media, "disk"))
return vb2_read_nv_storage_disk(ctx);
- if (!strcmp(media, "cros-ec"))
+ if (!strcmp(media, "cros-ec") || !strcmp(media, "mkbp") ||
+ !strcmp(media, "flash"))
return vb2_read_nv_storage_mosys(ctx);
- fprintf(stderr, "Unsupported NVRAM storage type: %s\n", media);
return -1;
}
@@ -449,13 +447,11 @@ int vb2_write_nv_storage(struct vb2_context *ctx)
if (!FdtPropertyExist(FDT_NVSTORAGE_TYPE_PROP))
return vb2_write_nv_storage_disk(ctx);
media = ReadFdtString(FDT_NVSTORAGE_TYPE_PROP);
- if (!strcmp(media, "flash"))
- return vb2_write_nv_storage_flashrom(ctx);
if (!strcmp(media, "disk"))
return vb2_write_nv_storage_disk(ctx);
- if (!strcmp(media, "cros-ec"))
+ if (!strcmp(media, "cros-ec") || !strcmp(media, "mkbp") ||
+ !strcmp(media, "flash"))
return vb2_write_nv_storage_mosys(ctx);
- fprintf(stderr, "Unsupported NVRAM storage type: %s\n", media);
return -1;
}