From 309d5a53733592191837ca47cfddd97830dd4a2e Mon Sep 17 00:00:00 2001 From: Yong Zhi Date: Tue, 14 Feb 2023 17:25:17 -0600 Subject: soc/intel/meteorlake: Add PM Energy Report feature option This patch adds enable/disable FSP DisableEnergyReport feature option to be used in devicetree for power instrument purpose. BUG=None Branch=None Test=Build and boot MTL RVP. Signed-off-by: Yong Zhi Change-Id: I58d4aea28ee2561d2ed73260c40cb22ce3fdd135 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73061 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Kapil Porwal --- src/soc/intel/meteorlake/chip.h | 3 +++ src/soc/intel/meteorlake/fsp_params.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h index 1b9d192ef5..9bafb2268e 100644 --- a/src/soc/intel/meteorlake/chip.h +++ b/src/soc/intel/meteorlake/chip.h @@ -343,6 +343,9 @@ struct soc_intel_meteorlake_config { * Set this to 1 in order to disable Package C-state demotion. */ bool disable_package_c_state_demotion; + + /* Enable PCH to CPU energy report feature. */ + bool pch_pm_energy_report_enable; }; typedef struct soc_intel_meteorlake_config config_t; diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c index f8d3f6e0b5..fae9cbb1b1 100644 --- a/src/soc/intel/meteorlake/fsp_params.c +++ b/src/soc/intel/meteorlake/fsp_params.c @@ -644,6 +644,9 @@ static void fill_fsps_misc_power_params(FSP_S_CONFIG *s_cfg, s_cfg->PmcLpmS0ixSubStateEnableMask = get_supported_lpm_mask(); s_cfg->PkgCStateDemotion = !config->disable_package_c_state_demotion; s_cfg->PmcV1p05PhyExtFetControlEn = 1; + + /* Enable PCH to CPU energy report feature. */ + s_cfg->PchPmDisableEnergyReport = !config->pch_pm_energy_report_enable; } -- cgit v1.2.3