From b46faa6af781a4b71a2f1f77d9daebc24a3e27f3 Mon Sep 17 00:00:00 2001 From: Shamile Khan Date: Fri, 29 May 2015 15:56:59 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/276305 Reviewed-by: Shawn N --- common/vboot_hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common/vboot_hash.c') 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); } -- cgit v1.2.1