Johnny Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47559 )
Change subject: intel/fsp2_0: Add soc_validate_fsp_version for FSP version check ......................................................................
intel/fsp2_0: Add soc_validate_fsp_version for FSP version check
Only need to check this once so check it at romstage where the console is usually ready.
Change-Id: I628014e05bd567462f50af2633fbf48f3dc412bc Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/util.c 2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/47559/1
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index a57b1bb..2d2a58b 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -90,6 +90,7 @@ void fsp_get_version(char *buf); 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);
/* Fill in header and validate sanity of component within region device. */ enum cb_err fsp_validate_component(struct fsp_header *hdr, diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c index acc3f4b..dc54d46 100644 --- a/src/drivers/intel/fsp2_0/util.c +++ b/src/drivers/intel/fsp2_0/util.c @@ -85,6 +85,9 @@ return CB_ERR; }
+ if (ENV_ROMSTAGE) + soc_validate_fsp_version(hdr); + return CB_SUCCESS; }
@@ -243,3 +246,5 @@ rec->size = ALIGN_UP(sizeof(*rec) + len + 1, 8); memcpy(rec->string, fsp_version, len+1); } + +__weak void soc_validate_fsp_version(const struct fsp_header *hdr) { }