From d9ef02ce1d26767c3ddc36499223a91d77962bbb Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 15 Sep 2022 12:16:30 +0100 Subject: soc/intel/apollolake: Lock down Global SMI Enable SMI_LOCK bit to prevent writes to the Global SMI Enable bit. Signed-off-by: Sean Rhodes Change-Id: I9377c3b65aa342f754c303148b0b8d826d05bb94 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67662 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/soc/intel/apollolake/lockdown.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/apollolake/lockdown.c b/src/soc/intel/apollolake/lockdown.c index 1b7381da5e..e11778b5dc 100644 --- a/src/soc/intel/apollolake/lockdown.c +++ b/src/soc/intel/apollolake/lockdown.c @@ -6,10 +6,17 @@ #include #include +static void pmc_lock_smi(void) +{ + uint8_t *pmcbase; + + pmcbase = pmc_mmio_regs(); + + setbits32(pmcbase + GEN_PMCON2, SMI_LOCK); +} + void soc_lockdown_config(int chipset_lockdown) { - /* - * Nothing to do here as pmc_global_reset_disable_and_lock - * is called from chip.c - */ + /* APL only supports CHIPSET_LOCKDOWN_COREBOOT */ + pmc_lock_smi(); } -- cgit v1.2.3