Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/21369
Change subject: drivers/intel/fsp1_1: don't fail on revision mismatch ......................................................................
drivers/intel/fsp1_1: don't fail on revision mismatch
Braswell ChromeOS devices ship with FSP blobs which have various FSP Header Revisions, but are all compatible with the latest header file. Therefore, warn of the mismatch rather than silent failing and falling into a reboot loop.
Move the revision check/warning from prior to tempraminit to after, as console output is not available prior to tempraminit.
TEST: build/boot google/cyan and edgar boards, observe no adverse effects from using updated/mismatched FSP header.
Change-Id: I8934675a2deed260886a83fa34512904c40af8e1 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/drivers/intel/fsp1_1/bootblock.c M src/drivers/intel/fsp1_1/fsp_util.c 2 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/21369/1
diff --git a/src/drivers/intel/fsp1_1/bootblock.c b/src/drivers/intel/fsp1_1/bootblock.c index cf9e134..9554d2d 100644 --- a/src/drivers/intel/fsp1_1/bootblock.c +++ b/src/drivers/intel/fsp1_1/bootblock.c @@ -36,7 +36,7 @@ fih = find_fsp(CONFIG_FSP_LOC); /* Check the FSP header */ if (((uintptr_t)fih >= ERROR_NO_FV_SIG) && - ((uintptr_t)fih <= ERROR_FSP_REV_MISMATCH)) { + ((uintptr_t)fih <= ERROR_FSP_SIG_MISMATCH)) { printk(BIOS_ERR, "FSP header error %p, ", fih); fih = NULL; } diff --git a/src/drivers/intel/fsp1_1/fsp_util.c b/src/drivers/intel/fsp1_1/fsp_util.c index 34d6e48..5517695 100644 --- a/src/drivers/intel/fsp1_1/fsp_util.c +++ b/src/drivers/intel/fsp1_1/fsp_util.c @@ -78,10 +78,6 @@ if (*image_id != FSP_IMAGE_ID) return (FSP_INFO_HEADER *)ERROR_FSP_SIG_MISMATCH;
- /* Verify the FSP Revision */ - if (fsp_ptr.fih->ImageRevision != FSP_IMAGE_REV) - return (FSP_INFO_HEADER *)ERROR_FSP_REV_MISMATCH; - return fsp_ptr.fih; }
@@ -103,6 +99,14 @@ (u8)((fsp_header->ImageRevision >> 16) & 0xff), (u8)((fsp_header->ImageRevision >> 8) & 0xff), (u8)(fsp_header->ImageRevision & 0xff)); + /* Verify the FSP Revision */ + if (fsp_header->ImageRevision != FSP_IMAGE_REV) { + printk(BIOS_WARNING, "Warning: Expected FSP Revision: %d.%d.%d.%d\n", + (u8)((FSP_IMAGE_REV >> 24) & 0xff), + (u8)((FSP_IMAGE_REV >> 16) & 0xff), + (u8)((FSP_IMAGE_REV >> 8) & 0xff), + (u8)(FSP_IMAGE_REV & 0xff)); + } #if IS_ENABLED(CONFIG_DISPLAY_FSP_ENTRY_POINTS) printk(BIOS_SPEW, "FSP Entry Points:\n"); printk(BIOS_SPEW, " 0x%p: Image Base\n", fsp_base);