summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-10-11 21:04:02 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-10-14 15:24:34 -0400
commitf1a0f38bcc7e6eb5d1f0df7a2c9e59dad0f439e7 (patch)
tree891fa25c6b78873ad45f9e50abc56c799ff9fd57 /src
parent1b42fde7fb28e27fab83949e049db80c4f469992 (diff)
downloadtalos-hostboot-f1a0f38bcc7e6eb5d1f0df7a2c9e59dad0f439e7.tar.gz
talos-hostboot-f1a0f38bcc7e6eb5d1f0df7a2c9e59dad0f439e7.zip
PRD: cleanup CHIFIR after centaur attention
Change-Id: Ibb40b3d317b6935f6c8ebf55fd871a9cac70ddad Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48275 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: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48347 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')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfCenMembuf.C85
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemUtils.C39
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemUtils.H10
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk1
-rw-r--r--src/usr/diag/prdf/common/plat/p9/p9_dmi_regs.rule38
5 files changed, 166 insertions, 7 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/mem/prdfCenMembuf.C
new file mode 100644
index 000000000..8c57b4baf
--- /dev/null
+++ b/src/usr/diag/prdf/common/plat/mem/prdfCenMembuf.C
@@ -0,0 +1,85 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plat/mem/prdfCenMembuf.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 <iipServiceDataCollector.h>
+#include <prdfExtensibleChip.H>
+#include <prdfPluginDef.H>
+#include <prdfPluginMap.H>
+
+// Platform includes
+#include <prdfMemUtils.H>
+
+using namespace TARGETING;
+
+namespace PRDF
+{
+
+using namespace PlatServices;
+
+namespace cen_centaur
+{
+
+//##############################################################################
+//
+// Special plugins
+//
+//##############################################################################
+
+/**
+ * @brief Plugin function called after analysis is complete but before PRD
+ * exits.
+ * @param i_mbChip A Centaur chip.
+ * @param io_sc The step code data struct.
+ * @note This is especially useful for any analysis that still needs to be
+ * done after the framework clears the FIR bits that were at attention.
+ * @return SUCCESS.
+ */
+int32_t PostAnalysis( ExtensibleChip * i_mbChip, STEP_CODE_DATA_STRUCT & io_sc )
+{
+ #define PRDF_FUNC "[cen_centaur::PostAnalysis] "
+
+ if ( CHECK_STOP != io_sc.service_data->getPrimaryAttnType() )
+ {
+ // Cleanup processor FIR bits on the other side of the channel.
+ if ( SUCCESS != MemUtils::chnlFirCleanup(i_mbChip) )
+ {
+ PRDF_ERR( PRDF_FUNC "chnlFirCleanup(0x%08x) failed",
+ i_mbChip->getHuid() );
+ }
+ }
+
+ return SUCCESS;
+
+ #undef PRDF_FUNC
+}
+PRDF_PLUGIN_DEFINE( cen_centaur, PostAnalysis );
+
+//------------------------------------------------------------------------------
+
+} // end namespace cen_centaur
+
+} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.C b/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.C
index 942d98b94..9b715c8a7 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.C
@@ -458,9 +458,44 @@ uint8_t getDramSize<TYPE_MBA>(ExtensibleChip *i_chip, uint8_t i_dimmSlct)
}
-//TODO RTC 166802
//------------------------------------------------------------------------------
-/*
+
+uint32_t chnlFirCleanup( ExtensibleChip * i_mbChip )
+{
+ #define PRDF_FUNC "[MemUtils::chnlFirCleanup] "
+
+ uint32_t o_rc = SUCCESS;
+
+ ExtensibleChip * dmiChip = getConnectedParent( i_mbChip, TYPE_DMI );
+
+ // Clear the associated FIR bits for all attention types.
+ // NOTE: If there are any active attentions left in the Centaur the
+ // associated FIR bit will be redriven with the next packet on the bus
+
+ SCAN_COMM_REGISTER_CLASS * reg = dmiChip->getRegister("CHIFIR_AND");
+
+ reg->setAllBits();
+ reg->ClearBit(16); // CS
+ reg->ClearBit(19); // RE
+ reg->ClearBit(20); // SPA
+ reg->ClearBit(21); // maintenance command complete
+
+ o_rc = reg->Write();
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "CHIFIR_AND write failed on 0x%08x",
+ dmiChip->getHuid() );
+ }
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+
+}
+
+//------------------------------------------------------------------------------
+
+/* TODO RTC 166802
int32_t checkMcsChannelFail( ExtensibleChip * i_mcsChip,
STEP_CODE_DATA_STRUCT & io_sc )
{
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.H b/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.H
index ace4a9f1f..48b9558b7 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemUtils.H
@@ -138,13 +138,13 @@ int32_t getRawCardType( TARGETING::TargetHandle_t i_mba,
CEN_SYMBOL::WiringType & o_type );
/**
- * @brief Cleanup MCIFIR bits on proc side for hostboot.
- * @param i_mbChip Membuf chip.
- * @param i_sc Service Data Collector.
+ * @brief When handling attentions on a memory buffer, there will be FIR bits
+ * on the processor side of the bus that must be manually cleaned up in
+ * order to completely clear the attention.
+ * @param i_mbChip MEMBUF chip.
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
-int32_t mcifirCleanup( ExtensibleChip *i_mbChip,
- STEP_CODE_DATA_STRUCT & i_sc );
+uint32_t chnlFirCleanup( ExtensibleChip * i_mbChip );
} // end namespace MemUtils
diff --git a/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk b/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk
index 5d5ad8fb8..c3a1c3340 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk
+++ b/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk
@@ -51,6 +51,7 @@ prd_obj += prdfMemUtils.o
prd_obj += prdfMemThresholds.o
# rule plugin related
+prd_rule_plugin += prdfCenMembuf.o
prd_rule_plugin += prdfP9Mca_common.o
prd_rule_plugin += prdfP9Mcbist_common.o
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_dmi_regs.rule b/src/usr/diag/prdf/common/plat/p9/p9_dmi_regs.rule
new file mode 100644
index 000000000..ba0b0601d
--- /dev/null
+++ b/src/usr/diag/prdf/common/plat/p9/p9_dmi_regs.rule
@@ -0,0 +1,38 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/diag/prdf/common/plat/p9/p9_dmi_regs.rule $
+#
+# 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
+
+ ############################################################################
+ # Additional regs for P9 DMI target CHIFIR
+ ############################################################################
+
+ register CHIFIR_AND
+ {
+ name "P9 DMI target CHIFIR atomic AND";
+ scomaddr 0x07010901;
+ capture group never;
+ access write_only;
+ };
+
+
OpenPOWER on IntegriCloud