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>
This commit is contained in:
Yong Zhi 2023-02-14 17:25:17 -06:00 committed by Eric Lai
parent c3d5d20664
commit 309d5a5373
2 changed files with 6 additions and 0 deletions

View File

@ -343,6 +343,9 @@ struct soc_intel_meteorlake_config {
* Set this to 1 in order to disable Package C-state demotion. * Set this to 1 in order to disable Package C-state demotion.
*/ */
bool 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; typedef struct soc_intel_meteorlake_config config_t;

View File

@ -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->PmcLpmS0ixSubStateEnableMask = get_supported_lpm_mask();
s_cfg->PkgCStateDemotion = !config->disable_package_c_state_demotion; s_cfg->PkgCStateDemotion = !config->disable_package_c_state_demotion;
s_cfg->PmcV1p05PhyExtFetControlEn = 1; s_cfg->PmcV1p05PhyExtFetControlEn = 1;
/* Enable PCH to CPU energy report feature. */
s_cfg->PchPmDisableEnergyReport = !config->pch_pm_energy_report_enable;
} }