summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/lockdown.c
blob: 5de4bdd2c13ba643d3cefbcb9e872945734e5353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: GPL-2.0-only */

#include <device/mmio.h>
#include <intelblocks/cfg.h>
#include <intelblocks/pmclib.h>
#include <intelpch/lockdown.h>
#include <soc/pm.h>

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)
{
	/* APL only supports CHIPSET_LOCKDOWN_COREBOOT */
	if (CONFIG(SOC_INTEL_GEMINILAKE))
		pmc_lock_smi();
}