Dinesh Gehlot has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75749?usp=email )
Change subject: soc/intel/cmd/blk/cse: Hook get CSE version into `.final` ......................................................................
soc/intel/cmd/blk/cse: Hook get CSE version into `.final`
This patch calls get ISH version function from .final hook if platform has required config (`SOC_INTEL_STORE_CSE_VERSION`) support.
BUG=b:280722061 TEST=The CSE version, 16.50.0.1232, was retrieved on nissa board.
Signed-off-by: Dinesh Gehlot digehlot@google.com Change-Id: Ifdb82c180b64fbb4575932427be54f544e1c98d4 --- M src/soc/intel/common/block/cse/cse.c 1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/75749/1
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index 990e106..7d3ac29 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -1418,12 +1418,28 @@ cse_final_end_of_firmware(); }
+static void intel_cse_get_version(void) +{ + struct cse_fw_partition_info *version = cbmem_find(CBMEM_ID_CSE_PARTITION_VERSION); + if (version == NULL) + return; + + printk(BIOS_DEBUG, "CSE version: %d.%d.%d.%d\n", + version->cur_cse_fw_version.major, + version->cur_cse_fw_version.minor, + version->cur_cse_fw_version.hotfix, + version->cur_cse_fw_version.build); +} + /* * `cse_final` function is native implementation of equivalent events performed by - * each FSP NotifyPhase() API invocations. + * each FSP NotifyPhase() API invocations. It also displays CSE firmware version + * if stored in CBMEM memory. */ static void cse_final(struct device *dev) { + if (CONFIG(SOC_INTEL_STORE_CSE_VERSION)) + intel_cse_get_version(); /* * SoC user can have two options for sending EOP: * 1. Choose to send EOP late