Anil Kumar K has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74874 )
Change subject: [Test] soc/intel/cse_lite: check PSR bit before issuing PSR backup command ......................................................................
[Test] soc/intel/cse_lite: check PSR bit before issuing PSR backup command
Signed-off-by: Anil Kumar anil.kumar.k@intel.com Change-Id: I6e92341a9dc799146eb8f1a70b3a4a16fd1aa0ae --- M src/soc/intel/common/block/cse/cse_lite.c M src/soc/intel/common/block/include/intelblocks/cse.h 2 files changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/74874/1
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index 1ad67ef..48dc04f 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -775,6 +775,19 @@
if (cse_boot_to_rw(cse_bp_info) == CB_SUCCESS) {
+ uint32_t feature_status; + /* first check if PSR is supported by the SKU */ + if (cse_get_fw_feature_state(&feature_status) != CB_SUCCESS) { + printk(BIOS_ERR, "cse_get_fw_feature_state command failed !\n"); + return; + } + + if (!(feature_status & ME_FW_FEATURE_PSR)) { + printk(BIOS_DEBUG, "PSR is not supported in this SKU !\n"); + /* PSR is not supported in this SKU */ + return; + } + static struct psr_heci_fw_downgrade_backup_res backup_psr_resp; if (cse_send_backup_psr_cmd(&backup_psr_resp) != CB_SUCCESS) { printk(BIOS_ERR, "backup_psr command failed ! PSR data is not backed up\n"); diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index 1eda029..be32027 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -34,6 +34,7 @@ /* Firmware Feature Shipment Time State Override Command Id */ #define MKHI_GEN_FW_FEATURE_SHIPMENT_OVER 0x14 #define ME_FW_FEATURE_PTT BIT(29) +#define ME_FW_FEATURE_PSR BIT(5)
/* Get Firmware Feature State Command Id */ #define MKHI_FWCAPS_GET_FW_FEATURE_STATE 0x02