diff options
author | Reka Norman <rekanorman@chromium.org> | 2022-09-08 11:04:10 +1000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-09-12 12:45:35 +0000 |
commit | 5004e930532245339cf1165dcdff40b5f1824d1d (patch) | |
tree | 5caf8a812241cbfc952304d0f0b997ef7404fc95 /src/drivers | |
parent | b4b85ebf606b61e4d78aec0742d0652654049717 (diff) |
Revert "drivers/mrc_cache: Don't compute checksum if TPM hash is used"
This reverts commit f83b7d494e3ceb6bec11027ae5f21999ee5ad196.
It turns out we have tests which use `futility validate_rec_mrc` to
validate the MRC cache, which includes verifying the data checksum.
Revert this to allow the tests to pass while we figure out how to fix
this.
BUG=b:245277259, b:242667207
TEST=None
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Change-Id: Id913d00584444c21cb94668bdc96f4de51af7cee
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67432
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/mrc_cache/mrc_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c index b2d2e4b618..473d78c9a2 100644 --- a/src/drivers/mrc_cache/mrc_cache.c +++ b/src/drivers/mrc_cache/mrc_cache.c @@ -693,10 +693,10 @@ int mrc_cache_stash_data(int type, uint32_t version, const void *data, .signature = MRC_DATA_SIGNATURE, .data_size = size, .version = version, + .data_checksum = compute_ip_checksum(data, size), }; - if (!CONFIG(MRC_SAVE_HASH_IN_TPM)) - md.data_checksum = compute_ip_checksum(data, size); - md.header_checksum = compute_ip_checksum(&md, sizeof(md)); + md.header_checksum = + compute_ip_checksum(&md, sizeof(md)); if (CONFIG(MRC_STASH_TO_CBMEM)) { /* Store data in cbmem for use in ramstage */ |