From 69a65752a71c44e750638b49c8e067a74c84f8f9 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 23 Oct 2024 18:48:34 +0200 Subject: [PATCH] soc/intel/xeon_sp/skx: Lock PMC in post_mp_init Since SKX and CPX are using the PCH, copy the code from CPX and lock the PMC in the same place. Reduced code differences between SKX and CPX and will allow to merge the codebase into one. Change-Id: I9495456fc2650b25ba164b336dc10ea0b88989aa Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/84846 Reviewed-by: Shuo Liu Tested-by: build bot (Jenkins) --- src/soc/intel/xeon_sp/skx/cpu.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c index 009527c84e..113c6301c3 100644 --- a/src/soc/intel/xeon_sp/skx/cpu.c +++ b/src/soc/intel/xeon_sp/skx/cpu.c @@ -1,22 +1,25 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include -#include #include #include #include #include #include +#include +#include +#include +#include #include +#include #include #include #include -#include -#include "chip.h" -#include -#include #include +#include "chip.h" + static const config_t *chip_config = NULL; @@ -211,8 +214,11 @@ static void post_mp_init(void) /* Set Max Ratio */ set_max_turbo_freq(); - if (CONFIG(HAVE_SMI_HANDLER)) + if (CONFIG(HAVE_SMI_HANDLER)) { global_smi_enable(); + if (get_lockdown_config() == CHIPSET_LOCKDOWN_COREBOOT) + pmc_lock_smi(); + } } /*