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 <vpalatin@chromium.org>

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 <victoryang@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Vincent Palatin
2012-08-06 16:39:51 +00:00
committed by Gerrit
parent ea9a51856e
commit 5bc086d688

View File

@@ -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;