NMI (soft reset) control code enablement

Changes here include:
   1) A service that triggers Open BMC App (openpower-proc-nmi)
   2) An application that waits for a dbus event (NMI) to occur
   3) A reset logic that triggers a NMI/softreset dbus service which
      will invoke pdbg call to trigger stop followed by sreset on all
      threads
   4) Necessary Makefile.am changes

Tested: Verified following
 1) openpower-proc-nmi app is automatically started once host is started
 2) After killing the app made sure app is restarted successfully
 3) Verified NMI is detected on the Host side and crash dump being
    collected in /var/crash/ and taking a watchdog triggered reboot
 4) System coming back to original state once all #3 is completed
 5) Powered off the system (obmcutil poweroff) service disabled and
    enabled after host is powered on

Signed-off-by: Lakshminarayana R. Kammath <lkammath@in.ibm.com>
Change-Id: I16f3bb2a2ed0c0ffcea2a720a2ae39a2b303ef9e
diff --git a/nmi_main.cpp b/nmi_main.cpp
new file mode 100644
index 0000000..dafc9b1
--- /dev/null
+++ b/nmi_main.cpp
@@ -0,0 +1,40 @@
+/**
+ * Copyright © 2019 IBM Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "nmi_interface.hpp"
+
+#include <sdbusplus/bus.hpp>
+
+int main(int argc, char* argv[])
+{
+
+    constexpr auto BUSPATH_NMI = "/xyz/openbmc_project/control/host0/nmi";
+    constexpr auto BUSNAME_NMI = "xyz.openbmc_project.Control.Host.NMI";
+    auto bus = sdbusplus::bus::new_default();
+
+    // Add sdbusplus ObjectManager
+    sdbusplus::server::manager::manager objManager(bus, BUSPATH_NMI);
+    openpower::proc::NMI NMI(bus, BUSPATH_NMI);
+    bus.request_name(BUSNAME_NMI);
+
+    while (true)
+    {
+        bus.process_discard();
+        bus.wait();
+    }
+
+    return 0;
+}