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 <yong.zhi@intel.com>
Change-Id: I58d4aea28ee2561d2ed73260c40cb22ce3fdd135
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73061
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
diff --git a/src/soc/intel/meteorlake/chip.h b/src/soc/intel/meteorlake/chip.h
index 1b9d192..9bafb22 100644
--- a/src/soc/intel/meteorlake/chip.h
+++ b/src/soc/intel/meteorlake/chip.h
@@ -343,6 +343,9 @@
* 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 f8d3f6e..fae9cbb 100644
--- a/src/soc/intel/meteorlake/fsp_params.c
+++ b/src/soc/intel/meteorlake/fsp_params.c
@@ -644,6 +644,9 @@
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;
}