diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2014-07-09 00:44:45 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-07-16 15:13:18 -0500 |
commit | 8d305c119834b9aa6e7dce358f8c292c20e96db9 (patch) | |
tree | cb1d3d7816f520b7542eb51b3fd9579e9260eb7c | |
parent | b03aecd2a7293592ca7b46eba8ee74b69962f3e5 (diff) | |
download | talos-hostboot-8d305c119834b9aa6e7dce358f8c292c20e96db9.tar.gz talos-hostboot-8d305c119834b9aa6e7dce358f8c292c20e96db9.zip |
PRD: Runtime memory CE thresholds in MNFG
Change-Id: I9df24fc5162866ef066245307b43f7ddb4161774
CQ: SW262935
Backport: release-fips811
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/12041
Tested-by: Jenkins Server
Reviewed-by: Bilicon Patil <bilpatil@in.ibm.com>
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Prem Shanker Jha <premjha2@in.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/12219
4 files changed, 87 insertions, 44 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C index 52808dafb..93df95117 100644 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,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. */ @@ -43,10 +45,10 @@ using namespace CE_TABLE; //------------------------------------------------------------------------------ -bool CenMbaCeTable::addEntry( const CenAddr & i_addr, - const CenSymbol & i_symbol, bool i_isHard ) +uint32_t CenMbaCeTable::addEntry( const CenAddr & i_addr, + const CenSymbol & i_symbol, bool i_isHard ) { - bool o_doTps = false; + uint32_t o_rc = NO_TH_REACHED; TableData data ( i_addr, i_symbol.getDram(), i_symbol.getDramPins(), i_symbol.getPortSlct(), i_symbol.getWiringType(), @@ -79,26 +81,22 @@ bool CenMbaCeTable::addEntry( const CenAddr & i_addr, // Check the new entry's count for single entry threshold. if ( TPS_ENTRY_COUNT_TH <= data.count ) { - o_doTps = true; + o_rc |= ENTRY_TH_REACHED; } // Get number of entries in this table on the same rank as the new entry and // threshold if needed. - if ( !o_doTps ) // no point iterating the table if o_doTps is already true + CenRank thisRank = data.addr.getRank(); + uint32_t rankCount = 0; + for ( CeTable::iterator it = iv_table.begin(); it != iv_table.end(); it++ ) { - CenRank thisRank = data.addr.getRank(); - uint32_t rankCount = 0; - for ( CeTable::iterator it = iv_table.begin(); - it != iv_table.end(); it++ ) - { - if ( it->active && (it->addr.getRank() == thisRank) ) - rankCount++; - } - - if ( TPS_RANK_ENTRY_TH <= rankCount ) - o_doTps = true; + if ( it->active && (it->addr.getRank() == thisRank) ) + rankCount++; } + if ( TPS_RANK_ENTRY_TH <= rankCount ) + o_rc |= RANK_TH_REACHED; + // Note that we intentially checked the entries-per-rank threshold before // removing any entries, if the table is full. This is to catch the corner // case where the oldest entry is on the same rank as the new entry. @@ -120,13 +118,14 @@ bool CenMbaCeTable::addEntry( const CenAddr & i_addr, // If the table is still full, all entries are active. Pop off the oldest // active entry. if ( MAX_ENTRIES < iv_table.size() ) + { iv_table.pop_front(); - // Do TPS if the table is full. - if ( MAX_ENTRIES == iv_table.size() ) - o_doTps = true; + // The table is full of active entries so do TPS. + o_rc |= TABLE_FULL; + } - return o_doTps; + return o_rc; } //------------------------------------------------------------------------------ diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H index 8b0d7d29d..3842819ba 100644 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,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. */ @@ -52,6 +54,17 @@ class CenMark; class CenMbaCeTable { + public: // constants, enums + + /** @brief Return values from addEntry(). */ + enum AddEntryRc + { + NO_TH_REACHED = 0x00, ///< No thresholds reached. + ENTRY_TH_REACHED = 0x01, ///< The entry threshold has been reached. + RANK_TH_REACHED = 0x02, ///< The rank threshold has been reached. + TABLE_FULL = 0x04, ///< The table is full of active entries. + }; + private: // constants, enums /** @brief Table size limits. */ @@ -86,10 +99,10 @@ class CenMbaCeTable * @param i_addr The address reporting the CE. * @param i_symbol The symbol reporting the CE. * @param i_isHard TRUE if a hard CE was detected on this address/symbol. - * @return TRUE if TPS is required, FALSE otherwise. + * @return Mask of possible return codes (see enum AddEntryRc). */ - bool addEntry( const CenAddr & i_addr, const CenSymbol & i_symbol, - bool i_isHard = false ); + uint32_t addEntry( const CenAddr & i_addr, const CenSymbol & i_symbol, + bool i_isHard = false ); /** * @brief Deactivates all entries in the table. diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C index ab75bad01..03e2aeb1c 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C @@ -560,15 +560,15 @@ int32_t AnalyzeFetchNce( ExtensibleChip * i_membChip, // Add the DIMM to the callout list MemoryMru memmru ( mbaTrgt, rank, symbol ); - i_sc.service_data->SetCallout( memmru ); + i_sc.service_data->SetCallout( memmru, MRU_MEDA ); // Add to CE table CenMbaDataBundle * mbadb = getMbaDataBundle( mbaChip ); - bool doTps = mbadb->iv_ceTable.addEntry( addr, symbol ); + uint32_t ceTableRc = mbadb->iv_ceTable.addEntry( addr, symbol ); + bool doTps = ( CenMbaCeTable::NO_TH_REACHED != ceTableRc ); - // Check MNFG thresholds, if needed. No need to check if a TPS - // request is already needed. - if ( !doTps && mfgMode() ) + // Check MNFG thresholds, if needed. + if ( mfgMode() ) { // Get the MNFG CE thresholds. uint16_t dramTh, hrTh, dimmTh; @@ -590,35 +590,61 @@ int32_t AnalyzeFetchNce( ExtensibleChip * i_membChip, { i_sc.service_data->AddSignatureList( mbaTrgt, PRDFSIG_MnfgDramCte ); + i_sc.service_data->SetServiceCall(); doTps = true; } - - if ( hrTh < hrCount ) + else if ( hrTh < hrCount ) { i_sc.service_data->AddSignatureList( mbaTrgt, PRDFSIG_MnfgHrCte ); + i_sc.service_data->SetServiceCall(); doTps = true; } - - if ( dimmTh < dimmCount ) + else if ( dimmTh < dimmCount ) { i_sc.service_data->AddSignatureList( mbaTrgt, PRDFSIG_MnfgDimmCte ); + i_sc.service_data->SetServiceCall(); doTps = true; } + else if ( 0 != (CenMbaCeTable::TABLE_FULL & ceTableRc) ) + { + i_sc.service_data->AddSignatureList( mbaTrgt, + PRDFSIG_MnfgTableFull); + + // The table is full and no other threshold has been met. + // We are in a state where we may never hit a MNFG + // threshold. Callout all memory behind the MBA. Also, since + // the counts are all over the place, there may be a problem + // with the MBA. So call it out as well. + MemoryMru all_mm ( mbaTrgt, rank, + MemoryMruData::CALLOUT_ALL_MEM ); + i_sc.service_data->SetCallout( all_mm, MRU_MEDA ); + i_sc.service_data->SetCallout( mbaTrgt, MRU_MEDA ); + i_sc.service_data->SetServiceCall(); + } + else if ( 0 != (CenMbaCeTable::ENTRY_TH_REACHED & ceTableRc) ) + { + i_sc.service_data->AddSignatureList( mbaTrgt, + PRDFSIG_MnfgEntryCte ); + + // There is a single entry threshold and no other threshold + // has been met. This is a potential flooding issue, so make + // the DIMM callout predictive. + i_sc.service_data->SetServiceCall(); + } } // Initiate a TPS procedure, if needed. if ( doTps ) { - #ifdef __HOSTBOOT_MODULE - // Will not be able to do TPS during hostboot so make the error - // log predictive in MNFG mode. Note that we will still call - // handleTdEvent() so we can get the trace statement indicating - // TPS was requested during Hostboot. - if ( mfgMode() ) - i_sc.service_data->SetServiceCall(); - #endif + // If a MNFG threshold has been reached (predictive callout), we + // will still try to start TPS just in case MNFG disables the + // termination policy. + + // Will not be able to do TPS during hostboot. Note that we will + // still call handleTdEvent() so we can get the trace statement + // indicating TPS was requested during Hostboot. l_rc = mbadb->iv_tdCtlr.handleTdEvent( i_sc, rank, CenMbaTdCtlrCommon::TPS_EVENT ); diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H index 862cc6c96..c409cbcdf 100644 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H +++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,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. */ @@ -29,7 +31,10 @@ PRDR_ERROR_SIGNATURE(MnfgDramCte, 0x44440000, "", "MNFG per DRAM CTE"); PRDR_ERROR_SIGNATURE(MnfgHrCte, 0x44440001, "", "MNFG per half-rank CTE"); PRDR_ERROR_SIGNATURE(MnfgDimmCte, 0x44440002, "", "MNFG per DIMM CTE"); -PRDR_ERROR_SIGNATURE(MbsFir_30_DD1Signature, 0x44440003, "MBSFIR[30]", +PRDR_ERROR_SIGNATURE(MnfgTableFull, 0x44440003, "", "MNFG CE table full"); +PRDR_ERROR_SIGNATURE(MnfgEntryCte, 0x44440004, "", "MNFG CE table entry CTE"); + +PRDR_ERROR_SIGNATURE(MbsFir_30_DD1Signature, 0x44440008, "MBSFIR[30]", "DD1: MBS_FIR_REG_INTERNAL_SCOM_ERROR_COPY"); #endif // __prdfCenMembufExtraSig_H |