summaryrefslogtreecommitdiff
path: root/src/drivers/intel/dptf
diff options
context:
space:
mode:
authorSumeet Pawnikar <sumeet.r.pawnikar@intel.com>2023-10-12 17:53:37 +0530
committerFelix Held <felix-coreboot@felixheld.de>2024-03-21 13:16:55 +0000
commitd4d6d6c8d0e8bb1265a2ab9828d02fcf76f42f40 (patch)
tree516400f379030b2c90475d88fb2b0804982043bf /src/drivers/intel/dptf
parente4e29c9e78079d6b8d3911b2059f5ae947bee605 (diff)
drivers/intel/dptf: Add DCFG support
After final production, it's possible by setting particular bit using DCFG 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) it allows the OEM/ODM to control this thermal tuning mechanism. They can configure it by adding dcfg config under overridetree.cb file. The default value for all bits is 0 to ensure default behavior and backwards compatibility. For an example if Bit 0 being set represents Generic DTT UI access control is disabled and Bit 2 being set represents DTT shell access control is disabled. Each bit represents different configuration access control for DTT as per BIOS specification document #640237. It also gives the provision for user space to check the current mode. This mode value is based on BIOS specification document number #640237. BUG=b:272382080 TEST=Build, boot on rex board and dump SSDT to check DCFG value. 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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78386 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel/dptf')
-rw-r--r--src/drivers/intel/dptf/chip.h3
-rw-r--r--src/drivers/intel/dptf/dptf.c7
2 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/intel/dptf/chip.h b/src/drivers/intel/dptf/chip.h
index 9bbf11f2f7..7f931824f8 100644
--- a/src/drivers/intel/dptf/chip.h
+++ b/src/drivers/intel/dptf/chip.h
@@ -73,6 +73,9 @@ struct drivers_intel_dptf_config {
/* Rest of platform Power */
uint32_t prop;
+ /* Device Configuration */
+ uint32_t dcfg;
+
bool dptf_multifan_support;
};
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c
index f313540d59..5bbbc1bb7f 100644
--- a/src/drivers/intel/dptf/dptf.c
+++ b/src/drivers/intel/dptf/dptf.c
@@ -158,6 +158,12 @@ static void write_imok(void)
acpigen_emit_byte(ARG0_OP);
acpigen_write_method_end();
}
+
+static void write_dcfg_variable(const struct drivers_intel_dptf_config *config)
+{
+ acpigen_write_name_integer("DCFG", config->dcfg);
+}
+
/* \_SB.DPTF */
static void write_oem_variables(const struct drivers_intel_dptf_config *config)
{
@@ -520,6 +526,7 @@ static void write_device_definitions(const struct device *dev)
} else
write_fan(config, platform_info, DPTF_FAN);
+ write_dcfg_variable(config);
write_oem_variables(config);
write_imok();
write_generic_devices(config, platform_info);