diff options
author | Brian Stegmiller <bjs@us.ibm.com> | 2017-12-04 09:43:44 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-12-13 16:14:30 -0500 |
commit | 4296f39725506f741ac4ceb8f3564c01dade7f2b (patch) | |
tree | d466b0383cffe09bfaf61e237ed3eb29f9359f2a /src/usr | |
parent | cf89b876a3d453c6bf40e748b6ec5c0cb427efd3 (diff) | |
download | talos-hostboot-4296f39725506f741ac4ceb8f3564c01dade7f2b.tar.gz talos-hostboot-4296f39725506f741ac4ceb8f3564c01dade7f2b.zip |
HB Attribute for IPL chkstop analysis
Change-Id: Ied553bd777704a25152ab4bb35b80167b71bf603
CQ:SW409689
Backport: release-op910
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50427
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/diag/attn/ipl/attn.C | 14 | ||||
-rwxr-xr-x | src/usr/diag/prdf/common/framework/service/xspprdsdbug.C | 21 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C | 63 | ||||
-rw-r--r-- | src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C | 20 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/attribute_types_hb.xml | 28 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/target_types_hb.xml | 1 |
6 files changed, 143 insertions, 4 deletions
diff --git a/src/usr/diag/attn/ipl/attn.C b/src/usr/diag/attn/ipl/attn.C index 6b203c613..60acbc328 100644 --- a/src/usr/diag/attn/ipl/attn.C +++ b/src/usr/diag/attn/ipl/attn.C @@ -270,6 +270,16 @@ errlHndl_t checkForCSAttentions() FileRegSvc fileRegs; fileRegs.installScomImpl(); + TARGETING::Target *l_sys = NULL; + TARGETING::targetService().getTopLevelTarget( l_sys ); + assert(l_sys != NULL); + // Indicate to PRD that we are doing chkstop analysis + // on saved FIR data so you can read regs without HW issues. + uint8_t l_iplAnalysis = CHKSTOP_ANALYSIS_ON_STARTUP_ANALYZING_CHECKSTOP; + bool l_set = + l_sys->trySetAttr<ATTR_CHKSTOP_ANALYSIS_ON_STARTUP>(l_iplAnalysis); + ATTN_SLOW("Checkstop attribute set for PRD:%d", l_set); + // Process the checkstop attention errl = Singleton<Service>::instance().processCheckstop(); if ( NULL != errl ) @@ -278,6 +288,10 @@ errlHndl_t checkForCSAttentions() errlCommit( errl, ATTN_COMP_ID ); } + // Ensure we don't leave analysis attribute set + l_iplAnalysis = CHKSTOP_ANALYSIS_ON_STARTUP_NOT_ANALYZING_DEFAULT; + l_sys->trySetAttr<ATTR_CHKSTOP_ANALYSIS_ON_STARTUP>(l_iplAnalysis); + // Uninstall File scom implementation. Singleton<ScomImpl>::instance().installScomImpl(); diff --git a/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C b/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C index ea7c1136e..855ce9bc1 100755 --- a/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C +++ b/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C @@ -189,6 +189,27 @@ uint32_t SYSTEM_DEBUG_CLASS::Reinitialize(const AttnList & i_attnList) { addChipToAttnList( (*i).targetHndl,(*i).attnType ); + // We can have UNIT CHKSTOPs present along with a normal + // CheckStop. We want to be sure we look at the UnitCs + // in this case as it may be the real issue -- example is + // OPAL forcing a checkstop since a Unit CS occurs which + // they can't handle. + if ( (*i).attnType == CHECK_STOP ) + { + bool l_ucsFound = false; + ExtensibleChip * l_chip = + ( ExtensibleChip *) systemPtr->GetChip( (*i).targetHndl ); + ExtensibleChipFunction * ef + = l_chip->getExtensibleFunction("CheckForUnitCs"); + + (*ef)( l_chip, bindParm<bool &>( l_ucsFound ) ); + + if ( l_ucsFound ) + { + addChipToAttnList( (*i).targetHndl,UNIT_CS ); + } + } + // There can be a case where chip has both recoverable and Check // Stop. In that case chip shall report only Check Stop. In such a // case, we analyse the recoverable first and see if we can blame diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C index 2593492d9..6bae441b4 100644 --- a/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Proc.C @@ -322,11 +322,34 @@ PRDF_PLUGIN_DEFINE_NS( p9_cumulus, Proc, isHostAttnFirAccessible ); int32_t isUcsFirAccessible(ExtensibleChip * i_chip, bool & o_isOkToAccess) { - o_isOkToAccess = (true == atRuntime()) ? true : false; - // Host Processor side can always access the 'unitCS' reg // The FSP can not access it during IPL steps 15 thru 16.2 - // We don't really use unitCs at this time. + o_isOkToAccess = atRuntime(); + + +#ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS + if (false == o_isOkToAccess) + { + // For checkstop analysis (non-FSP systems), we + // already collected registers in FIRDATA. Hence, we + // can attempt reading the unit CS FIR from this data. + Target *l_sys = NULL; + targetService().getTopLevelTarget( l_sys ); + assert(l_sys != NULL); + + // ATTN code sets an attribute to indicate we are + // doing the analysis of FIR data from prior failure. + uint8_t l_doingAnalysis = + CHKSTOP_ANALYSIS_ON_STARTUP_NOT_ANALYZING_DEFAULT; + l_sys->tryGetAttr<ATTR_CHKSTOP_ANALYSIS_ON_STARTUP>(l_doingAnalysis); + + if (CHKSTOP_ANALYSIS_ON_STARTUP_ANALYZING_CHECKSTOP == l_doingAnalysis) + { + o_isOkToAccess = true; + } + } +#endif // CONFIG_ENABLE_CHECKSTOP_ANALYSIS + return SUCCESS; } @@ -353,6 +376,40 @@ PRDF_PLUGIN_DEFINE_NS( p9_cumulus, Proc, handleDeadmanTimer ); //------------------------------------------------------------------------------ +/** + * @brief Used when the chip has a CHECK_STOP to see if there + * is also a UNIT_CS present + * @param i_chip A P9 chip. + * @param o_hasUcs True if the chip has a UNIT CS attention. + * @return SUCCESS + */ +int32_t CheckForUnitCs( ExtensibleChip * i_chip, + bool & o_hasUcs ) +{ + o_hasUcs = false; + + int32_t l_rc = SUCCESS; + + SCAN_COMM_REGISTER_CLASS * l_gUcsR = i_chip->getRegister("GLOBAL_UCS_FIR"); + l_rc = l_gUcsR->Read(); + + if ( SUCCESS != l_rc ) + { + PRDF_ERR("[CheckForUnitCs] GLOBAL_UCS_FIR read failed" + "for 0x%08x", i_chip->GetId()); + } + else if ( 0 != l_gUcsR->GetBitFieldJustified(1,55) ) + { + o_hasUcs = true; + } + + return SUCCESS; +} +PRDF_PLUGIN_DEFINE_NS( p9_nimbus, Proc, CheckForUnitCs ); +PRDF_PLUGIN_DEFINE_NS( p9_cumulus, Proc, CheckForUnitCs ); + +//------------------------------------------------------------------------------ + } // end namespace Proc } // end namespace PRDF diff --git a/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C b/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C index 5182afa76..472c5a57d 100644 --- a/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C +++ b/src/usr/diag/prdf/occ_firdata/prdfWriteHomerFirData.C @@ -943,7 +943,25 @@ static HOMER_ChipSpecAddr_t s_ecDepProcRegisters[] 0, 0x0000000005013C40ll }, // NPU1FIR DD2 { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x20, - 0, 0x000000005013C80ll } // NPU2FIR DD2 + 0, 0x000000005013C80ll }, // NPU2FIR DD2 + + { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x21, + 0, 0x0000000005013C00ll }, // NPU0FIR DD2.1 + + { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x21, + 0, 0x0000000005013C40ll }, // NPU1FIR DD2.1 + + { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x21, + 0, 0x000000005013C80ll }, // NPU2FIR DD2.1 + + { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x22, + 0, 0x0000000005013C00ll }, // NPU0FIR DD2.2 + + { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x22, + 0, 0x0000000005013C40ll }, // NPU1FIR DD2.2 + + { HOMER_CHIP_NIMBUS, TRGT_PROC, REG_FIR, 0x22, + 0, 0x000000005013C80ll } // NPU2FIR DD2.2 }; //------------------------------------------------------------------------------ diff --git a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml index ab13a4e5b..28e58dbe4 100755 --- a/src/usr/targeting/common/xmltohb/attribute_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types_hb.xml @@ -74,6 +74,34 @@ </enumerationType> <attribute> + <description> + Are we doing checkstop analysis on + systems as we are booting back up based + on information captured in FIRDATA section. + </description> + <id>CHKSTOP_ANALYSIS_ON_STARTUP</id> + <persistency>volatile-zeroed</persistency> + <readable></readable> + <simpleType> + <uint8_t></uint8_t> + </simpleType> + <writeable></writeable> +</attribute> + +<enumerationType> + <description>Enum for CHKSTOP_ANALYSIS_ON_STARTUP</description> + <enumerator> + <name>NOT_ANALYZING_DEFAULT</name> + <value>0</value> + </enumerator> + <enumerator> + <name>ANALYZING_CHECKSTOP</name> + <value>1</value> + </enumerator> + <id>CHKSTOP_ANALYSIS_ON_STARTUP</id> +</enumerationType> + +<attribute> <id>IS_MPIPL_HB</id> <description>1 = in Memory Preserving IPL mode. 0 = in normal IPL mode.</description> <simpleType> diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml index 3c60a832c..60b85e1d6 100644 --- a/src/usr/targeting/common/xmltohb/target_types_hb.xml +++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml @@ -47,6 +47,7 @@ <attribute><id>HB_RSV_MEM_NEXT_SECTION</id></attribute> <attribute><id>ALLOW_ATTR_OVERRIDES_IN_SECURE_MODE</id></attribute> <attribute><id>HIDDEN_ERRLOGS_ENABLE</id></attribute> + <attribute><id>CHKSTOP_ANALYSIS_ON_STARTUP</id></attribute> </targetTypeExtension> <targetTypeExtension> |