diff options
author | Sachin Gupta <sgupta2m@in.ibm.com> | 2014-10-18 10:46:25 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-10-23 20:27:17 -0500 |
commit | 573585fede8ff8db8d3fcc0debd2356efc38d411 (patch) | |
tree | 9eb230f7bfe8864df299d422d71362245fdd1450 /src/usr/diag | |
parent | ec665b59ea685b731f98546d0e8378c83639279f (diff) | |
download | talos-hostboot-573585fede8ff8db8d3fcc0debd2356efc38d411.tar.gz talos-hostboot-573585fede8ff8db8d3fcc0debd2356efc38d411.zip |
PRD: Handling clock failover for PLL
Change-Id: Ibeb10c30cc103eae43c7e982dbe6a5889e8f0b28
CQ: SW282729
Backport: release-fips820
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14072
Tested-by: Jenkins Server
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14159
Diffstat (limited to 'src/usr/diag')
13 files changed, 330 insertions, 81 deletions
diff --git a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C index 5b87ca01c..9d701d981 100755 --- a/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C +++ b/src/usr/diag/prdf/common/framework/config/prdfPllDomain.C @@ -40,12 +40,14 @@ #include <iipSystem.h> #include <UtilHash.H> #include <prdfP8ProcMbCommonExtraSig.H> +#include <prdfPllUtils.H> using namespace TARGETING; namespace PRDF { +using namespace PLL; using namespace PlatServices; //------------------------------------------------------------------------------ diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C index 833c72ca6..bc8baf286 100755 --- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C +++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C @@ -105,50 +105,6 @@ fapi::Target getFapiTarget( TARGETING::TargetHandle_t i_target ) //############################################################################## -//## Processor specific functions -//############################################################################## - -uint32_t getIoOscPos( ExtensibleChip * i_chip, - STEP_CODE_DATA_STRUCT & io_sc) -{ - #define PRDF_FUNC "[PlatServices::getIoOscPos] " - uint32_t o_oscPos = MAX_PCIE_OSC_PER_NODE; - - do - { - int32_t rc = SUCCESS; - - SCAN_COMM_REGISTER_CLASS * pcieOscSwitchReg = - i_chip->getRegister("PCIE_OSC_SWITCH"); - - rc = pcieOscSwitchReg->Read(); - if (rc != SUCCESS) - { - PRDF_ERR(PRDF_FUNC"PCIE_OSC_SWITCH read failed" - "for 0x%08x", i_chip->GetId()); - break; - } - - // [ 16 ] == 1 ( OSC 0 is active ) - // [ 16 ] == 0 ( OSC 1 is active ) - if(pcieOscSwitchReg->IsBitSet(16)) - { - o_oscPos = 0; - } - else - { - o_oscPos = 1; - } - - } while(0); - - return o_oscPos; - - #undef PRDF_FUNC -} - - -//############################################################################## //## Lane Repair functions //############################################################################## diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H index 75825400f..7494c300b 100755 --- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H +++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.H @@ -162,14 +162,6 @@ void initiateUnitDump( TARGETING::TargetHandle_t i_target, */ void collectSBE_FFDC(TARGETING::TargetHandle_t i_procTarget); -/** - * @brief get the active pcie osc pos for this proc - * @param i_chip P8 chip - * @param i_sc service data collector - * @return active osc position - */ -uint32_t getIoOscPos( ExtensibleChip * i_chip, - STEP_CODE_DATA_STRUCT & io_sc ); //############################################################################## //## Lane Repair functions @@ -501,13 +493,6 @@ mss_MaintCmdWrapper * createMssCmd( mss_MaintCmdWrapper::CmdType i_cmdType, //## util functions //############################################################################## -/** - * @brief capture FSI Status Reg for FFDC - * @param i_chip Extensible chip - * @param i_sc service data collector - */ -void captureFsiStatusReg( ExtensibleChip * i_chip, - STEP_CODE_DATA_STRUCT & io_sc ); /** * @brief get cfam data diff --git a/src/usr/diag/prdf/common/plat/pegasus/Proc.rule b/src/usr/diag/prdf/common/plat/pegasus/Proc.rule index 03bb3bfcf..927a84572 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/Proc.rule +++ b/src/usr/diag/prdf/common/plat/pegasus/Proc.rule @@ -162,6 +162,13 @@ chip Proc capture group never; }; + register CFAM_FSI_GP7 + { + name "TPC.FSI.FSI_MAILBOX.FSXCOMP.FSXLOG.FSIGP7"; + scomaddr 0x00002816; + capture group never; + }; + register PCIE_OSC_SWITCH { name "TPC.FSI.FSI_MAILBOX.FSXCOMP.FSXLOG.SNS1LTH"; @@ -169,6 +176,13 @@ chip Proc capture group PllFIRs; }; + register OSCERR + { + name "EH.TPCHIP.TPC.ITR.OSCERR.OSCERR_HOLD"; + scomaddr 0x01020019; + capture group PllFIRs; + }; + }; ############################################################################## diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C index 390d54c3f..eb9df8725 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenPll.C @@ -30,10 +30,13 @@ #include <iipServiceDataCollector.h> #include <prdfExtensibleChip.H> #include <prdfPluginMap.H> +#include <prdfPllUtils.H> +#include <prdfFsiCapUtil.H> namespace PRDF { +using namespace PLL; using namespace PlatServices; namespace Membuf diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.C b/src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.C new file mode 100644 index 000000000..795f53418 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.C @@ -0,0 +1,84 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] 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 */ + +/** @file prdfFsiCapUtil.C */ + +#include <UtilHash.H> +#include <prdfTrace.H> +#include <prdfFsiCapUtil.H> +#include <prdfPlatServices.H> +#include <prdfExtensibleChip.H> +#include <iipServiceDataCollector.h> + +using namespace TARGETING; +namespace PRDF +{ +using namespace PlatServices; + +namespace PLL +{ + +void captureFsiStatusReg( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ) +{ + #define PRDF_FUNC "[PLL::captureFsiStatusReg] " + + uint32_t u32Data = 0; + + int32_t rc = getCfam( i_chip, io_sc, 0x00001007, u32Data ); + + if ( SUCCESS == rc ) + { + BIT_STRING_ADDRESS_CLASS bs (0, 32, (CPU_WORD *) &u32Data); + + io_sc.service_data->GetCaptureData().Add( + i_chip->GetChipHandle(), + ( Util::hashString("CFAM_FSI_STATUS") ^ + i_chip->getSignatureOffset() ), + bs); + } + + if( TYPE_PROC == getTargetType(i_chip->GetChipHandle()) ) + { + uint32_t fsiGp7 = 0; + rc = getCfam( i_chip, io_sc, 0x2816, fsiGp7 ); + if ( SUCCESS == rc ) + { + BIT_STRING_ADDRESS_CLASS bs (0, 32, (CPU_WORD *) &fsiGp7); + + io_sc.service_data->GetCaptureData().Add( + i_chip->GetChipHandle(), + ( Util::hashString("CFAM_FSI_GP7") ^ + i_chip->getSignatureOffset() ), + bs); + } + } + + #undef PRDF_FUNC +} + +} // end namespace PLL + +} // end namespace PRDF diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.H b/src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.H new file mode 100644 index 000000000..bbc143a0f --- /dev/null +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.H @@ -0,0 +1,53 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfFsiCapUtil.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] 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 FSI_CAP_UTIL_H +#define FSI_CAP_UTIL_H + +/** + * @file prdfFsiCapUtil.H + * @brief Captures FSI status register for FFDC. + */ + +namespace PRDF +{ + +class ExtensibleChip; +struct STEP_CODE_DATA_STRUCT; +namespace PLL +{ + +/** + * @brief capture FSI Status Reg for FFDC + * @param i_chip Extensible chip + * @param i_sc service data collector + */ +void captureFsiStatusReg( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ); + +}// namespace PLL + +} //namespace PRDF + +#endif //FSI_CAP_UTIL_H diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Pll.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Pll.C index 027b427a4..9095b8060 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Pll.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Pll.C @@ -38,13 +38,17 @@ #include <iipSystem.h> #include <prdfGlobal_common.H> #include <prdfP8DataBundle.H> +#include <prdfPllUtils.H> +#include <prdfFsiCapUtil.H> #include <UtilHash.H> + using namespace TARGETING; namespace PRDF { +using namespace PLL; using namespace PlatServices; namespace Proc diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8PllPcie.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8PllPcie.C index a27e4bc57..516672a6c 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8PllPcie.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfP8PllPcie.C @@ -39,12 +39,15 @@ #include <prdfGlobal_common.H> #include <prdfP8DataBundle.H> #include <UtilHash.H> +#include <prdfPllUtils.H> +#include <prdfFsiCapUtil.H> using namespace TARGETING; namespace PRDF { +using namespace PLL; using namespace PlatServices; namespace Proc @@ -229,6 +232,27 @@ int32_t ClearPllIo( ExtensibleChip * i_chip, "for chip: 0x%08x", i_chip->GetId()); rc |= tmpRC; } + + SCAN_COMM_REGISTER_CLASS * oscCerrReg = + i_chip->getRegister("OSCERR"); + + tmpRC = oscCerrReg->Read(); + if (tmpRC != SUCCESS) + { + PRDF_ERR(PRDF_FUNC"OSCERR read failed" + "for 0x%08x", i_chip->GetId()); + rc |= tmpRC; + } + oscCerrReg->ClearBit(4); + oscCerrReg->ClearBit(5); + tmpRC = oscCerrReg->Write(); + if (tmpRC != SUCCESS) + { + PRDF_ERR(PRDF_FUNC"oscCerrReg write failed" + "for chip: 0x%08x", i_chip->GetId()); + rc |= tmpRC; + } + } if( rc != SUCCESS ) @@ -329,7 +353,7 @@ PRDF_PLUGIN_DEFINE( Proc, MaskPllIo ); int32_t capturePllFfdcIo( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc ) { - // Add FSI status reg + // Add FSI Osc reg captureFsiStatusReg( i_chip, io_sc ); return SUCCESS; diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfPllUtils.H b/src/usr/diag/prdf/common/plat/pegasus/prdfPllUtils.H new file mode 100644 index 000000000..03ac218ab --- /dev/null +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfPllUtils.H @@ -0,0 +1,55 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfPllUtils.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] 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 PLL_UTILS_H +#define PLL_UTILS_H + +/** @file prdfPllUtils.H + * @brief Utility functions for PLL domain. + */ + +#include <UtilHash.H> +namespace PRDF +{ + +class ExtensibleChip; +struct STEP_CODE_DATA_STRUCT; +namespace PLL +{ + +/** + * @brief get the pcie source osc pos reporting error for this proc + * @param i_chip P8 chip + * @param i_sc service data collector + * @return osc position + */ +uint32_t getIoOscPos( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc ); + +} // end namespace Proc + +} // end namespace PRDF + +#endif // PHB_CONFIG_H diff --git a/src/usr/diag/prdf/common/prd_pegasus.mk b/src/usr/diag/prdf/common/prd_pegasus.mk index 8cec3d691..47edde179 100755 --- a/src/usr/diag/prdf/common/prd_pegasus.mk +++ b/src/usr/diag/prdf/common/prd_pegasus.mk @@ -44,6 +44,8 @@ PRDF_RULE_PLUGINS_PEGASUS_WSIM += prdfP8SystemSpecific.o # PEGASUS specific objects, not rule related. prd_pegasus_specific += prdfCalloutUtil.o prd_pegasus_specific += prdfPhbUtils.o +prd_pegasus_specific += prdfPllUtils.o +prd_pegasus_specific += prdfFsiCapUtil.o prd_pegasus_specific += prdfCenAddress.o prd_pegasus_specific += prdfCenDqBitmap.o prd_pegasus_specific += prdfCenMbaCaptureData.o diff --git a/src/usr/diag/prdf/framework/service/prdfPlatServices.C b/src/usr/diag/prdf/framework/service/prdfPlatServices.C index 39ae15d6a..8e8b80b22 100644 --- a/src/usr/diag/prdf/framework/service/prdfPlatServices.C +++ b/src/usr/diag/prdf/framework/service/prdfPlatServices.C @@ -326,27 +326,6 @@ int32_t getCfam( ExtensibleChip * i_chip, #undef PRDF_FUNC } -void captureFsiStatusReg( ExtensibleChip * i_chip, - STEP_CODE_DATA_STRUCT & io_sc ) -{ - #define PRDF_FUNC "[PlatServices::captureFsiStatusReg] " - - uint32_t u32Data = 0; - int32_t rc = getCfam( i_chip, io_sc, 0x00001007, u32Data ); - - if ( SUCCESS == rc ) - { - BIT_STRING_ADDRESS_CLASS bs (0, 32, (CPU_WORD *) &u32Data); - - io_sc.service_data->GetCaptureData().Add( - i_chip->GetChipHandle(), - ( Util::hashString("CFAM_FSI_STATUS") ^ - i_chip->getSignatureOffset() ), - bs); - } - - #undef PRDF_FUNC -} TARGETING::TargetHandle_t getActiveRefClk(TARGETING::TargetHandle_t i_procTarget, diff --git a/src/usr/diag/prdf/plat/pegasus/prdfPllUtils.C b/src/usr/diag/prdf/plat/pegasus/prdfPllUtils.C new file mode 100644 index 000000000..e57b709b8 --- /dev/null +++ b/src/usr/diag/prdf/plat/pegasus/prdfPllUtils.C @@ -0,0 +1,88 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/plat/pegasus/prdfPllUtils.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] 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 */ + +/** @file prdfPllUtils.C */ + +#include <prdfPllUtils.H> + +#include <prdfPlatServices.H> +#include <prdfTrace.H> +#include <prdfGlobal.H> +#include <UtilHash.H> +#include <iipServiceDataCollector.h> + +using namespace TARGETING; + +namespace PRDF +{ + +using namespace PlatServices; + +namespace PLL +{ + +uint32_t getIoOscPos( ExtensibleChip * i_chip, + STEP_CODE_DATA_STRUCT & io_sc) +{ + #define PRDF_FUNC "[PLL::getIoOscPos] " + uint32_t o_oscPos = MAX_PCIE_OSC_PER_NODE; + + do + { + int32_t rc = SUCCESS; + + SCAN_COMM_REGISTER_CLASS * pcieOscSwitchReg = + i_chip->getRegister("PCIE_OSC_SWITCH"); + + rc = pcieOscSwitchReg->Read(); + if (rc != SUCCESS) + { + PRDF_ERR(PRDF_FUNC"PCIE_OSC_SWITCH read failed" + "for 0x%08x", i_chip->GetId()); + break; + } + + // [ 16 ] == 1 ( OSC 0 is active ) + // [ 16 ] == 0 ( OSC 1 is active ) + if(pcieOscSwitchReg->IsBitSet(16)) + { + o_oscPos = 0; + } + else + { + o_oscPos = 1; + } + + } while(0); + + return o_oscPos; + + #undef PRDF_FUNC +} + +} // namespace PLL + +} // end namespace PRDF + |