From 360684b41aec795d254dcaac1cefb4acf9e129d3 Mon Sep 17 00:00:00 2001 From: Sumeet R Pawnikar Date: Thu, 18 Jun 2020 15:56:11 +0530 Subject: soc/intel/common: add TCC activation functionality This enables to configure the Thermal Control Circuit (TCC) activation value to new value as tcc_offset in degree Celcius. It prevents any abrupt thermal shutdown while running heavy workload. This helps to take early thermal throttling action before CPU temperature reaches maximum operating temperature TjMax value. Also, cleanup local functions from previous intel soc specific code base like for apollolake, broadwell, skylake and cannonlake. BUG=None BRANCH=None TEST=Built for volteer platform and verified the MSR value. Change-Id: I37dd878902b080602d70c5c3c906820613ea14a5 Signed-off-by: Sumeet R Pawnikar Reviewed-on: https://review.coreboot.org/c/coreboot/+/41855 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/xeon_sp/cpx/chip.h | 3 +++ src/soc/intel/xeon_sp/include/soc/soc_chip.h | 8 ++++++++ src/soc/intel/xeon_sp/skx/chip.h | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 src/soc/intel/xeon_sp/include/soc/soc_chip.h (limited to 'src/soc/intel/xeon_sp') diff --git a/src/soc/intel/xeon_sp/cpx/chip.h b/src/soc/intel/xeon_sp/cpx/chip.h index 6bf7272572..61e806e473 100644 --- a/src/soc/intel/xeon_sp/cpx/chip.h +++ b/src/soc/intel/xeon_sp/cpx/chip.h @@ -67,6 +67,9 @@ struct soc_intel_xeon_sp_cpx_config { uint32_t gen2_dec; uint32_t gen3_dec; uint32_t gen4_dec; + + /* TCC activation offset */ + uint32_t tcc_offset; }; typedef struct soc_intel_xeon_sp_cpx_config config_t; diff --git a/src/soc/intel/xeon_sp/include/soc/soc_chip.h b/src/soc/intel/xeon_sp/include/soc/soc_chip.h new file mode 100644 index 0000000000..3113eadf55 --- /dev/null +++ b/src/soc/intel/xeon_sp/include/soc/soc_chip.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _SOC_XEON_SP_SOC_CHIP_H_ +#define _SOC_XEON_SP_SOC_CHIP_H_ + +#include "../chip.h" + +#endif /* _SOC_XEON_SP_SOC_CHIP_H_ */ diff --git a/src/soc/intel/xeon_sp/skx/chip.h b/src/soc/intel/xeon_sp/skx/chip.h index c7f19ec811..440fb40f3d 100644 --- a/src/soc/intel/xeon_sp/skx/chip.h +++ b/src/soc/intel/xeon_sp/skx/chip.h @@ -69,6 +69,9 @@ struct soc_intel_xeon_sp_skx_config { uint32_t gen2_dec; uint32_t gen3_dec; uint32_t gen4_dec; + + /* TCC activation offset */ + uint32_t tcc_offset; }; typedef struct soc_intel_xeon_sp_skx_config config_t; -- cgit v1.2.3