diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-08-06 16:39:51 +0000 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-06 12:06:43 -0700 |
commit | 5bc086d6882a2804f19f3aba38ce9e3dd248d935 (patch) | |
tree | 581e4d9dc1027a27da6f758686aff738cfedc6c2 | |
parent | ea9a51856edb1f770f3e83c7d020c336fc2dc090 (diff) | |
download | chrome-ec-5bc086d6882a2804f19f3aba38ce9e3dd248d935.tar.gz |
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>
-rw-r--r-- | common/vboot_hash.c | 4 |
1 files 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; |