summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/axone
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag/prdf/common/plat/axone')
-rw-r--r--src/usr/diag/prdf/common/plat/axone/axone_mcc_regs.rule80
-rw-r--r--src/usr/diag/prdf/common/plat/axone/axone_omic_regs.rule8
-rw-r--r--src/usr/diag/prdf/common/plat/axone/prdfMccPlugins.C90
-rw-r--r--src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C48
-rw-r--r--src/usr/diag/prdf/common/plat/axone/prdf_plat_axone.mk1
5 files changed, 225 insertions, 2 deletions
diff --git a/src/usr/diag/prdf/common/plat/axone/axone_mcc_regs.rule b/src/usr/diag/prdf/common/plat/axone/axone_mcc_regs.rule
new file mode 100644
index 000000000..001a54e5c
--- /dev/null
+++ b/src/usr/diag/prdf/common/plat/axone/axone_mcc_regs.rule
@@ -0,0 +1,80 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/diag/prdf/common/plat/axone/axone_mcc_regs.rule $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2019
+# [+] 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 registers for mcc, not defined in XML
+###############################################################################
+
+ ###########################################################################
+ # P9 Axone target Channel Fail Config registers
+ ###########################################################################
+
+ register DSTLCFG2
+ {
+ name "P9 Axone DSTL Error Injection Register";
+ scomaddr 0x0701090E;
+ capture group default;
+ };
+
+ register USTLFAILMASK
+ {
+ name "P9 Axone USTL Fail Response Channel Fail Mask";
+ scomaddr 0x07010A13;
+ capture group default;
+ };
+
+ ###########################################################################
+ # P9 Axone target DSTLFIR
+ ###########################################################################
+
+ register DSTLFIR_AND
+ {
+ name "P9 MCC target DSTLFIR atomic AND";
+ scomaddr 0x07010901;
+ capture group never;
+ access write_only;
+ };
+
+ register DSTLFIR_MASK_OR
+ {
+ name "P9 MCC target DSTLFIR MASK atomic OR";
+ scomaddr 0x07010905;
+ capture group never;
+ access write_only;
+ };
+
+ ###########################################################################
+ # P9 Axone target USTLFIR
+ ###########################################################################
+
+ register USTLFIR_MASK_OR
+ {
+ name "P9 MCC target USTLFIR MASK atomic OR";
+ scomaddr 0x07010A05;
+ capture group never;
+ access write_only;
+ };
+
diff --git a/src/usr/diag/prdf/common/plat/axone/axone_omic_regs.rule b/src/usr/diag/prdf/common/plat/axone/axone_omic_regs.rule
index 297cbf9eb..e698652a6 100644
--- a/src/usr/diag/prdf/common/plat/axone/axone_omic_regs.rule
+++ b/src/usr/diag/prdf/common/plat/axone/axone_omic_regs.rule
@@ -32,6 +32,14 @@
# P9 Axone target OMIDLFIR
###########################################################################
+ register OMIDLFIR_MASK_OR
+ {
+ name "P9 OMIC target OMIDLFIR MASK atomic OR";
+ scomaddr 0x07013345;
+ capture group never;
+ access write_only;
+ };
+
register DL0_ERROR_HOLD
{
name "P9 Axone target DL0 Error Hold Register";
diff --git a/src/usr/diag/prdf/common/plat/axone/prdfMccPlugins.C b/src/usr/diag/prdf/common/plat/axone/prdfMccPlugins.C
new file mode 100644
index 000000000..cb0a2a290
--- /dev/null
+++ b/src/usr/diag/prdf/common/plat/axone/prdfMccPlugins.C
@@ -0,0 +1,90 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plat/axone/prdfMccPlugins.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2019 */
+/* [+] 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 <prdfMemUtils.H>
+#include <prdfPlatServices.H>
+
+using namespace TARGETING;
+
+namespace PRDF
+{
+
+using namespace PlatServices;
+
+namespace axone_mcc
+{
+
+//##############################################################################
+//
+// Special plugins
+//
+//##############################################################################
+
+/**
+ * @brief Analysis code that is called before the main analyze() function.
+ * @param i_chip A MCC chip.
+ * @param io_sc The step code data struct.
+ * @param o_analyzed True if analysis is done on this chip, false otherwise.
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ */
+int32_t PreAnalysis( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc,
+ bool & o_analyzed )
+{
+ // Check for a channel failure before analyzing this chip.
+ o_analyzed = MemUtils::analyzeChnlFail<TYPE_MCC>( i_chip, io_sc );
+
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE( axone_mcc, PreAnalysis );
+
+/**
+ * @brief Plugin function called after analysis is complete but before PRD
+ * exits.
+ * @param i_chip A MCC 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_chip, STEP_CODE_DATA_STRUCT & io_sc )
+{
+ // If there was a channel failure some cleanup is required to ensure
+ // there are no more attentions from this channel.
+ MemUtils::cleanupChnlFail<TYPE_MCC>( i_chip, io_sc );
+
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE( axone_mcc, PostAnalysis );
+
+} // end namespace axone_mcc
+
+} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C b/src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C
index de089ab88..04f2d0735 100644
--- a/src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C
+++ b/src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C
@@ -29,6 +29,7 @@
#include <prdfPluginMap.H>
// Platform includes
+#include <prdfMemUtils.H>
#include <prdfPlatServices.H>
using namespace TARGETING;
@@ -43,6 +44,48 @@ namespace axone_omic
//##############################################################################
//
+// Special plugins
+//
+//##############################################################################
+
+/**
+ * @brief Analysis code that is called before the main analyze() function.
+ * @param i_chip An OMIC chip.
+ * @param io_sc The step code data struct.
+ * @param o_analyzed True if analysis is done on this chip, false otherwise.
+ * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
+ */
+int32_t PreAnalysis( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc,
+ bool & o_analyzed )
+{
+ // Check for a channel failure before analyzing this chip.
+ o_analyzed = MemUtils::analyzeChnlFail<TYPE_OMIC>( i_chip, io_sc );
+
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE( axone_omic, PreAnalysis );
+
+/**
+ * @brief Plugin function called after analysis is complete but before PRD
+ * exits.
+ * @param i_chip An OMIC 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_chip, STEP_CODE_DATA_STRUCT & io_sc )
+{
+ // If there was a channel failure some cleanup is required to ensure
+ // there are no more attentions from this channel.
+ MemUtils::cleanupChnlFail<TYPE_OMIC>( i_chip, io_sc );
+
+ return SUCCESS;
+}
+PRDF_PLUGIN_DEFINE( axone_omic, PostAnalysis );
+
+//##############################################################################
+//
// OMIDLFIR
//
//##############################################################################
@@ -86,8 +129,9 @@ int32_t DlFatalError( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc,
dl_error_hold->IsBitSet(63) )
{
// Get and callout the OMI target
- ExtensibleChip * omi = getConnectedChild( i_chip, TYPE_OMI, i_dl );
- io_sc.service_data->SetCallout( omi->getTrgt() );
+ TargetHandle_t omi = getConnectedChild( i_chip->getTrgt(), TYPE_OMI,
+ i_dl );
+ io_sc.service_data->SetCallout( omi );
}
else if ( dl_error_hold->IsBitSet(54) ||
dl_error_hold->IsBitSet(56) ||
diff --git a/src/usr/diag/prdf/common/plat/axone/prdf_plat_axone.mk b/src/usr/diag/prdf/common/plat/axone/prdf_plat_axone.mk
index 4df34292d..24acb5bb6 100644
--- a/src/usr/diag/prdf/common/plat/axone/prdf_plat_axone.mk
+++ b/src/usr/diag/prdf/common/plat/axone/prdf_plat_axone.mk
@@ -38,5 +38,6 @@ prd_incpath += ${PRD_SRC_PATH}/common/plat/axone
################################################################################
# plat/axone/ (rule plugin related)
+prd_rule_plugin += prdfMccPlugins.o
prd_rule_plugin += prdfOmicPlugins.o
OpenPOWER on IntegriCloud