From 5bc086d6882a2804f19f3aba38ce9e3dd248d935 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Mon, 6 Aug 2012 16:39:51 +0000 Subject: [PATCH] vboot: fix flash offset for hash CONFIG_FW_RW_OFF is already relative to the base address of the flash, we don't need to substract it. Signed-off-by: Vincent Palatin BUG=None TEST=on Snow, run with CONFIG_VBOOT and CONFIG_VBOOT_HASH activated and see the hash is correctly computed and display. Change-Id: I1643b07a59459baa973bfd7ee80cbf98963a85d4 Reviewed-on: https://gerrit.chromium.org/gerrit/29276 Reviewed-by: Vic Yang Reviewed-by: Randall Spangler Commit-Ready: Vincent Palatin Tested-by: Vincent Palatin --- common/vboot_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/vboot_hash.c b/common/vboot_hash.c index 3362917e0d..f05d1405bc 100644 --- a/common/vboot_hash.c +++ b/common/vboot_hash.c @@ -113,7 +113,7 @@ static void vboot_hash_init(void) data_size = tag->size; } else { /* Start computing the hash of firmware A */ - vboot_hash_start(CONFIG_FW_RW_OFF - CONFIG_FLASH_BASE, + vboot_hash_start(CONFIG_FW_RW_OFF, system_get_image_used(SYSTEM_IMAGE_RW), NULL, 0); } @@ -183,7 +183,7 @@ DECLARE_HOOK(HOOK_SYSJUMP, vboot_hash_preserve_state, HOOK_PRIO_DEFAULT); static int command_hash(int argc, char **argv) { - uint32_t offset = CONFIG_FW_RW_OFF - CONFIG_FLASH_BASE; + uint32_t offset = CONFIG_FW_RW_OFF; uint32_t size = CONFIG_FW_RW_SIZE; char *e;