diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-05-29 14:10:53 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-07 17:20:33 +0000 |
commit | 7eb1136c27a839a18a4224b970b5a61587e29bd7 (patch) | |
tree | 6fbc0d9cba8b2f9ccf442af0643326edf663c0d4 /src/drivers/intel/dptf | |
parent | c41f7f15c192d06b5dfdeb1b74f99278cee66110 (diff) |
dptf: Add support for Passive Policies
This patch adds support for emitting the Thermal Relationship Table, as
well as _PSV Methods, which together form the basis for DPTF Passive
Policies.
BUG=b:143539650
TEST=compiles
Change-Id: I82e1c9022999b0a2a733aa6cd9c98a850e6f5408
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41886
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/drivers/intel/dptf')
-rw-r--r-- | src/drivers/intel/dptf/chip.h | 1 | ||||
-rw-r--r-- | src/drivers/intel/dptf/dptf.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/intel/dptf/chip.h b/src/drivers/intel/dptf/chip.h index 730d23ed6b..0cd2ad2063 100644 --- a/src/drivers/intel/dptf/chip.h +++ b/src/drivers/intel/dptf/chip.h @@ -8,6 +8,7 @@ struct drivers_intel_dptf_config { struct { struct dptf_active_policy active[DPTF_MAX_ACTIVE_POLICIES]; + struct dptf_passive_policy passive[DPTF_MAX_PASSIVE_POLICIES]; } policies; }; diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c index 20f8d9b4ae..74f481294d 100644 --- a/src/drivers/intel/dptf/dptf.c +++ b/src/drivers/intel/dptf/dptf.c @@ -35,6 +35,12 @@ static bool is_participant_used(const struct drivers_intel_dptf_config *config, if (config->policies.active[i].target == participant) return true; + /* Passive? */ + for (i = 0; i < DPTF_MAX_PASSIVE_POLICIES; ++i) + if (config->policies.passive[i].source == participant || + config->policies.passive[i].target == participant) + return true; + /* Check fan as well (its use is implicit in the Active policy) */ if (participant == DPTF_FAN && config->policies.active[0].target != DPTF_NONE) return true; @@ -55,6 +61,9 @@ static void dptf_fill_ssdt(const struct device *dev) dptf_write_active_policies(config->policies.active, DPTF_MAX_ACTIVE_POLICIES); + dptf_write_passive_policies(config->policies.passive, + DPTF_MAX_PASSIVE_POLICIES); + printk(BIOS_INFO, "\\_SB.DPTF: %s at %s\n", dev->chip_ops->name, dev_path(dev)); } |