summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/runtime/interface.h6
-rw-r--r--src/runtime/rt_main.C11
-rw-r--r--src/usr/htmgt/runtime/rt_occ.C36
3 files changed, 51 insertions, 2 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index 823f44eda..aca952616 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -983,6 +983,12 @@ struct postInitCalls_t
*/
void (*callClearPendingSbeMsgs)();
+ /**
+ * @brief Clear pending OCC messages
+ *
+ */
+ void (*callClearPendingOccMsgs)();
+
};
extern hostInterfaces_t* g_hostInterfaces;
diff --git a/src/runtime/rt_main.C b/src/runtime/rt_main.C
index 19a15e518..7aa631c7e 100644
--- a/src/runtime/rt_main.C
+++ b/src/runtime/rt_main.C
@@ -142,6 +142,17 @@ runtimeInterfaces_t* rt_start(hostInterfaces_t* intf)
// check for possible missed in-flight messages/interrupts
rtPost->callClearPendingSbeMsgs();
+ // check for possible missed in-flight messages/interrupts
+ if (rtPost->callClearPendingOccMsgs != nullptr )
+ {
+ // vector ptr has been initted, use it
+ rtPost->callClearPendingOccMsgs();
+ }
+ else
+ {
+ // (HTMGT not compiled in by default)
+ }
+
// do any version mismatch fixups
rt_version_fixup();
diff --git a/src/usr/htmgt/runtime/rt_occ.C b/src/usr/htmgt/runtime/rt_occ.C
index a3e8a3750..7c453ffc2 100644
--- a/src/usr/htmgt/runtime/rt_occ.C
+++ b/src/usr/htmgt/runtime/rt_occ.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2017 */
+/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -158,5 +158,37 @@ namespace HTMGT
};
registerOcc g_registerOcc;
-}
+
+//------------------------------------------------------------------------
+
+ void process_occ_clr_msgs( void )
+ {
+#ifdef CONFIG_HTMGT
+ // a NULL parameter will cause processOccError() to poll
+ // all of the OCCs (since the parm was invalid)
+ TARGETING::Target * l_DummyOccTarget = nullptr;
+ HTMGT::processOccError(l_DummyOccTarget);
+#else
+ TMGT_ERR("Unexpected call to process_occ_clr_msgs"
+ " when HTMGT is not enabled");
+#endif
+ }
+
+
+ //------------------------------------------------------------------------
+
+ struct registerOccStartup
+ {
+ registerOccStartup()
+ {
+ // Register interface for Host to call
+ postInitCalls_t * rt_post = getPostInitCalls();
+ rt_post->callClearPendingOccMsgs = &process_occ_clr_msgs;
+ }
+
+ };
+
+ registerOccStartup g_registerOccStartup;
+
+} // end namespace HTMGT
OpenPOWER on IntegriCloud