diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-02-04 14:59:21 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-02-05 10:08:05 -0800 |
commit | 5cfcab54375c93fec3f04cd1cb76ea2f5beaaf97 (patch) | |
tree | b1e1c67b7075eb9f11840ed7707d513346e0d5b4 /firmware | |
parent | 29accd980a68940de72de3611aca37986f53d792 (diff) | |
download | vboot-5cfcab54375c93fec3f04cd1cb76ea2f5beaaf97.tar.gz |
Add VbExEcGetExpectedRWHash()
This is used by vboot to retrieve the precomputed hash of the expected
EC image, which requires reading less data from EEPROM than getting
the entire EC image.
BUG=chrome-os-partner:17606
BRANCH=spring
TEST=none; just a new API not used yet
Change-Id: I226643144280acabba147d345ef1f83a77a91fbc
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42566
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/include/vboot_api.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index d91db7d8..31e91a7b 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -105,7 +105,11 @@ enum VbErrorPredefined_t { /* Need VGA and don't have it, or vice-versa */ VBERROR_VGA_OPROM_MISMATCH = 0x10021, /* Need EC to reboot to read-only code */ - VBERROR_EC_REBOOT_TO_RO_REQUIRED = 0x10022 + VBERROR_EC_REBOOT_TO_RO_REQUIRED = 0x10022, + + /* VbExEcGetExpectedRWHash() may return the following codes */ + /* Compute expected RW hash from the EC image; BIOS doesn't have it */ + VBERROR_EC_GET_EXPECTED_HASH_FROM_IMAGE = 0x20000, }; @@ -755,6 +759,13 @@ VbError_t VbExEcGetExpectedRW(enum VbSelectFirmware_t select, const uint8_t **image, int *image_size); /** + * 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); + +/** * Update the EC rewritable image. */ VbError_t VbExEcUpdateRW(const uint8_t *image, int image_size); |