summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend1
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy-native.bb12
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy/thermal-policy.yaml176
3 files changed, 189 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend
index 6bf76ab9d..eebe9fa1d 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/phosphor-dbus-monitor-config-native%.bbappend
@@ -1 +1,2 @@
PHOSPHOR_DBUS_MONITOR_CONFIGS_append = " witherspoon-fan-policy-native"
+PHOSPHOR_DBUS_MONITOR_CONFIGS_append = " witherspoon-thermal-policy-native"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy-native.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy-native.bb
new file mode 100644
index 000000000..39831cf86
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy-native.bb
@@ -0,0 +1,12 @@
+SUMMARY = "Thermal policy for Witherspoon"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-dbus-monitor
+
+SRC_URI += "file://thermal-policy.yaml"
+
+do_install() {
+ install -D ${WORKDIR}/thermal-policy.yaml ${D}${config_dir}/thermal-policy.yaml
+}
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy/thermal-policy.yaml b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy/thermal-policy.yaml
new file mode 100644
index 000000000..185ccef08
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-thermal-policy/thermal-policy.yaml
@@ -0,0 +1,176 @@
+# Witherspoon thermal policy for PDM.
+#
+# Shut down a Witherspoon system if more than three POWER9 cores
+# have a temperature greater than 115 degrees Celcius.
+
+
+- name: core sensors
+ description: >
+ 'Witherspoon has two POWER9 chips with 24 cores each.'
+ class: group
+ group: path
+ members:
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core0_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core1_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core2_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core3_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core4_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core5_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core6_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core7_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core8_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core9_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core10_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core11_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core12_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core13_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core14_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core15_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core16_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core17_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core18_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core19_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core20_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core21_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core22_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p0_core23_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core0_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core1_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core2_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core3_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core4_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core5_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core6_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core7_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core8_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core9_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core10_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core11_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core12_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core13_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core14_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core15_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core16_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core17_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core18_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core19_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core20_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core21_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core22_temp
+ - meta: SENSOR
+ path: /xyz/openbmc_project/sensors/temperature/p1_core23_temp
+
+- name: core temp
+ description: >
+ 'Monitor the temperature of each core.'
+ class: group
+ group: property
+ type: int64
+ members:
+ - interface: xyz.openbmc_project.Sensor.Value
+ meta: TEMP
+ property: Value
+
+- name: watch core temps
+ description: >
+ 'Trigger logic on core temp changes.'
+ class: watch
+ watch: property
+ paths: core sensors
+ properties: core temp
+ callback: check temps
+
+- name: check temps
+ description: >
+ 'If this condition passes at least three cores are running
+ too hot. Shut the system down.'
+ class: condition
+ condition: count
+ paths: core sensors
+ properties: core temp
+ callback: log and shutdown
+ countop: '>='
+ countbound: 3
+ op: '>='
+ bound: 115000
+
+- name: log and shutdown
+ description: >
+ 'Shut the system down and log an event.'
+ class: callback
+ callback: group
+ members:
+ - shutdown
+ - log
+
+- name: shutdown
+ description: >
+ 'Shut down the system.'
+ class: callback
+ callback: method
+ service: org.freedesktop.systemd1
+ path: /org/freedesktop/systemd1
+ interface: org.freedesktop.systemd1.Manager
+ method: StartUnit
+ args:
+ - value: obmc-host-shutdown@0.target
+ type: string
+ - value: replace
+ type: string
+
+- name: log
+ description: >
+ 'Log a shutdown event to the systemd journal.'
+ class: callback
+ callback: journal
+ paths: core sensors
+ properties: core temp
+ severity: ERR
+ message: The system is too hot. Shutting down.
OpenPOWER on IntegriCloud