Attention is currently required from: Tarun Tuli, Dinesh Gehlot, Sridhar Siricilla.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/74256 )
Change subject: soc/intel/: Store CSE firmware version into cbmem table ......................................................................
Patch Set 7:
(1 comment)
File src/soc/intel/common/block/cse/cse_lite.c:
https://review.coreboot.org/c/coreboot/+/74256/comment/db285622_f3b377b8 PS7, Line 1089: : const struct cse_bp_entry *cse_bp = cse_get_bp_entry(RW, &cse_bp_info.bp_info); : struct cse_fw_partition_info *version; : version = cbmem_add(CBMEM_ID_CSE_PARTITION_VERSION, sizeof(*version)); : version->cur_cse_fw_version.major = cse_bp->fw_ver.major; : version->cur_cse_fw_version.minor = cse_bp->fw_ver.minor; : version->cur_cse_fw_version.hotfix = cse_bp->fw_ver.hotfix; : version->cur_cse_fw_version.build = cse_bp->fw_ver.build; : } :
Can't this be handled in the cse_get_bp_info() itself? Doing so, we can avoid resending the command to CSE.
assuming the case where we are doing CSE sync in romstage and we are trying to add cse version using cbmem_add inside cse_get_bp_info().
Later cbmem gets created after FSP-M exits. In the above scenario, on every warm reset, we are seeing cbmem_add is unable to find the entry (previously added) and ended up by adding it again and again.
Hence, if you see https://review.coreboot.org/c/coreboot/+/74256/7/src/soc/intel/alderlake/rom... incase of cse sync in romstage, we would like to store cse version into cbmem after the cbmem actually online.
your suggestion would work fine while sending the cse sync from ramstage.