diff options
-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); |