summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorBenjamin Weisenbeck <bweisenb@us.ibm.com>2018-03-29 11:29:18 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-04-03 11:04:57 -0400
commitc6150efe43c8fb1654eeba23b0aa590a8e02c1eb (patch)
treef6dfd92a8779783d9fd082a2ed5cc762088e07b6 /src/usr
parentdd26705781d32590953917a91a1289ec8dbb2366 (diff)
downloadtalos-hostboot-c6150efe43c8fb1654eeba23b0aa590a8e02c1eb.tar.gz
talos-hostboot-c6150efe43c8fb1654eeba23b0aa590a8e02c1eb.zip
PRD: ABUS lane fail callout support
Change-Id: Ibc0664605487addb239bfa705c3fa21ee534a5ae RTC: 190224 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56476 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56487 CI-Ready: Zane C. Shelley <zshelle@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_obus_actions.rule8
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_xbus_actions.rule2
-rw-r--r--src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.C136
-rw-r--r--src/usr/diag/prdf/common/plat/p9/prdfP9Xbus.C103
-rw-r--r--src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk5
-rw-r--r--src/usr/diag/prdf/common/plat/prdfPlatServices_common.C7
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfPlatServices_common.H8
7 files changed, 145 insertions, 124 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_obus_actions.rule b/src/usr/diag/prdf/common/plat/p9/p9_obus_actions.rule
index 90bd90020..0d5b9390f 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_obus_actions.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_obus_actions.rule
@@ -26,7 +26,7 @@
/** Callout the OBUS interface */
actionclass calloutObusInterface
{
-# funccall("calloutInterface_obus"); RTC 174485
+ funccall("calloutBusInterfacePlugin");
};
/** Callout the OBUS interface, threshold 32 per day */
@@ -40,7 +40,7 @@ actionclass calloutBusInterface_th_32perDay
actionclass spareDeployed
{
calloutObusInterface;
-# funccall("spareDeployed"); RTC 174485
+ funccall("spareDeployed");
};
/** Lane Repair: max spares exceeded */
@@ -48,7 +48,7 @@ actionclass maxSparesExceeded
{
calloutObusInterface;
threshold1;
-# funccall("maxSparesExceeded"); RTC 174485
+ funccall("maxSparesExceeded");
};
/** Lane Repair: too many bus errors */
@@ -56,7 +56,7 @@ actionclass tooManyBusErrors
{
calloutObusInterface;
threshold1;
-# funccall("tooManyBusErrors"); RTC 174485
+ funccall("tooManyBusErrors");
};
# Currently handling each OBUS clock group with the same plugins. May optimize
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_xbus_actions.rule b/src/usr/diag/prdf/common/plat/p9/p9_xbus_actions.rule
index 2afb6c9ed..c37f380fc 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_xbus_actions.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_xbus_actions.rule
@@ -26,7 +26,7 @@
/** Callout the XBUS interface */
actionclass calloutXbusInterface
{
- funccall("calloutInterface_xbus");
+ funccall("calloutBusInterfacePlugin");
};
/** Callout the XBUS interface, threshold 32 per day */
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.C b/src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.C
index 5653b5911..23442a2d7 100644
--- a/src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.C
+++ b/src/usr/diag/prdf/common/plat/p9/prdfLaneRepair.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -27,6 +27,8 @@
#include <prdfLaneRepair.H>
// Framework includes
+#include <prdfPluginDef.H>
+#include <prdfLaneRepair.H>
#include <prdfPlatServices.H>
#include <iipconst.h>
#include <prdfGlobal.H>
@@ -53,7 +55,8 @@ TargetHandle_t getTxBusEndPt( TargetHandle_t i_rxTrgt)
PRDF_ASSERT(nullptr != i_rxTrgt);
- if ( TYPE_XBUS == getTargetType(i_rxTrgt) )
+ TYPE busType = getTargetType(i_rxTrgt);
+ if ( TYPE_XBUS == busType || TYPE_OBUS == busType )
{
o_txTrgt = getConnectedPeerTarget( i_rxTrgt );
}
@@ -72,6 +75,27 @@ int32_t handleLaneRepairEvent( ExtensibleChip * i_chip,
TargetHandle_t rxBusTgt = i_chip->getTrgt();
TargetHandle_t txBusTgt = nullptr;
TYPE busType = getTargetType(rxBusTgt);
+
+ // RTC 174485
+ // Need HWPs for this. Just callout bus interface for now.
+ if (busType == TYPE_OBUS)
+ {
+ if ( obusInSmpMode(rxBusTgt) )
+ {
+ calloutBusInterface( i_chip, i_sc, MRU_LOW );
+ i_sc.service_data->setServiceCall();
+ }
+ else
+ {
+ PRDF_ERR( PRDF_FUNC "Lane repair only supported in SMP mode "
+ "obus: 0x%08x", getHuid(rxBusTgt) );
+ i_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_MED, NO_GARD );
+ i_sc.service_data->SetCallout( SP_CODE, MRU_MED, NO_GARD );
+ i_sc.service_data->setServiceCall();
+ }
+ return SUCCESS;
+ }
+
bool thrExceeded;
// Number of clock groups on this interface. (2 for xbus, 1 for all others)
uint8_t clkGrps = (busType == TYPE_XBUS) ? 2 : 1;
@@ -261,23 +285,43 @@ int32_t calloutBusInterface( ExtensibleChip * i_chip,
do {
// Get both endpoints
- TargetHandle_t i_rxTrgt = i_chip->getTrgt();
- TargetHandle_t i_txTrgt = getTxBusEndPt(i_rxTrgt);
+ TargetHandle_t rxTrgt = i_chip->getTrgt();
+ TYPE rxType = getTargetType(rxTrgt);
+
+ if ( rxType == TYPE_OBUS && !obusInSmpMode( rxTrgt ) )
+ {
+ // There is no support in hostboot for calling out the other end of
+ // an NV or openCAPI bus. By design, any FIR bits associated with
+ // those bus types should not be taking a CalloutBusInterface
+ // action. So if we hit this case, just make a default callout.
+
+ PRDF_ERR( PRDF_FUNC "Lane repair only supported in SMP mode "
+ "obus: 0x%08x", getHuid(rxTrgt) );
+
+ i_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_MED, NO_GARD );
+ i_sc.service_data->SetCallout( SP_CODE, MRU_MED, NO_GARD );
+ i_sc.service_data->setServiceCall();
+ break;
+ }
+
+ TargetHandle_t txTrgt = getTxBusEndPt(rxTrgt);
+ TYPE txType = getTargetType(txTrgt);
// Add the endpoint target callouts
- i_sc.service_data->SetCallout( i_rxTrgt, MRU_MEDA );
- i_sc.service_data->SetCallout( i_txTrgt, MRU_MEDA);
+ i_sc.service_data->SetCallout( rxTrgt, MRU_MEDA );
+ i_sc.service_data->SetCallout( txTrgt, MRU_MEDA);
// Get the HWAS bus type.
- HWAS::busTypeEnum hwasType;
-
- TYPE rxType = getTargetType(i_rxTrgt);
- TYPE txType = getTargetType(i_txTrgt);
+ HWAS::busTypeEnum hwasType = HWAS::X_BUS_TYPE;
if ( TYPE_XBUS == rxType && TYPE_XBUS == txType )
{
hwasType = HWAS::X_BUS_TYPE;
}
+ else if ( TYPE_OBUS == rxType && TYPE_OBUS == txType )
+ {
+ hwasType = HWAS::O_BUS_TYPE;
+ }
else
{
PRDF_ASSERT( false );
@@ -293,7 +337,7 @@ int32_t calloutBusInterface( ExtensibleChip * i_chip,
}
// Callout this bus interface.
- PRDF_ADD_BUS_CALLOUT( errl, i_rxTrgt, i_txTrgt, hwasType, i_priority );
+ PRDF_ADD_BUS_CALLOUT( errl, rxTrgt, txTrgt, hwasType, i_priority );
} while(0);
@@ -302,5 +346,75 @@ int32_t calloutBusInterface( ExtensibleChip * i_chip,
#undef PRDF_FUNC
}
+// Lane Repair Rule Plugins
+
+/**
+ * @brief Handles Spare Lane Deployed Event
+ * @param i_chip XBUS chip.
+ * @param io_sc Step code data struct.
+ * @return SUCCESS always
+ */
+int32_t spareDeployed( ExtensibleChip * i_chip,
+ STEP_CODE_DATA_STRUCT & io_sc )
+{
+ if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
+ return handleLaneRepairEvent(i_chip, io_sc, true);
+ else
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE_NS( p9_xbus, LaneRepair, spareDeployed );
+PRDF_PLUGIN_DEFINE_NS( p9_obus, LaneRepair, spareDeployed );
+
+/**
+ * @brief Handles Max Spares Exceeded Event
+ * @param i_chip XBUS chip.
+ * @param io_sc Step code data struct.
+ * @return SUCCESS always
+ */
+int32_t maxSparesExceeded( ExtensibleChip * i_chip,
+ STEP_CODE_DATA_STRUCT & io_sc )
+{
+ if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
+ return handleLaneRepairEvent(i_chip, io_sc, false);
+ else
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE_NS( p9_xbus, LaneRepair, maxSparesExceeded );
+PRDF_PLUGIN_DEFINE_NS( p9_obus, LaneRepair, maxSparesExceeded );
+
+/**
+ * @brief Handles Too Many Bus Errors Event
+ * @param i_chip XBUS chip.
+ * @param io_sc Step code data struct.
+ * @return SUCCESS always
+ */
+int32_t tooManyBusErrors( ExtensibleChip * i_chip,
+ STEP_CODE_DATA_STRUCT & io_sc )
+{
+ if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
+ return handleLaneRepairEvent(i_chip, io_sc, false);
+ else
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE_NS( p9_xbus, LaneRepair, tooManyBusErrors );
+PRDF_PLUGIN_DEFINE_NS( p9_obus, LaneRepair, tooManyBusErrors );
+
+/**
+ * @brief Add callouts for a BUS interface
+ * @param i_chip Bus endpt chip
+ * @param io_sc Step code data struct.
+ * @return SUCCESS always
+ */
+int32_t calloutBusInterfacePlugin( ExtensibleChip * i_chip,
+ STEP_CODE_DATA_STRUCT & io_sc )
+{
+ calloutBusInterface(i_chip, io_sc, MRU_LOW);
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE_NS( p9_xbus, LaneRepair, calloutBusInterfacePlugin );
+PRDF_PLUGIN_DEFINE_NS( p9_obus, LaneRepair, calloutBusInterfacePlugin );
+
} // end namespace LaneRepair
+
} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Xbus.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Xbus.C
deleted file mode 100644
index dff94ad74..000000000
--- a/src/usr/diag/prdf/common/plat/p9/prdfP9Xbus.C
+++ /dev/null
@@ -1,103 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9Xbus.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2017 */
-/* [+] International Business Machines Corp. */
-/* */
-/* */
-/* 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. */
-/* */
-/* IBM_PROLOG_END_TAG */
-// Framework includes
-#include <prdfPluginDef.H>
-#include <iipServiceDataCollector.h>
-#include <prdfExtensibleChip.H>
-#include <prdfPluginMap.H>
-
-#include <prdfLaneRepair.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-using namespace LaneRepair;
-
-namespace p9_xbus
-{
-
-/**
- * @brief Handles Spare Lane Deployed Event
- * @param i_chip XBUS chip.
- * @param io_sc Step code data struct.
- * @return SUCCESS always
- */
-int32_t spareDeployed( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
- return handleLaneRepairEvent(i_chip, io_sc, true);
- else
- return SUCCESS;
-} PRDF_PLUGIN_DEFINE( p9_xbus, spareDeployed );
-
-/**
- * @brief Handles Max Spares Exceeded Event
- * @param i_chip XBUS chip.
- * @param io_sc Step code data struct.
- * @return SUCCESS always
- */
-int32_t maxSparesExceeded( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
- return handleLaneRepairEvent(i_chip, io_sc, false);
- else
- return SUCCESS;
-} PRDF_PLUGIN_DEFINE( p9_xbus, maxSparesExceeded );
-
-/**
- * @brief Handles Too Many Bus Errors Event
- * @param i_chip XBUS chip.
- * @param io_sc Step code data struct.
- * @return SUCCESS always
- */
-int32_t tooManyBusErrors( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
- return handleLaneRepairEvent(i_chip, io_sc, false);
- else
- return SUCCESS;
-} PRDF_PLUGIN_DEFINE( p9_xbus, tooManyBusErrors );
-
-/**
- * @brief Add callouts for an XBUS interface
- * @param i_chip XBUS chip.
- * @param io_sc Step code data struct.
- * @return SUCCESS always
- */
-int32_t calloutInterface_xbus( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- calloutBusInterface(i_chip, io_sc, MRU_LOW);
- return SUCCESS;
-} PRDF_PLUGIN_DEFINE( p9_xbus, calloutInterface_xbus );
-
-} // end namespace Proc
-} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk b/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk
index 2207017b8..ed808bf82 100644
--- a/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk
+++ b/src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016,2017
+# Contributors Listed Below - COPYRIGHT 2016,2018
# [+] International Business Machines Corp.
#
#
@@ -43,13 +43,12 @@ prd_obj += prdfP9PllDomain.o
prd_obj += prdfFsiCapUtil.o
prd_obj += prdfP9ProcDomain.o
prd_obj += prdfLineDelete.o
-prd_obj += prdfLaneRepair.o
# rule plugin related
prd_rule_plugin += prdfP9Proc.o
prd_rule_plugin += prdfP9Pll.o
prd_rule_plugin += prdfCommonPlugins.o
+prd_rule_plugin += prdfLaneRepair.o
prd_rule_plugin += prdfP9Ex.o
-prd_rule_plugin += prdfP9Xbus.o
prd_rule_plugin += prdfP9Ec.o
prd_rule_plugin += prdfP9Eq.o
diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C
index 471e98b58..30cc2568b 100644
--- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C
+++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -253,6 +253,11 @@ int32_t setVpdFailedLanesXbus(TargetHandle_t i_rxBusTgt,
return o_rc;
}
+bool obusInSmpMode( TargetHandle_t obus )
+{
+ return obus->getAttr<ATTR_OPTICS_CONFIG_MODE>() == OPTICS_CONFIG_MODE_SMP;
+}
+
//##############################################################################
//## Memory specific functions
//##############################################################################
diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H
index 67f0dc685..a62325226 100755
--- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H
+++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -190,6 +190,12 @@ int32_t setVpdFailedLanesXbus(TARGETING::TargetHandle_t i_rxBusTgt,
bool & o_thrExceeded,
uint8_t i_clkGrp);
+/**
+ * @brief Checks if OBUS target is configured in SMP (ABUS) mode
+ * @param obusTgt OBUS target to check
+ * @return true if SMP mode
+ */
+bool obusInSmpMode(TARGETING::TargetHandle_t obusTgt);
//##############################################################################
//## Memory specific functions
OpenPOWER on IntegriCloud