summaryrefslogtreecommitdiff
path: root/common/vboot_hash.c
diff options
context:
space:
mode:
authorShamile Khan <shamile.khan@intel.com>2015-05-29 15:56:59 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-16 04:25:52 +0000
commitb46faa6af781a4b71a2f1f77d9daebc24a3e27f3 (patch)
tree93eb137ee7db681bdc6bd26887e0c246c749633c /common/vboot_hash.c
parent65adf18a635898c6cb88b9a5d73d9d644ef453b2 (diff)
downloadchrome-ec-b46faa6af781a4b71a2f1f77d9daebc24a3e27f3.tar.gz
mec1322: Compute hash for RW image by using the RW image resident in flash.
BUG=chrome-os-partner:41063 TEST=Enable Software Sync in Coreboot and Depthcharge. Enable hash computation in EC. Compile EC followed by Coreboot and program Coreboot followed by EC on a Cyan system. System should boot to Chrome Login Screen. BRANCH=none Change-Id: I4b53e9e55e4da279366eb1283a11a010c52b865f Signed-off-by: Shamile Khan <shamile.khan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/276305 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'common/vboot_hash.c')
-rw-r--r--common/vboot_hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c
index b19931b1ab..1d203e77f9 100644
--- a/common/vboot_hash.c
+++ b/common/vboot_hash.c
@@ -217,7 +217,7 @@ static void vboot_hash_init(void)
#endif
{
/* Start computing the hash of RW firmware */
- vboot_hash_start(CONFIG_RW_MEM_OFF,
+ vboot_hash_start(CONFIG_RW_STORAGE_OFF,
system_get_image_used(SYSTEM_IMAGE_RW),
NULL, 0);
}
@@ -251,7 +251,7 @@ DECLARE_HOOK(HOOK_SYSJUMP, vboot_hash_preserve_state, HOOK_PRIO_DEFAULT);
#ifdef CONFIG_CMD_HASH
static int command_hash(int argc, char **argv)
{
- uint32_t offset = CONFIG_RW_MEM_OFF;
+ uint32_t offset = CONFIG_RW_STORAGE_OFF;
uint32_t size = CONFIG_RW_SIZE;
char *e;
@@ -277,12 +277,12 @@ static int command_hash(int argc, char **argv)
return EC_SUCCESS;
} else if (!strcasecmp(argv[1], "rw")) {
return vboot_hash_start(
- CONFIG_RW_MEM_OFF,
+ CONFIG_RW_STORAGE_OFF,
system_get_image_used(SYSTEM_IMAGE_RW),
NULL, 0);
} else if (!strcasecmp(argv[1], "ro")) {
return vboot_hash_start(
- CONFIG_RO_MEM_OFF,
+ CONFIG_RO_STORAGE_OFF,
system_get_image_used(SYSTEM_IMAGE_RO),
NULL, 0);
}
@@ -354,10 +354,10 @@ static int host_start_hash(const struct ec_params_vboot_hash *p)
/* Handle special offset values */
if (offset == EC_VBOOT_HASH_OFFSET_RO) {
- offset = CONFIG_RO_MEM_OFF;
+ offset = CONFIG_RO_STORAGE_OFF;
size = system_get_image_used(SYSTEM_IMAGE_RO);
} else if (p->offset == EC_VBOOT_HASH_OFFSET_RW) {
- offset = CONFIG_RW_MEM_OFF;
+ offset = CONFIG_RW_STORAGE_OFF;
size = system_get_image_used(SYSTEM_IMAGE_RW);
}