Sumeet R Pawnikar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78386?usp=email )
Change subject: drivers/intel/dptf: Add DCFG method support ......................................................................
drivers/intel/dptf: Add DCFG method support
After final production, it's possible that the OEM/ODM locks down thermal tuning beyond what is usually done on the given platform. In that case user space calibration tools should not try to adjust the thermal configuration of the system. By adding new DCFG (Device Configuration) method it allows the OEM/ODM to control this thermal tuning mechanism. It also gives the provision for user space to check the current mode. This method is based on BIOS specification document #640237.
BUG=b:272382080 TEST=Build, boot on rex board and dump SSDT to check DCFG method. Also, verified the newly added sysfs attribute "production_mode" present under /sys/bus/platform/devices/INTC1042:00 path.
Change-Id: I507c4d6eee565d39b2f42950d888d110ab94de64 Signed-off-by: Sumeet Pawnikar sumeet.r.pawnikar@intel.com --- M src/drivers/intel/dptf/dptf.c 1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/78386/1
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c index 71a4ec3..c1e4dfac 100644 --- a/src/drivers/intel/dptf/dptf.c +++ b/src/drivers/intel/dptf/dptf.c @@ -159,6 +159,16 @@ acpigen_write_method_end(); } /* _SB.DPTF */ +static void write_dcfg_variable(void) + acpigen_write_name("DCFE"); + acpigen_emit_byte(0); + + acpigen_write_method("DCFG", 0); + acpigen_emit_byte(RETURN_OP); + acpigen_emit_namestring("DCFE"); + acpigen_write_method_end(); +} +/* _SB.DPTF */ static void write_oem_variables(const struct drivers_intel_dptf_config *config) { int i; @@ -520,6 +530,7 @@ } else write_fan(config, platform_info, DPTF_FAN);
+ write_dcfg_variable(); write_oem_variables(config); write_imok(); write_generic_devices(config, platform_info);