From 2a64b8ae9b952b18b4aef38cb7c41ce6dba16c50 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Mon, 24 May 2021 12:54:37 -0700 Subject: Update to internal 0.52 Signed-off-by: Jason M. Bills --- ...ize-phosphor-watchdog-for-Intel-platforms.patch | 38 +++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch') diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch index d137f6971..a634b1588 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/watchdog/phosphor-watchdog/0001-Customize-phosphor-watchdog-for-Intel-platforms.patch @@ -1,4 +1,4 @@ -From 0e426ce8bcde3b6fb131405ef265250a96aa7e0a Mon Sep 17 00:00:00 2001 +From 67797d726b6eb6fa8e1dad063c7d2021cec47ab3 Mon Sep 17 00:00:00 2001 From: James Feist Date: Mon, 17 Jun 2019 12:00:58 -0700 Subject: [PATCH] Customize phosphor-watchdog for Intel platforms @@ -11,19 +11,23 @@ required for compatibility with Intel platforms. 3. Use host status to enable/disable watchdog 4. Set preTimeoutInterruptOccurFlag 5. Assign watchdog cause for correct reset cause reporting + 6. Add NMI Pre-Interrupt support for IPMI watchdog timer. Signed-off-by: James Feist Signed-off-by: Ren Yu Signed-off-by: Yong Li Signed-off-by: Jason M. Bills Signed-off-by: Johnathan Mantey +Signed-off-by: Sunita Kumari + +%% original patch: 0001-Customize-phosphor-watchdog-for-Intel-platforms.patch --- - watchdog.cpp | 212 ++++++++++++++++++++++++++++++++++++++++++++++++--- + watchdog.cpp | 230 ++++++++++++++++++++++++++++++++++++++++++++++++--- watchdog.hpp | 23 +++++- - 2 files changed, 224 insertions(+), 11 deletions(-) + 2 files changed, 242 insertions(+), 11 deletions(-) diff --git a/watchdog.cpp b/watchdog.cpp -index 9090760..2685401 100644 +index 57e9050..1204db4 100644 --- a/watchdog.cpp +++ b/watchdog.cpp @@ -1,11 +1,14 @@ @@ -41,7 +45,7 @@ index 9090760..2685401 100644 namespace phosphor { -@@ -18,10 +21,77 @@ using namespace phosphor::logging; +@@ -18,10 +21,86 @@ using namespace phosphor::logging; using sdbusplus::exception::SdBusError; using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure; @@ -104,6 +108,15 @@ index 9090760..2685401 100644 +static constexpr const char* request = "RequestedHostTransition"; +} // namespace host + ++namespace nmi ++{ ++static constexpr const char* busName = "xyz.openbmc_project.Control.Host.NMI"; ++static constexpr const char* path = "/xyz/openbmc_project/control/host0/nmi"; ++static constexpr const char* interface = "xyz.openbmc_project.Control.Host.NMI"; ++static constexpr const char* request = "NMI"; ++ ++} // namespace nmi ++ +void Watchdog::powerStateChangedHandler( + const std::map>& props) +{ @@ -123,7 +136,7 @@ index 9090760..2685401 100644 void Watchdog::resetTimeRemaining(bool enableWatchdog) { -@@ -102,13 +172,102 @@ uint64_t Watchdog::interval(uint64_t value) +@@ -107,13 +186,111 @@ uint64_t Watchdog::interval(uint64_t value) // Optional callback function on timer expiration void Watchdog::timeOutHandler() { @@ -223,11 +236,20 @@ index 9090760..2685401 100644 + "Watchdog timeout. timer use: %s", + preInterruptActionMessageArgs.c_str(), + timeUserMessage.c_str(), NULL); ++ ++ if (preTimeoutInterruptAction == ++ Watchdog::PreTimeoutInterruptAction::NMI) ++ { ++ sdbusplus::message::message preTimeoutInterruptHandler; ++ preTimeoutInterruptHandler = bus.new_method_call( ++ nmi::busName, nmi::path, nmi::interface, nmi::request); ++ bus.call_noreply(preTimeoutInterruptHandler); ++ } + } auto target = actionTargetMap.find(action); if (target == actionTargetMap.end()) -@@ -128,12 +287,45 @@ void Watchdog::timeOutHandler() +@@ -133,12 +310,45 @@ void Watchdog::timeOutHandler() try { @@ -327,5 +349,5 @@ index 7de9bb3..b004b7a 100644 void timeOutHandler(); -- -2.29.2 +2.17.1 -- cgit v1.2.3