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 <justin.frodsham@protonmail.com>
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I469836e09db6024ecb448a5261439c66d8e65daf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index 0849460..26ff59d 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -88,9 +88,7 @@
 
 	supd = (FSPS_UPD *) (hdr->cfg_region_offset + hdr->image_base);
 
-	if (supd->FspUpdHeader.Signature != FSPS_UPD_SIGNATURE)
-		die_with_post_code(POST_INVALID_VENDOR_BINARY,
-			"Invalid FSPS signature\n");
+	fsp_verify_upd_header_signature(supd->FspUpdHeader.Signature, FSPS_UPD_SIGNATURE);
 
 	/* Disallow invalid config regions.  Default settings are likely bad
 	 * choices for coreboot, and different sized UPD from what the region