Attention is currently required from: Tarun Tuli, Subrata Banik, Kapil Porwal.
Sridhar Siricilla has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69578 )
Change subject: soc/intel/meteorlake: Check MANUF_LOCK when logging manufacturing mode ......................................................................
soc/intel/meteorlake: Check MANUF_LOCK when logging manufacturing mode
As per Intel doc #729124 Section 3.6.1 "Intel CSME Production Machine Determination", from ADL onwards there are three criteria which determine whether a device is in production mode: 1. Fuses are programmed 2. SPI descriptor is locked 3. Manufacturing variables are locked
When logging whether the device is in manufacturing mode, 1 and 2 are already checked. Add a check for 3 as well.
Also add logs for each individual criteria so it's easy to tell why the overall Manufacturing Mode is set or not.
TEST=Build and boot MTL RVP
Snippet from coreboot log: [DEBUG] ME: Manufacturing Mode : YES
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: I495a7d8730716fc92e8c57b2caef73e8bb44d30b --- M src/soc/intel/meteorlake/me.c 1 file changed, 42 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/69578/1
diff --git a/src/soc/intel/meteorlake/me.c b/src/soc/intel/meteorlake/me.c index ca8e643..6f64277 100644 --- a/src/soc/intel/meteorlake/me.c +++ b/src/soc/intel/meteorlake/me.c @@ -76,6 +76,18 @@ } __packed fields; };
+ +/* + * ME manufacturing mode is disabled if the descriptor is locked, fuses + * are programmed and manufacturing variables are locked. + * The function returns true if EOM is disabled otherwise false. + */ +static bool is_eom_disabled(union me_hfsts1 hfsts1, union me_hfsts6 hfsts6) +{ + return !!((hfsts1.fields.mfg_mode == 0) && (hfsts6.fields.manuf_lock == 1) && + (hfsts6.fields.fpf_soc_lock == 1)); +} + static void dump_me_status(void *unused) { union me_hfsts1 hfsts1; @@ -102,13 +114,9 @@ printk(BIOS_DEBUG, "ME: HFSTS5 : 0x%08X\n", hfsts5.data); printk(BIOS_DEBUG, "ME: HFSTS6 : 0x%08X\n", hfsts6.data);
- /* - * Lock Descriptor, and Fuses must be programmed on a - * production system to indicate ME Manufacturing mode is disabled. - */ printk(BIOS_DEBUG, "ME: Manufacturing Mode : %s\n", - ((hfsts1.fields.mfg_mode == 0) && - (hfsts6.fields.fpf_soc_lock == 1)) ? "NO" : "YES"); + is_eom_disabled(hfsts1, hfsts6) ? "NO" : "YES"); + /* * The SPI Protection Mode bit reflects SPI descriptor * locked(0) or unlocked(1).