From 889959890ca9e5f4db12335f079c5a3de4caae1d Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 28 Jan 2021 22:43:52 +0100 Subject: drivers/intel/fsp2_0: factor out and improve UPD signature check In case of a mismatch print both the UPD signature in the FSP and the expected signature and then calls die(), since it shouldn't try calling into the wrong FSP binary for the platform. Signed-off-by: Justin Frodsham Signed-off-by: Felix Held Change-Id: I469836e09db6024ecb448a5261439c66d8e65daf Reviewed-on: https://review.coreboot.org/c/coreboot/+/50090 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Furquan Shaikh --- src/drivers/intel/fsp2_0/include/fsp/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/drivers/intel/fsp2_0/include/fsp/util.h') diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index 7393305f0b..253b74a150 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -97,6 +97,8 @@ const struct hob_header *fsp_next_hob(const struct hob_header *parent); bool fsp_guid_compare(const uint8_t guid1[16], const uint8_t guid2[16]); void fsp_find_bootloader_tolum(struct range_entry *re); void fsp_get_version(char *buf); +/* fsp_verify_upd_header_signature calls die() on signature mismatch */ +void fsp_verify_upd_header_signature(uint64_t upd_signature, uint64_t expected_signature); void lb_string_platform_blob_version(struct lb_header *header); void report_fspt_output(void); void soc_validate_fsp_version(const struct fsp_header *hdr); -- cgit v1.2.3