Add OemRouter facility.
OemRouter adds a facility to register OEM Group Message handlers,
then dispatch matching messages to the registered handler.
Added as a core source so that any dynamic provider can register its
messages without requiring any specific load order.
Includes code fixes for x86 portability.
Change-Id: I47b8fe7873e3c7fdf35a00d3c8a7e17d30c398c4
Signed-off-by: Peter Hanson <peterh@google.com>
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/ipmid.cpp b/ipmid.cpp
index 3d7c663..f664488 100644
--- a/ipmid.cpp
+++ b/ipmid.cpp
@@ -27,6 +27,7 @@
#include <host-cmd-manager.hpp>
#include <host-ipmid/ipmid-host-cmd.hpp>
#include <timer.hpp>
+#include "host-ipmid/oemrouter.hpp"
using namespace phosphor::logging;
namespace sdbusRule = sdbusplus::bus::match::rules;
@@ -616,6 +617,9 @@
cmdManager = std::make_unique<phosphor::host::command::Manager>(
*sdbusp, events);
+ // Activate OemRouter.
+ oem::mutableRouter()->activate();
+
// Register all the handlers that provider implementation to IPMI commands.
ipmi_register_callback_handlers(HOST_IPMI_LIB_PATH);