Attention is currently required from: Patrick Rudolph. Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60403 )
Change subject: soc/intel/common/cse: Helper API to know CSE SPI Protection Mode ......................................................................
soc/intel/common/cse: Helper API to know CSE SPI Protection Mode
This patch checks CSE's spi protection mode is protected or unprotected. Returns true if CSE's spi protection mode is protected, otherwise false.
BUG=b:211954778
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I23f1a1c4b55d8da6e6fd0cf84bef86f49ce80cca --- M src/soc/intel/common/block/cse/cse.c M src/soc/intel/common/block/include/intelblocks/cse.h 2 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/60403/1
diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index a80ab48..2d169a1 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -258,6 +258,15 @@ return cse_check_hfs1_com(ME_HFS1_COM_SOFT_TEMP_DISABLE); }
+bool cse_is_hfs1_spi_protected(void) +{ + union me_hfsts1 hfs1; + hfs1.data = me_read_config32(PCI_ME_HFSTS1); + if (!hfs1.fields.spi_protection_mode) + return true; + return false; +} + bool cse_is_hfs3_fw_sku_lite(void) { union me_hfsts3 hfs3; diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index 68f1d3c..540dabc 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -301,6 +301,12 @@ bool cse_is_hfs1_com_soft_temp_disable(void);
/* + * Checks CSE's spi protection mode is protected or unprotected. + * Returns true if CSE's spi protection mode is protected, otherwise false. + */ +bool cse_is_hfs1_spi_protected(void); + +/* * Checks CSE's Firmware SKU is Lite or not. * Returns true if CSE's Firmware SKU is Lite, otherwise false */