aboutsummaryrefslogtreecommitdiff
path: root/src/include/acpi
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2020-05-29 14:10:53 -0600
committerPatrick Georgi <pgeorgi@google.com>2020-07-07 17:20:33 +0000
commit7eb1136c27a839a18a4224b970b5a61587e29bd7 (patch)
tree6fbc0d9cba8b2f9ccf442af0643326edf663c0d4 /src/include/acpi
parentc41f7f15c192d06b5dfdeb1b74f99278cee66110 (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/include/acpi')
-rw-r--r--src/include/acpi/acpigen_dptf.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/include/acpi/acpigen_dptf.h b/src/include/acpi/acpigen_dptf.h
index a082b62fd9..214578a4c1 100644
--- a/src/include/acpi/acpigen_dptf.h
+++ b/src/include/acpi/acpigen_dptf.h
@@ -27,6 +27,7 @@ enum {
/* A device can only define _AC0 .. _AC9 i.e. between 0 and 10 Active Cooling Methods */
DPTF_MAX_ACX = 10,
DPTF_MAX_ACTIVE_POLICIES = (DPTF_PARTICIPANT_COUNT-1),
+ DPTF_MAX_PASSIVE_POLICIES = (DPTF_PARTICIPANT_COUNT-1),
};
/* Active Policy */
@@ -44,6 +45,20 @@ struct dptf_active_policy {
} thresholds[DPTF_MAX_ACX];
};
+/* Passive Policy */
+struct dptf_passive_policy {
+ /* The device that can be throttled */
+ enum dptf_participant source;
+ /* The device that controls the throttling */
+ enum dptf_participant target;
+ /* How often to check the temperature for required throttling (ms) */
+ uint16_t period;
+ /* The trip point for turning on throttling (degrees C) */
+ uint8_t temp;
+ /* Relative priority between Policies */
+ uint8_t priority;
+};
+
/*
* This function provides tables of temperature and corresponding fan or percent. When the
* temperature thresholds are met (_AC0 - _AC9), the fan is driven to corresponding percentage
@@ -51,6 +66,14 @@ struct dptf_active_policy {
*/
void dptf_write_active_policies(const struct dptf_active_policy *policies, int max_count);
+/*
+ * This function uses the definition of the passive policies to write out _PSV Methods on all
+ * participants that define it. It also writes out the Thermal Relationship Table
+ * (\_SB.DPTF._TRT), which describes various passive (i.e., throttling) policies that can be
+ * applies when temperature sensors reach the _PSV threshold.
+ */
+void dptf_write_passive_policies(const struct dptf_passive_policy *policies, int max_count);
+
/* Helper method to open the scope for a given participant. */
void dptf_write_scope(enum dptf_participant participant);