Dinesh Gehlot has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75688?usp=email )
Change subject: soc/intel/cmd/blk: Implement an API to get CSE version ......................................................................
soc/intel/cmd/blk: Implement an API to get CSE version
This patch adds an API that will display the current CSE version.
BUG=b:280722061
Signed-off-by: Dinesh Gehlot digehlot@google.com Change-Id: I361d34589124ecf4f7cf70010ecc63d0cd8e6ddc --- M src/soc/intel/common/block/cse/cse.c M src/soc/intel/common/block/include/intelblocks/cse.h 2 files changed, 18 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/75688/1
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index 990e106..40489c7 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -1213,6 +1213,21 @@ } }
+void cse_get_version(void) +{ + if (CONFIG(SOC_INTEL_STORE_CSE_FPT_PARTITION_VERSION)) + return; + 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); +} + #if ENV_RAMSTAGE
/* diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index 23a4490..e23796a 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -565,4 +565,7 @@ */ enum cb_err cse_get_fw_feature_state(uint32_t *feature_state);
+/* Displays current CSE version */ +void cse_get_version(void); + #endif // SOC_INTEL_COMMON_CSE_H