summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-06-19 01:53:56 +0300
committerEd Tanous <ed.tanous@intel.com>2019-06-19 20:26:17 +0300
commit2c7e8f4ce61f2e0407c37e98e22bbb13e562b414 (patch)
tree9ea192b408585fc2a19b54d196c3d56eaddc4acb /meta-openbmc-mods/meta-common/recipes-phosphor/watchdog
parentaea9e7cbf9bd7677228747a8e7bab4d22bc80103 (diff)
downloadopenbmc-2c7e8f4ce61f2e0407c37e98e22bbb13e562b414.tar.xz
Update to internal 6-18-19
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0003-Add-redfish-log-support-for-IPMI-watchdog-pre-timeou.patch48
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0003-Add-redfish-log-support-for-IPMI-watchdog-pre-timeou.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0003-Add-redfish-log-support-for-IPMI-watchdog-pre-timeou.patch
new file mode 100644
index 000000000..309a8c646
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0003-Add-redfish-log-support-for-IPMI-watchdog-pre-timeou.patch
@@ -0,0 +1,48 @@
+From 46e8e4fe6cb48145152e37380a4064c8957d2ff7 Mon Sep 17 00:00:00 2001
+From: Ren Yu <yux.ren@intel.com>
+Date: Tue, 28 May 2019 17:04:10 +0800
+Subject: [PATCH] Add redfish log support for IPMI watchdog pre-timeout
+ interrupt
+
+Tested:
+Config IPMI watchdog: BIOS FRB2 Power Cycle after 1 seconds:
+ipmitool raw 0x06 0x24 0x01 0x13 0x0 0x2 0xa 0x00
+Start watchdog:
+Ipmitool mc watchdog reset
+Check the redfish logs in 1 seconds:
+https://BMCIP/redfish/v1/Systems/system/LogServices/EventLog/Entries
+
+Signed-off-by: Ren Yu <yux.ren@intel.com>
+---
+ watchdog.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/watchdog.cpp b/watchdog.cpp
+index d893237..5062049 100644
+--- a/watchdog.cpp
++++ b/watchdog.cpp
+@@ -104,6 +104,8 @@ uint64_t Watchdog::timeRemaining(uint64_t value)
+ // Optional callback function on timer expiration
+ void Watchdog::timeOutHandler()
+ {
++ PreTimeoutInterruptAction preTimeoutInterruptAction = preTimeoutInterrupt();
++
+ Action action = expireAction();
+ if (!this->enabled())
+ {
+@@ -117,6 +119,12 @@ void Watchdog::timeOutHandler()
+ "REDFISH_MESSAGE_ARGS=%s",
+ convertForMessage(action).c_str(), NULL);
+
++ sd_journal_send("MESSAGE=IPMIWatchdog: Pre Timed out Interrupt=%s",
++ convertForMessage(preTimeoutInterruptAction).c_str(),
++ "PRIORITY=%i", LOG_INFO, "REDFISH_MESSAGE_ID=%s",
++ "OpenBMC.0.1.IPMIWatchdog", "REDFISH_MESSAGE_ARGS=%s",
++ convertForMessage(preTimeoutInterruptAction).c_str(), NULL);
++
+ expiredTimerUse(currentTimerUse());
+
+ auto target = actionTargetMap.find(action);
+--
+2.7.4
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
index d9c047461..c117102ee 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog_%.bbappend
@@ -2,6 +2,7 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI += "file://0001-Add-redfish-log-support-for-IPMI-watchdog-timeout-ac.patch \
file://0002-Add-restart-cause-support.patch \
+ file://0003-Add-redfish-log-support-for-IPMI-watchdog-pre-timeou.patch \
"
# Remove the override to keep service running after DC cycle