diff options
Diffstat (limited to 'src/usr/diag')
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/p9_ex.rule | 4 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/p9_ex_actions.rule | 8 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/p9_ex_regs.rule | 35 | ||||
-rwxr-xr-x | src/usr/diag/prdf/common/plat/p9/prdfLineDelete.C (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.C) | 4 | ||||
-rwxr-xr-x | src/usr/diag/prdf/common/plat/p9/prdfLineDelete.H (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.H) | 4 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdfP9Ex.C | 134 | ||||
-rwxr-xr-x | src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H | 103 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdfP9ExExtraSig.H | 39 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdf_plat_p9.mk | 2 |
9 files changed, 328 insertions, 5 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/p9_ex.rule b/src/usr/diag/prdf/common/plat/p9/p9_ex.rule index ac67dea03..b01fb5d4e 100644 --- a/src/usr/diag/prdf/common/plat/p9/p9_ex.rule +++ b/src/usr/diag/prdf/common/plat/p9/p9_ex.rule @@ -31,6 +31,8 @@ chip p9_ex dump DUMP_CONTENT_HW; scomlen 64; +.include "prdfP9ExExtraSig.H"; + ############################################################################# # # # ###### # @@ -596,7 +598,7 @@ group gL3FIR filter singlebit /** L3FIR[4] * */ - (rL3FIR, bit(4)) ? defaultMaskedError; + (rL3FIR, bit(4)) ? l3_cache_ce; /** L3FIR[5] * diff --git a/src/usr/diag/prdf/common/plat/p9/p9_ex_actions.rule b/src/usr/diag/prdf/common/plat/p9/p9_ex_actions.rule index 674e40eca..628ff13c9 100644 --- a/src/usr/diag/prdf/common/plat/p9/p9_ex_actions.rule +++ b/src/usr/diag/prdf/common/plat/p9/p9_ex_actions.rule @@ -35,3 +35,11 @@ actionclass self_M_level2_L_th_1 callout2ndLvlLow; threshold1; }; + +actionclass l3_cache_ce +{ + calloutSelfHigh; + threshold( field(32 / day), mfg_file(ATTR_MNFG_TH_P8EX_L3_CACHE_CES) ); + funccall("L3CE"); +}; + diff --git a/src/usr/diag/prdf/common/plat/p9/p9_ex_regs.rule b/src/usr/diag/prdf/common/plat/p9/p9_ex_regs.rule new file mode 100644 index 000000000..f38639379 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/p9_ex_regs.rule @@ -0,0 +1,35 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/diag/prdf/common/plat/p9/p9_ex_regs.rule $ +# +# 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 +############################################################################### +# Additional registers for EX, not defined in XML +############################################################################### + + register L3_PURGE_REG + { + name "L3 PRD Purge Register"; + scomaddr 0x1001180E; + capture group never; + }; + diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.C b/src/usr/diag/prdf/common/plat/p9/prdfLineDelete.C index e94bab4a7..f8099ceb0 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.C +++ b/src/usr/diag/prdf/common/plat/p9/prdfLineDelete.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.C $ */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfLineDelete.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2005,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.H b/src/usr/diag/prdf/common/plat/p9/prdfLineDelete.H index 4e0fbcb95..8cad7dc9b 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.H +++ b/src/usr/diag/prdf/common/plat/p9/prdfLineDelete.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfLineDelete.H $ */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfLineDelete.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2005,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Ex.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Ex.C new file mode 100644 index 000000000..15a868b94 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Ex.C @@ -0,0 +1,134 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9Ex.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 <prdfPluginDef.H> +#include <iipServiceDataCollector.h> +#include <prdfExtensibleChip.H> +#include <prdfPluginMap.H> + +#include <prdfP9ExDataBundle.H> +#include <prdfP9ExExtraSig.H> +#include <prdfMfgThresholdMgr.H> +#include <prdfMfgThreshold.H> + +namespace PRDF +{ +namespace p9_ex +{ + +/** + * @brief Plugin that initializes the EX data bundle. + * @param i_exChip An ex chip. + * @return SUCCESS + */ +int32_t Initialize( ExtensibleChip * i_exChip ) +{ + i_exChip->getDataBundle() = new P9ExDataBundle( i_exChip ); + return SUCCESS; +} +PRDF_PLUGIN_DEFINE( p9_ex, Initialize ); + +/** + * @brief Handle an L3 CE + * @param i_chip Ex chip. + * @param i_stepcode Step Code data struct + * @return PRD return code + */ +int32_t L3CE( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & i_stepcode ) +{ + P9ExDataBundle * l_bundle = getExDataBundle(i_chip); + uint16_t l_maxL3LineDelAllowed = 0; + + + l_maxL3LineDelAllowed = + MfgThresholdMgr::getInstance()->getThreshold(PlatServices::mfgMode() ? + TARGETING::ATTR_MNFG_TH_P8EX_L3_LINE_DELETES: + TARGETING::ATTR_FIELD_TH_P8EX_L3_LINE_DELETES); + + // MfgThresholdMgr treats 0 as a special value for infinite threshold + // For this threshold, we want 0 to really represent 0 repairs allowed + if (l_maxL3LineDelAllowed == MfgThreshold::INFINITE_LIMIT_THR) + l_maxL3LineDelAllowed = 0; + + // Ensure we're still allowed to issue repairs + if ((l_bundle->iv_L3LDCount < l_maxL3LineDelAllowed) && + (CHECK_STOP != i_stepcode.service_data->getPrimaryAttnType())) + { + // Add to CE table and Check if we need to issue a repair on this CE + bool l_doDelete = + l_bundle->iv_L3CETable->addAddress(l_bundle->iv_L3LDCount, + i_stepcode); + + if (l_doDelete) + { + l_bundle->iv_L3LDCount++; + + // Do Delete + PRDF_TRAC( "[L3CE] HUID: 0x%08x apply line delete", + i_chip->GetId()); + + SCAN_COMM_REGISTER_CLASS * prgReg = + i_chip->getRegister("L3_PURGE_REG"); + + prgReg->clearAllBits(); + prgReg->SetBit(5); + + if (SUCCESS != prgReg->Write() ) + { + PRDF_ERR( "[L3CE] HUID: 0x%08x l3LineDelete failed", + i_chip->GetId()); + // Set signature to indicate L3 Line Delete failed + i_stepcode.service_data->SetErrorSig( + PRDFSIG_P9EX_L3CE_LD_FAILURE); + } + else + { + // Set signature to indicate L3 Line Delete issued + i_stepcode.service_data->SetErrorSig( + PRDFSIG_P9EX_L3CE_LD_ISSUED); + } + } + } + else + { + PRDF_TRAC( "[L3CE] HUID: 0x%08x No more repairs allowed", + i_chip->GetId()); + + // MFG wants to be able to ignore these errors + // If they have LD and array repairs set to 0, wait for + // predictive threshold + if (!PlatServices::mfgMode() || + l_maxL3LineDelAllowed != 0 ) + { + i_stepcode.service_data->SetThresholdMaskId(0); + } + } + + return SUCCESS; +} PRDF_PLUGIN_DEFINE(p9_ex, L3CE); + +} +} diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H b/src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H new file mode 100755 index 000000000..9e23d8dc0 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H @@ -0,0 +1,103 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9ExDataBundle.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2013,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 */ + +#ifndef _PRDFP9EXDATABUNDLE_H +#define _PRDFP9EXDATABUNDLE_H + +/** @file prdfP9ExDataBundle.H + * @brief Contains the data bundle for a P9 Ex object. + */ + +#include <iipSystem.h> +#include <prdfExtensibleChip.H> +#include <prdfGlobal.H> +#include <prdfPlatServices.H> +#include <prdfThresholdUtils.H> +#include <prdfLineDelete.H> + +namespace PRDF +{ + +/** + * @brief The P9 EX data bundle. + */ +class P9ExDataBundle : public DataBundle +{ + public: // functions + + /** + * @brief Constructor. + * @param i_exChip The ex chip. + */ + explicit P9ExDataBundle( ExtensibleChip * i_exChip ) : + iv_L2LDCount(0), iv_L3LDCount(0), + iv_exChip(i_exChip) + { + // Set up thresholds for line deletes. + iv_L2CETable = new LineDelete::PrdfCacheCETable( + ThresholdResolution::ThresholdPolicy(PlatServices::mfgMode() ? 1 : 2, + ThresholdResolution::ONE_DAY)); + iv_L3CETable = new LineDelete::PrdfCacheCETable( + ThresholdResolution::ThresholdPolicy(PlatServices::mfgMode() ? 1 : 2, + ThresholdResolution::ONE_DAY)); + }; + + /** + * @brief Destructor. + */ + ~P9ExDataBundle() + { + delete iv_L2CETable; + delete iv_L3CETable; + }; + // Current counts for L2 line deletes. + uint8_t iv_L2LDCount; + LineDelete::PrdfCacheCETable * iv_L2CETable; + + // Current counts for L3 line deletes. + uint8_t iv_L3LDCount; + LineDelete::PrdfCacheCETable * iv_L3CETable; + + private: + ExtensibleChip * iv_exChip; ///< This ex chip + + P9ExDataBundle( const P9ExDataBundle & ); + const P9ExDataBundle & operator=( const P9ExDataBundle & ); + +}; + +/** + * @brief Wrapper function for the P9ExDataBundle. + * @param i_exChip The ex chip. + * @return This ex's data bundle. + */ +inline P9ExDataBundle * getExDataBundle( ExtensibleChip * i_exChip ) +{ + return static_cast<P9ExDataBundle *>(i_exChip->getDataBundle()); +} + +} // end namespace PRDF + +#endif /* _PRDFP9EXDATABUNDLE_H */ diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9ExExtraSig.H b/src/usr/diag/prdf/common/plat/p9/prdfP9ExExtraSig.H new file mode 100644 index 000000000..b12f8616e --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9ExExtraSig.H @@ -0,0 +1,39 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9ExExtraSig.H $ */ +/* */ +/* 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 */ +#ifndef __prdfP9ExExtraSig_H +#define __prdfP9ExExtraSig_H + +#include <prdrSignatures.H> + +PRDR_ERROR_SIGNATURE( P9EX_L2CE_LD_ISSUED, 0x0fff0000, "L2FIR[0]", + "L2 Cache Read CE, Line Delete Issued"); +PRDR_ERROR_SIGNATURE( P9EX_L2CE_LD_FAILURE, 0x0fff0001, "L2FIR[0]", + "L2 Cache Read CE, Line Delete Failed"); +PRDR_ERROR_SIGNATURE( P9EX_L3CE_LD_ISSUED, 0x0fff0005, "L3FIR[4]", + "L3 Cache Read CE, Line Delete Issued"); +PRDR_ERROR_SIGNATURE( P9EX_L3CE_LD_FAILURE, 0x0fff0006, "L3FIR[4]", + "L3 Cache Read CE, Line Delete Failed"); +#endif // __prdfP9ExExtraSig_H + 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 da5d7b320..cc0cfba8e 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 @@ -42,9 +42,11 @@ prd_obj += prdfP9Configurator.o prd_obj += prdfP9PllDomain.o prd_obj += prdfFsiCapUtil.o prd_obj += prdfP9ProcDomain.o +prd_obj += prdfLineDelete.o # rule plugin related prd_rule_plugin += prdfP9Proc.o prd_rule_plugin += prdfP9Pll.o prd_rule_plugin += prdfCommonPlugins.o +prd_rule_plugin += prdfP9Ex.o |