From e8111177af9da1880627e7f025ad29fa99dacfa5 Mon Sep 17 00:00:00 2001 From: Zane Shelley Date: Thu, 26 Apr 2018 17:06:40 -0500 Subject: PRD: fixed how RT TPS procedures are banned from processing If banned, the TPS procedure must be prevented from being added to the queue. This fixes the issue where background scrubbing gets stopped manually and the TPS procedure is never executed. This also fixes a flooding issue when TPS is not available to fix persistent errors. Change-Id: I76cc9f7ce7c06587261ff593a626a4ef51b317e1 RTC: 192009 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57919 Tested-by: Jenkins Server Reviewed-by: Caleb N. Palmer Reviewed-by: Matt Derksen Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Brian J. Stegmiller Reviewed-by: Zane C. Shelley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58327 Tested-by: FSP CI Jenkins --- src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H | 43 +++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) (limited to 'src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H') diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H index 533213207..e098622cb 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H +++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.H @@ -85,7 +85,20 @@ class MemTdCtlr * diagnostics, if not already in progress. * @param i_entry The new TD queue entry. */ - void pushToQueue( TdEntry * i_entry ) { iv_queue.push(i_entry); } + void pushToQueue( TdEntry * i_entry ) + { + #ifdef __HOSTBOOT_RUNTIME + if ( TdEntry::TPS_EVENT == i_entry->getType() && + isTpsBanned(i_entry->getChip(), i_entry->getRank()) ) + { + PRDF_ERR( "[MemTdCtlr::pushToQueue] TPS banned on 0x%08x 0x%02x", + i_entry->getChip()->getHuid(), i_entry->getRank() ); + return; // prevent the entry from being added to the queue. + } + #endif + + iv_queue.push(i_entry); + } #ifdef __HOSTBOOT_RUNTIME @@ -106,6 +119,18 @@ class MemTdCtlr */ uint32_t handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc ); + /** + * @brief Bans TPS on the given rank. Any attempts to add a TPS procedure + * to the queue for this rank will be ignored. + * @param i_rank The target slave rank. + */ + void banTps( ExtensibleChip * i_chip, const MemRank & i_rank ) + { + // It doesn't matter what we set the value to, we just need to make sure + // the rank exists in the map. + iv_tpsBans[std::make_pair(i_chip, i_rank)] = true; + } + /** * @brief Handles reset-reload or FO scenario. * @@ -237,6 +262,17 @@ class MemTdCtlr #ifdef __HOSTBOOT_RUNTIME + /** + * @param i_rank The target slave rank. + * @return True, if this slave rank has been banned. False, otherwise. + */ + bool isTpsBanned( ExtensibleChip * i_chip, const MemRank & i_rank ) + { + // Check if this rank exists in the map. + std::pair e = std::make_pair(i_chip, i_rank); + return ( iv_tpsBans.end() != iv_tpsBans.find(e) ); + } + /** * @brief Masks NCE and TCE ECC attentions. * @note Only intended to be used just before starting a new TD procedure. @@ -287,9 +323,8 @@ class MemTdCtlr * to be restarted with a new command. */ bool iv_resumeBgScrub = false; - /** Keeps track if the fetch attentions have been masked during a TD - * procedure. */ - bool iv_fetchAttnsMasked = false; + /** Map to keep track of ranks that have banned TPS. */ + std::map< std::pair, bool > iv_tpsBans; #else // IPL only -- cgit v1.2.1