aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna P Bhat D <krishna.p.bhat.d@intel.corp-partner.google.com>2023-09-21 22:19:47 +0530
committersridhar siricilla <siricillasridhar@gmail.com>2023-09-23 16:49:13 +0000
commit64ec6a77be361c748e646af0967d14bdc0c52815 (patch)
tree4c70c981efdc2694029d7f50167514cf37c55807
parentc3c71c3783c253c6dd9e5fa19ad98f2efcc0c2d4 (diff)
soc/intel/cse: Move cse_store_rw_fw_version from cse_print_boot_partition_info
cse_store_rw_fw_version() stores CSE RW firmware version in global variable or cbmem in romstage and ramstage respectively, based on the stage it is called in. The call to this function is from the cse_print_boot_partition_info() in cse_get_bp_info. In the subsequent patches, the idea is to send the cse_get_bp_info early in romstage and store in cbmem once memory is initialized. So when the cse_fw_sync is called in early ramstage, the stored cse_bp_info_rsp is used instead of sending the CSE get boot partition info command again. To de-link the call to cse_store_rw_fw_version from cse_get_bp_info and to ensure the CSE RW FW version is stored in all cases, moving the function to do_cse_fw_sync. BUG=b:273207144 Change-Id: I0add2c167c85cbddef2ecb4c019061a08562bbdf Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com> Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78051 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: sridhar siricilla <siricillasridhar@gmail.com>
-rw-r--r--src/soc/intel/common/block/cse/cse_lite.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c
index 6a5d55bd34..140a56d06f 100644
--- a/src/soc/intel/common/block/cse/cse_lite.c
+++ b/src/soc/intel/common/block/cse/cse_lite.c
@@ -278,8 +278,11 @@ static enum cse_fw_state get_cse_state(const struct fw_version *cur_cse_fw_ver,
* Helper function that stores current CSE firmware version to CBMEM memory,
* except during recovery mode.
*/
-static void cse_store_rw_fw_version(const struct cse_bp_entry *cse_bp)
+static void cse_store_rw_fw_version(void)
{
+ const struct cse_bp_entry *cse_bp;
+ cse_bp = cse_get_bp_entry(RW);
+
if (vboot_recovery_mode_enabled())
return;
@@ -391,10 +394,6 @@ static void cse_print_boot_partition_info(void)
cse_bp->fw_ver.hotfix, cse_bp->fw_ver.build,
cse_bp->status, cse_bp->start_offset,
cse_bp->end_offset);
-
- /* Store the CSE RW Firmware Version into CBMEM */
- if (CONFIG(SOC_INTEL_STORE_CSE_FW_VERSION))
- cse_store_rw_fw_version(cse_bp);
}
/*
@@ -1282,6 +1281,10 @@ static void do_cse_fw_sync(void)
}
}
+ /* Store the CSE RW Firmware Version into CBMEM */
+ if (CONFIG(SOC_INTEL_STORE_CSE_FW_VERSION))
+ cse_store_rw_fw_version();
+
/*
* If system is in recovery mode, CSE Lite update has to be skipped but CSE
* sub-partitions like NPHY and IOM have to be updated. If CSE sub-partition update