summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2016-09-27 09:25:58 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2016-10-12 09:20:49 -0400
commit6c8eba571369f2df68aae86d9997a97341f55bcc (patch)
tree29fb56e8fc807b3edb1d04ed4bc94a2a7abc7b16
parent0b7c4b006db5fc7333a83ea927b0dc0004a97167 (diff)
downloadtalos-hostboot-6c8eba571369f2df68aae86d9997a97341f55bcc.tar.gz
talos-hostboot-6c8eba571369f2df68aae86d9997a97341f55bcc.zip
PRD: add support for RCD parity errors
Change-Id: Ibba87b4efeb8533f74954d652356d80f94c5da65 RTC: 161894 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30565 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30990 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_mca.rule4
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_mca_actions.rule10
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfTargetServices.C14
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfP9Mca.C110
-rw-r--r--src/usr/diag/prdf/plat/mem/prdf_plat_mem_hb_only.mk1
5 files changed, 133 insertions, 6 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_mca.rule b/src/usr/diag/prdf/common/plat/p9/p9_mca.rule
index b23c5ae33..8c29acced 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_mca.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_mca.rule
@@ -242,7 +242,7 @@ group gMCACALFIR filter singlebit
/** MCACALFIR[4]
* A RCD parity error has been detected
*/
- (rMCACALFIR, bit(4)) ? defaultMaskedError;
+ (rMCACALFIR, bit(4)) ? rcd_parity_error;
/** MCACALFIR[5]
* Calibration complete indication xout
@@ -287,7 +287,7 @@ group gMCACALFIR filter singlebit
/** MCACALFIR[13]
* Persistent RCD error, port failed
*/
- (rMCACALFIR, bit(13)) ? defaultMaskedError;
+ (rMCACALFIR, bit(13)) ? all_dimm_H_self_L_th_1;
/** MCACALFIR[14]
* RCD during periodic cal
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_mca_actions.rule b/src/usr/diag/prdf/common/plat/p9/p9_mca_actions.rule
index 85fb62742..9a332d62b 100644
--- a/src/usr/diag/prdf/common/plat/p9/p9_mca_actions.rule
+++ b/src/usr/diag/prdf/common/plat/p9/p9_mca_actions.rule
@@ -52,3 +52,13 @@ actionclass mainline_ce_ue_handling
TBDDefaultCallout;
};
+/** Handle RCD parity error. */
+actionclass rcd_parity_error
+{
+ callout(connected(TYPE_DIMM,0), MRU_HIGH); # DIMM 0 HIGH
+ callout(connected(TYPE_DIMM,1), MRU_HIGH); # DIMM 1 HIGH
+ calloutSelfLow; # Self LOW
+ threshold32pday; # Threshold 32/day
+ funccall("RcdParityError"); # Run TPS on TH for all MCA ranks
+};
+
diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.C b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
index 07e0c09fa..2b7ef7b98 100755
--- a/src/usr/diag/prdf/common/plat/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
@@ -1410,8 +1410,8 @@ void getMasterRanks<TYPE_MBA>( TargetHandle_t i_trgt,
//------------------------------------------------------------------------------
template<TARGETING::TYPE T>
-void getSlaveRanks( TargetHandle_t i_trgt, std::vector<MemRank> & o_ranks,
- uint8_t i_ds )
+void __getSlaveRanks( TargetHandle_t i_trgt, std::vector<MemRank> & o_ranks,
+ uint8_t i_ds )
{
PRDF_ASSERT( nullptr != i_trgt );
PRDF_ASSERT( T == getTargetType(i_trgt) );
@@ -1452,12 +1452,18 @@ void getSlaveRanks( TargetHandle_t i_trgt, std::vector<MemRank> & o_ranks,
template<>
void getSlaveRanks<TYPE_MCA>( TargetHandle_t i_trgt,
std::vector<MemRank> & o_ranks,
- uint8_t i_ds );
+ uint8_t i_ds )
+{
+ __getSlaveRanks<TYPE_MCA>( i_trgt, o_ranks, i_ds );
+}
template<>
void getSlaveRanks<TYPE_MBA>( TargetHandle_t i_trgt,
std::vector<MemRank> & o_ranks,
- uint8_t i_ds );
+ uint8_t i_ds )
+{
+ __getSlaveRanks<TYPE_MBA>( i_trgt, o_ranks, i_ds );
+}
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/plat/mem/prdfP9Mca.C b/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
new file mode 100644
index 000000000..97b966acc
--- /dev/null
+++ b/src/usr/diag/prdf/plat/mem/prdfP9Mca.C
@@ -0,0 +1,110 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/plat/mem/prdfP9Mca.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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 <iipServiceDataCollector.h>
+#include <prdfExtensibleChip.H>
+#include <prdfPluginMap.H>
+
+// Platform includes
+#include <prdfP9McbistDataBundle.H>
+#include <prdfPlatServices.H>
+#ifdef __HOSTBOOT_RUNTIME
+ #include <prdfMemTps_rt.H>
+#endif
+
+
+using namespace TARGETING;
+
+namespace PRDF
+{
+
+using namespace PlatServices;
+
+namespace p9_mca
+{
+
+//##############################################################################
+//
+// MCACALFIR
+//
+//##############################################################################
+
+/**
+ * @brief MCACALFIR[4] - RCD Parity Error.
+ * @param i_mcaChip A P9 MCA chip.
+ * @param io_sc The step code data struct.
+ * @return SUCCESS
+ */
+int32_t RcdParityError( ExtensibleChip * i_mcaChip,
+ STEP_CODE_DATA_STRUCT & io_sc )
+{
+ #define PRDF_FUNC "[p9_mca::RcdParityError] "
+
+ // The callouts have already been made in the rule code. All we need to do
+ // now is start TPS on all slave ranks behind the MCA. This can only be done
+ // at runtime because it is too complicated to handle during Memory
+ // Diagnostics and we don't have time to complete the procedures at any
+ // other point during the IPL. The DIMMs will be deconfigured during the IPL
+ // anyways. So not really much benefit except for extra FFDC.
+
+ #ifdef __HOSTBOOT_RUNTIME // TPS only supported at runtime.
+
+ if ( io_sc.service_data->IsAtThreshold() )
+ {
+ ExtensibleChip * mcbChip = getConnectedParent( i_mcaChip, TYPE_MCBIST );
+ PRDF_ASSERT( nullptr != mcbChip );
+
+ McbistDataBundle * mcbdb = getMcbistDataBundle( mcbChip );
+
+ std::vector<MemRank> list;
+ getSlaveRanks<TYPE_MCA>( i_mcaChip->getTrgt(), list );
+
+ for ( auto & r : list )
+ {
+ TdEntry * entry = new TpsEvent<TYPE_MCA>( i_mcaChip, r );
+ uint32_t rc = mcbdb->getTdCtlr()->handleTdEvent( io_sc, entry );
+ if ( SUCCESS != rc )
+ {
+ PRDF_ERR( PRDF_FUNC "handleTdEvent(m%ds%s) failed on 0x%08x",
+ i_mcaChip->getHuid() );
+
+ continue; // Try the other ranks.
+ }
+ }
+ }
+
+ #endif
+
+ return SUCCESS;
+
+ #undef PRDF_FUNC
+}
+PRDF_PLUGIN_DEFINE( p9_mca, RcdParityError );
+
+} // end namespace p9_mca
+
+} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/plat/mem/prdf_plat_mem_hb_only.mk b/src/usr/diag/prdf/plat/mem/prdf_plat_mem_hb_only.mk
index 596f3a8f1..88bd84fdc 100644
--- a/src/usr/diag/prdf/plat/mem/prdf_plat_mem_hb_only.mk
+++ b/src/usr/diag/prdf/plat/mem/prdf_plat_mem_hb_only.mk
@@ -38,6 +38,7 @@ prd_incpath += ${PRD_SRC_PATH}/plat/mem
################################################################################
# plat/mem/ (rule plugin related)
+prd_rule_plugin += prdfP9Mca.o
prd_rule_plugin += prdfP9Mcbist.o
################################################################################
OpenPOWER on IntegriCloud