Skip to content

Commit

Permalink
PRD: Initial Axone Channel Fail support
Browse files Browse the repository at this point in the history
Change-Id: I1a86cd97e2188409a1fbcc2fd8981ad5e162214f
RTC: 212714
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83667
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Paul Greenwood <paul.greenwood@ibm.com>
Reviewed-by: Zane C Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84365
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>
  • Loading branch information
cnpalmer authored and zane131 committed Sep 27, 2019
1 parent d94c2cb commit b99004f
Show file tree
Hide file tree
Showing 10 changed files with 813 additions and 45 deletions.
80 changes: 80 additions & 0 deletions 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;
};

8 changes: 8 additions & 0 deletions src/usr/diag/prdf/common/plat/axone/axone_omic_regs.rule
Expand Up @@ -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";
Expand Down
90 changes: 90 additions & 0 deletions 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

48 changes: 46 additions & 2 deletions src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C
Expand Up @@ -29,6 +29,7 @@
#include <prdfPluginMap.H>

// Platform includes
#include <prdfMemUtils.H>
#include <prdfPlatServices.H>

using namespace TARGETING;
Expand All @@ -41,6 +42,48 @@ using namespace PlatServices;
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
Expand Down Expand Up @@ -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) ||
Expand Down
1 change: 1 addition & 0 deletions src/usr/diag/prdf/common/plat/axone/prdf_plat_axone.mk
Expand Up @@ -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

Expand Up @@ -448,4 +448,13 @@
capture group default;
};

############################################################################
# Interrupt status register
############################################################################

register INTER_STATUS_REG
{
name "TPTOP.PIB.PCBMS.INTERRUPT_TYPE_REG";
scomaddr 0x000F001A;
capture group default;
};
Expand Up @@ -31,6 +31,7 @@
// Platform includes
#include <prdfMemDbUtils.H>
#include <prdfMemEccAnalysis.H>
#include <prdfMemUtils.H>
#include <prdfPlatServices.H>

using namespace TARGETING;
Expand Down Expand Up @@ -61,6 +62,47 @@ int32_t Initialize( ExtensibleChip * i_chip )
}
PRDF_PLUGIN_DEFINE( explorer_ocmb, Initialize );

/**
* @brief Plugin function called after analysis is complete but before PRD
* exits.
* @param i_chip An OCMB 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 )
{
#define PRDF_FUNC "[explorer_ocmb::PostAnalysis] "

#ifdef __HOSTBOOT_RUNTIME

// If the IUE threshold in our data bundle has been reached, we trigger
// a port fail. Once we trigger the port fail, the system may crash
// right away. Since PRD is running in the hypervisor, it is possible we
// may not get the error log. To better our chances, we trigger the port
// fail here after the error log has been committed.
if ( MemEcc::queryIueTh<TYPE_OCMB_CHIP>(i_chip, io_sc) )
{
if ( SUCCESS != MemEcc::triggerPortFail<TYPE_OCMB_CHIP>(i_chip) )
{
PRDF_ERR( PRDF_FUNC "triggerPortFail(0x%08x) failed",
i_chip->getHuid() );
}
}

#endif // __HOSTBOOT_RUNTIME

// Cleanup processor FIR bits on the other side of the channel.
MemUtils::cleanupChnlAttns<TYPE_OCMB_CHIP>( i_chip, io_sc );

return SUCCESS;

#undef PRDF_FUNC
}
PRDF_PLUGIN_DEFINE( explorer_ocmb, PostAnalysis );


//##############################################################################
//
// OCMB_LFIR
Expand Down

0 comments on commit b99004f

Please sign in to comment.