Eric Lai has submitted this change. ( 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.
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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69578 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Subrata Banik subratabanik@google.com Reviewed-by: Jamie Ryu jamie.m.ryu@intel.com Reviewed-by: Eric Lai eric_lai@quanta.corp-partner.google.com Reviewed-by: Ivy Jian ivy.jian@quanta.corp-partner.google.com --- M src/soc/intel/meteorlake/me.c 1 file changed, 45 insertions(+), 6 deletions(-)
Approvals: build bot (Jenkins): Verified Jamie Ryu: Looks good to me, but someone else must approve Subrata Banik: Looks good to me, approved Eric Lai: Looks good to me, approved Ivy Jian: Looks good to me, approved
diff --git a/src/soc/intel/meteorlake/me.c b/src/soc/intel/meteorlake/me.c index 7d89590..743e963 100644 --- a/src/soc/intel/meteorlake/me.c +++ b/src/soc/intel/meteorlake/me.c @@ -76,6 +76,18 @@ } __packed fields; };
+ +/* + * Manufacturing mode is disabled if the descriptor is locked, fuses + * are programmed and manufacturing variables are locked. + * The function returns true if manufacturing mode is disabled otherwise false. + */ +static bool is_eom(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(hfsts1, hfsts6) ? "NO" : "YES"); + /* * The SPI Protection Mode bit reflects SPI descriptor * locked(0) or unlocked(1).