summaryrefslogtreecommitdiff
path: root/common/vboot_hash.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-24 09:14:43 -0700
committerGerrit <chrome-bot@google.com>2012-07-24 15:55:31 -0700
commit319d433d6864945c19103f0a779467f66d599c67 (patch)
tree05586e006318dfc71f9a712120864e4d39cdc7c2 /common/vboot_hash.c
parent187ea8f4eaee59efd0d3c636dfb2fc108e11d7f6 (diff)
downloadchrome-ec-319d433d6864945c19103f0a779467f66d599c67.tar.gz
Calculate the hash only of the actual RW code
No need to hash a bunch of 0xff's at the end. We explicitly set a 0xea byte after the end of the code in firmware_image.lds.S. BUG=chrome-os-partner:11087 TEST=look for the hash start line in the EC debug output: [0.011543 hash start 0x00014000 0x00011590] The second number is the code size. It should be the same size as ec.RW.bin, instead of 0x14000. Change-Id: Ibc94851dc1a09eb46cad46bb97dc5762f9c521f0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28300
Diffstat (limited to 'common/vboot_hash.c')
-rw-r--r--common/vboot_hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c
index c8afce6efe..49e3e4797b 100644
--- a/common/vboot_hash.c
+++ b/common/vboot_hash.c
@@ -114,7 +114,8 @@ static void vboot_hash_init(void)
} else {
/* Start computing the hash of firmware A */
vboot_hash_start(CONFIG_FW_RW_OFF - CONFIG_FLASH_BASE,
- CONFIG_FW_RW_SIZE, NULL, 0);
+ system_get_image_used(SYSTEM_IMAGE_RW),
+ NULL, 0);
}
}