Attention is currently required from: Justin Frodsham. Hello Justin Frodsham,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/50090
to review the following change.
Change subject: drivers/intel/fsp2_0: print FSP-M UPD signatures in case of mismatch ......................................................................
drivers/intel/fsp2_0: print FSP-M UPD signatures in case of mismatch
TEST=Building Majolica (Cezanne) with the Picasso FSP gives the following error message on the serial console: Invalid FSPM signature! Expected "CEZANE_M", but FSP-M has "PICASO_M".
Signed-off-by: Justin Frodsham justin.frodsham@protonmail.com Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I469836e09db6024ecb448a5261439c66d8e65daf --- M src/drivers/intel/fsp2_0/memory_init.c 1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/50090/1
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c index 759bfa4..ecc95a1 100644 --- a/src/drivers/intel/fsp2_0/memory_init.c +++ b/src/drivers/intel/fsp2_0/memory_init.c @@ -239,9 +239,15 @@
upd = (FSPM_UPD *)(hdr->cfg_region_offset + hdr->image_base);
- if (upd->FspUpdHeader.Signature != FSPM_UPD_SIGNATURE) + if (upd->FspUpdHeader.Signature != FSPM_UPD_SIGNATURE) { + /* The UPD signatures are non-zero-terminated ASCII stored as a little endian + uint64_t, so this needs some casts. */ + const uint64_t fspm_upd_signature_expected = FSPM_UPD_SIGNATURE; die_with_post_code(POST_INVALID_VENDOR_BINARY, - "Invalid FSPM signature!\n"); + "Invalid FSPM signature! Expected "%8s", but FSP-M has "%8s".\n", + (char *)&fspm_upd_signature_expected, + (char *)&upd->FspUpdHeader.Signature); + }
/* Copy the default values from the UPD area */ memcpy(&fspm_upd, upd, sizeof(fspm_upd));