nmi: Use libpdbg directly
This avoids calling DBus to run a systemd unit that is effectively a
shell script when we already have libpdbg on the system anyway.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I9a36c38f075d402b9bc406433475a371d1cdbe62
diff --git a/nmi_main.cpp b/nmi_main.cpp
index dafc9b1..3a12bce 100644
--- a/nmi_main.cpp
+++ b/nmi_main.cpp
@@ -16,6 +16,8 @@
#include "nmi_interface.hpp"
+#include <libpdbg.h>
+
#include <sdbusplus/bus.hpp>
int main(int argc, char* argv[])
@@ -25,6 +27,8 @@
constexpr auto BUSNAME_NMI = "xyz.openbmc_project.Control.Host.NMI";
auto bus = sdbusplus::bus::new_default();
+ pdbg_targets_init(NULL);
+
// Add sdbusplus ObjectManager
sdbusplus::server::manager::manager objManager(bus, BUSPATH_NMI);
openpower::proc::NMI NMI(bus, BUSPATH_NMI);