diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-02-04 15:00:09 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-02-06 17:38:03 -0800 |
commit | 5ca4ea087a3d67c2a639e8b9254f51f076bf85fa (patch) | |
tree | bd5de84d148b867c9cb342815bb2cf858c45557b /firmware/stub | |
parent | 9a8e79cc2642381b24078b5ebb2dff7558f10c62 (diff) | |
download | vboot-5ca4ea087a3d67c2a639e8b9254f51f076bf85fa.tar.gz |
EC software sync uses precomputed hash if available
This removes the need to load the EC code at all when the precomputed
hash matches.
BUG=chrome-os-partner:17606
BRANCH=spring
TEST=wouldn't that be nice
Change-Id: If4438b9db8b1449b8fd4d90ef3acb3bbec5e09a0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42567
Diffstat (limited to 'firmware/stub')
-rw-r--r-- | firmware/stub/vboot_api_stub.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c index 8521db0e..dd0d5d4b 100644 --- a/firmware/stub/vboot_api_stub.c +++ b/firmware/stub/vboot_api_stub.c @@ -181,6 +181,19 @@ VbError_t VbExEcGetExpectedRW(enum VbSelectFirmware_t select, return VBERROR_SUCCESS; } +/** + * Read the SHA-256 hash of the expected contents of the EC image associated + * with the main firmware specified by the "select" argument. + */ +VbError_t VbExEcGetExpectedRWHash(enum VbSelectFirmware_t select, + const uint8_t **hash, int *hash_size) { + static const uint8_t fake_hash[32] = {1, 2, 3, 4}; + + *hash = fake_hash; + *hash_size = sizeof(fake_hash); + return VBERROR_SUCCESS; +} + VbError_t VbExEcUpdateRW(const uint8_t *image, int image_size) { return VBERROR_SUCCESS; } |