summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChanh Nguyen <chanh@os.amperecomputing.com>2022-04-06 10:02:55 +0300
committerThang Q. Nguyen <thang@os.amperecomputing.com>2022-10-27 05:04:41 +0300
commita688a042ace043a3e60deebe84704735bfcc5183 (patch)
tree5e6b3e064597893a2ce65b3e883a393ba0a705e8
parent16b4d2556b5a885a2512eae4d308c94d41071dc8 (diff)
downloadopenbmc-a688a042ace043a3e60deebe84704735bfcc5183.tar.xz
meta-ampere: mtmitchell: handle overtemp event
Configure gpio monitor to check for OVERTEMP GPIO signals from the Host CPU. Once the event happens, shutdown the Host to avoid hardware damage and log a Redfish event log. Tested: 1. Unplug all FANs and run stress test the Host so that the Temperature can reach 120C. 2. Check if BMC turns OFF the Host when the CPU Temp reaches 120C. Change-Id: Idc2b446023a1ba3476463e5cca28146ae2ead84a Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
-rw-r--r--meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/ampere_overtemp@.service7
-rw-r--r--meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json14
-rw-r--r--meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend1
3 files changed, 22 insertions, 0 deletions
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/ampere_overtemp@.service b/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/ampere_overtemp@.service
new file mode 100644
index 0000000000..06c2e9b226
--- /dev/null
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/ampere_overtemp@.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Ampere Computing LLC Overtemp event handling
+
+[Service]
+Restart=no
+ExecStart=/bin/sh -c "touch /tmp/fault_overtemp && obmcutil chassisoff"
+ExecStartPost=/bin/sh -c "ampere_add_redfishevent.sh OpenBMC.0.1.CPUThermalTrip.Critical %i && sleep 10 && rm /tmp/fault_overtemp"
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json b/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json
index 20573cccd9..bc039aa12f 100644
--- a/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-multi-gpio-monitor.json
@@ -12,5 +12,19 @@
"EventMon": "FALLING",
"Target": "ampere-host-shutdown-ack@0.service",
"Continue": true
+ },
+ {
+ "Name": "S0_OVERTEMP",
+ "LineName": "s0-overtemp-n",
+ "EventMon": "FALLING",
+ "Target": "ampere_overtemp@0.service",
+ "Continue": true
+ },
+ {
+ "Name": "S1_OVERTEMP",
+ "LineName": "s1-overtemp-n",
+ "EventMon": "FALLING",
+ "Target": "ampere_overtemp@1.service",
+ "Continue": true
}
]
diff --git a/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
index 9750f28b93..62fbc6440a 100644
--- a/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
+++ b/meta-ampere/meta-mitchell/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -8,6 +8,7 @@ SRC_URI += " \
SYSTEMD_SERVICE:${PN}-monitor += " \
ampere-host-shutdown-ack@.service \
+ ampere_overtemp@.service \
"
FILES:${PN}-monitor += " \