summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/hwasPlatCallout.C
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-04-25 16:53:55 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-05-08 11:34:22 -0500
commit3541d56fbffa428a51ae0eb7bc963e45ce48d836 (patch)
tree6371aeea73b89987bf9ff2aceb9e2a57fd64160f /src/usr/hwas/hwasPlatCallout.C
parent750329e0758039e2692b3c26c28a4debb8feea1c (diff)
downloadtalos-hostboot-3541d56fbffa428a51ae0eb7bc963e45ce48d836.tar.gz
talos-hostboot-3541d56fbffa428a51ae0eb7bc963e45ce48d836.zip
add platform specific callout functions for FSP integration.
Make the HWAS function processCallout() be common instead of hostboot specific, and create new platform specific functions for the processing of procedure and hardware callouts. Intention is that hostboot and fsp will use these to read the hwas hostboot-created callout_ud_t structure out of an errlog. Change-Id: Ie5679b0a833f802744bfd8f5285901b73f022d52 RTC: 49965 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4275 Tested-by: Jenkins Server Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/hwasPlatCallout.C')
-rw-r--r--src/usr/hwas/hwasPlatCallout.C119
1 files changed, 119 insertions, 0 deletions
diff --git a/src/usr/hwas/hwasPlatCallout.C b/src/usr/hwas/hwasPlatCallout.C
new file mode 100644
index 000000000..10d84e877
--- /dev/null
+++ b/src/usr/hwas/hwasPlatCallout.C
@@ -0,0 +1,119 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwas/hwasPlatCallout.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file hwasPlatCallout.C
+ *
+ * @brief Platform Callout specific functions
+ */
+
+#include <hwas/common/hwas.H>
+#include <hwas/common/hwasCommon.H>
+#include <hwas/common/hwasCallout.H>
+#include <hwas/common/deconfigGard.H>
+
+namespace HWAS
+{
+
+//******************************************************************************
+// platHandleProcedureCallout
+//******************************************************************************
+errlHndl_t platHandleProcedureCallout(
+ errlHndl_t i_errl,
+ epubProcedureID i_procedure,
+ callOutPriority i_priority)
+{
+ errlHndl_t errl = NULL;
+
+ // hostboot does not handle or do any action for procedure callouts
+ return errl;
+}
+
+//******************************************************************************
+// platHandleHWCallout
+//******************************************************************************
+errlHndl_t platHandleHWCallout(
+ TARGETING::Target *i_pTarget,
+ callOutPriority i_priority,
+ DeconfigEnum i_deconfigState,
+ errlHndl_t i_errl,
+ GARD_ErrorType i_gardErrorType)
+{
+ errlHndl_t errl = NULL;
+
+ HWAS_INF("HW callout; pTarget %p gardErrorType %x deconfigState %x",
+ i_pTarget, i_gardErrorType, i_deconfigState);
+ switch (i_gardErrorType)
+ {
+ case (GARD_NULL):
+ { // means no GARD operations
+ break;
+ }
+ default:
+ {
+ errl = HWAS::theDeconfigGard().createGardRecord(*i_pTarget,
+ i_errl->plid(),
+ i_gardErrorType);
+ break;
+ }
+ } // switch i_gardErrorType
+
+ switch (i_deconfigState)
+ {
+ case (NO_DECONFIG):
+ {
+ break;
+ }
+ case (DECONFIG):
+ {
+ // call HWAS common function
+ errl = HWAS::theDeconfigGard().deconfigureTarget(*i_pTarget,
+ i_errl->plid());
+ break;
+ }
+ case (DELAYED_DECONFIG):
+ {
+ // check to see if this target is the master processor
+ TARGETING::Target *l_masterProc;
+ TARGETING::targetService().masterProcChipTargetHandle(
+ l_masterProc);
+ if (i_pTarget == l_masterProc)
+ {
+ // if so, we can't run anymore, so we will
+ // call HWAS to deconfigure, forcing the issue now.
+ // TODO: RTC: 45781
+ HWAS_ERR("callout - DELAYED_DECONFIG on MasterProc");
+ errl = HWAS::theDeconfigGard().deconfigureTarget(*i_pTarget,
+ i_errl->plid());
+ break;
+ }
+ // else
+ // do nothing -- the deconfig information was already
+ // put on a queue and will be processed separately,
+ // when the time is right.
+ break;
+ }
+ } // switch i_deconfigState
+ return errl;
+}
+
+} // namespace HWAS
OpenPOWER on IntegriCloud