diff options
Diffstat (limited to 'src/soc/intel/cannonlake/cpu.c')
-rw-r--r-- | src/soc/intel/cannonlake/cpu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/intel/cannonlake/cpu.c b/src/soc/intel/cannonlake/cpu.c index 2520559cdc..5b39156292 100644 --- a/src/soc/intel/cannonlake/cpu.c +++ b/src/soc/intel/cannonlake/cpu.c @@ -134,6 +134,18 @@ static void per_cpu_smm_trigger(void) smm_relocate(); } +void smm_lock(void) +{ + struct device *sa_dev = pcidev_path_on_root(SA_DEVFN_ROOT); + /* + * LOCK the SMM memory window and enable normal SMM. + * After running this function, only a full reset can + * make the SMM registers writable again. + */ + printk(BIOS_DEBUG, "Locking SMM.\n"); + pci_write_config8(sa_dev, SMRAM, D_LCK | G_SMRAME | C_BASE_SEG); +} + static void post_mp_init(void) { /* Set Max Ratio */ |