mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / intel / xeon_sp / lockdown.c
bloba3d17b46c33153ac9f4299cbd247006d1350c9a4
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <intelblocks/cfg.h>
4 #include <intelblocks/lpc_lib.h>
5 #include <intelpch/lockdown.h>
6 #include <soc/lockdown.h>
7 #include <soc/pm.h>
9 static void lpc_lockdown_config(void)
11 /* Set BIOS Interface Lock, BIOS Lock */
12 lpc_set_bios_interface_lock_down();
14 /* Only allow writes in SMM */
15 if (CONFIG(BOOTMEDIA_SMM_BWP)) {
16 lpc_set_eiss();
17 lpc_enable_wp();
19 lpc_set_lock_enable();
22 void soc_lockdown_config(int chipset_lockdown)
24 if (chipset_lockdown == CHIPSET_LOCKDOWN_FSP)
25 return;
27 lpc_lockdown_config();
28 pmc_lockdown_config();
29 sata_lockdown_config(chipset_lockdown);
30 spi_lockdown_config(chipset_lockdown);