summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-02-18 11:24:28 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-18 19:34:07 +0000
commita1655accd7953f14bc70e3e35855bd563880cfd0 (patch)
treed52f3ce221aa6ce59aa1cb9389d8127b44a01792
parent2181fd187b46b771a99aa189ef7d763430a985b6 (diff)
downloadchrome-ec-a1655accd7953f14bc70e3e35855bd563880cfd0.tar.gz
common: remove unused CONFIG_SAVE_VBOOT_HASH
No boards or baseboards enable this config option. Removing this simplifies verifying efs2/vboot on the zephyr project. BRANCH=none BUG=b:164421798 TEST=make buildall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I10e81f9d3b3829dd8a07992ee805f37d88d9ea84 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2705178 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r--common/vboot_hash.c37
-rw-r--r--include/config.h6
2 files changed, 0 insertions, 43 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c
index 334b006281..5ef665fde2 100644
--- a/common/vboot_hash.c
+++ b/common/vboot_hash.c
@@ -283,21 +283,6 @@ static uint32_t get_rw_size(void)
static void vboot_hash_init(void)
{
-#ifdef CONFIG_SAVE_VBOOT_HASH
- const struct vboot_hash_tag *tag;
- int version, size;
-
- tag = (const struct vboot_hash_tag *)system_get_jump_tag(
- VBOOT_HASH_SYSJUMP_TAG, &version, &size);
- if (tag && version == VBOOT_HASH_SYSJUMP_VERSION &&
- size == sizeof(*tag)) {
- /* Already computed a hash, so don't recompute */
- CPRINTS("hash precomputed");
- hash = tag->hash;
- data_offset = tag->offset;
- data_size = tag->size;
- } else
-#endif
#ifdef CONFIG_HOSTCMD_EVENTS
/*
* Don't auto-start hash computation if we've asked the host to enter
@@ -325,28 +310,6 @@ int vboot_get_rw_hash(const uint8_t **dst)
return rv;
}
-#ifdef CONFIG_SAVE_VBOOT_HASH
-
-static int vboot_hash_preserve_state(void)
-{
- struct vboot_hash_tag tag;
-
- /* If we haven't finished our hash, nothing to save */
- if (!hash)
- return EC_SUCCESS;
-
- memcpy(tag.hash, hash, sizeof(tag.hash));
- tag.offset = data_offset;
- tag.size = data_size;
- system_add_jump_tag(VBOOT_HASH_SYSJUMP_TAG,
- VBOOT_HASH_SYSJUMP_VERSION,
- sizeof(tag), &tag);
- return EC_SUCCESS;
-}
-DECLARE_HOOK(HOOK_SYSJUMP, vboot_hash_preserve_state, HOOK_PRIO_DEFAULT);
-
-#endif
-
/**
* Returns the offset of RO or RW image if the either region is specifically
* requested otherwise return the current hash offset.
diff --git a/include/config.h b/include/config.h
index d33e11435f..dcc976789d 100644
--- a/include/config.h
+++ b/include/config.h
@@ -3416,12 +3416,6 @@
/* Storage offset of sharedobjects library. */
#undef CONFIG_SHAREDLIB_STORAGE_OFF
-/*
- * If defined, the hash module will save its last computed hash when jumping
- * between EC images.
- */
-#undef CONFIG_SAVE_VBOOT_HASH
-
/* Allow the board to use a GPIO for the SCI# signal. */
#undef CONFIG_SCI_GPIO