diff options
author | Sridhar Siricilla <sridhar.siricilla@intel.com> | 2022-11-14 17:25:37 +0530 |
---|---|---|
committer | Eric Lai <eric_lai@quanta.corp-partner.google.com> | 2022-11-17 00:55:35 +0000 |
commit | 0c923732dd653610f990de67d5bbf68825c23bee (patch) | |
tree | 014a3156431b10e457edb5f08d4e6bf80b46c844 /src/soc | |
parent | 026f86ba3b2d6d6bbed34a5a85e3a3f192974ed5 (diff) |
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>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/meteorlake/me.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/soc/intel/meteorlake/me.c b/src/soc/intel/meteorlake/me.c index 7d89590dc3..743e9636a8 100644 --- a/src/soc/intel/meteorlake/me.c +++ b/src/soc/intel/meteorlake/me.c @@ -76,6 +76,18 @@ union me_hfsts6 { } __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 @@ static void dump_me_status(void *unused) 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). |