soc/amd/common/block/gfx: Use TPM-stored hash for vbios cache validation
commit1fbc1123d798137324cc8876db6386584c475da1
authorMatt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tue, 24 Jan 2023 00:38:45 +0000 (23 18:38 -0600)
committerFelix Held <felix-coreboot@felixheld.de>
Mon, 13 Feb 2023 14:56:48 +0000 (13 14:56 +0000)
treed01ab54ffed0756d3610e82d741ad876c567bce4
parent9ce755d05ed56753105bce6f4d75f4ddbc98cb26
soc/amd/common/block/gfx: Use TPM-stored hash for vbios cache validation

Write the SHA256 hash of the cached VBIOS data when saving to FMAP,
and use it to validate the data read from FMAP on subsequent boots.

Add TPM2 as a dependency to the selection of VBIOS_CACHE_IN_FMAP.

BUG=b:255812886
TEST=tested with rest of patch train

Change-Id: I9c8f23b000b90a1072aeb7a57d3b7b2b2bc626dc
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72402
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/soc/amd/common/block/graphics/Kconfig
src/soc/amd/common/block/graphics/graphics.c