From 195dd6a1589e10d837d8d626da72e7c66dbad58d Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Mon, 16 Sep 2019 15:53:17 -0500 Subject: [PATCH] PRD: Axone VCM Updates Change-Id: I9c54c9d8ae01186785bf4a773f6a9ea5d0d311fb RTC: 208262 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84233 Tested-by: Jenkins Server Reviewed-by: Benjamen G Tyner Reviewed-by: Brian J Stegmiller Reviewed-by: Zane C Shelley Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84782 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins --- src/usr/diag/prdf/plat/mem/prdfMemVcm.C | 140 +++++++++------------ src/usr/diag/prdf/plat/mem/prdfMemVcm.H | 5 +- src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C | 113 +++-------------- 3 files changed, 84 insertions(+), 174 deletions(-) diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm.C index 611bd42fa2c..74ec3dfeda0 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemVcm.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm.C @@ -39,67 +39,16 @@ using namespace PlatServices; //############################################################################## // -// Specializations for MCA +// Generic Specializations // //############################################################################## -template<> -uint32_t VcmEvent::startCmd() -{ - #define PRDF_FUNC "[VcmEvent::startCmd] " - - uint32_t o_rc = SUCCESS; - - // No stop conditions. - mss::mcbist::stop_conditions<> stopCond; - - // Start the time based scrub procedure on this master rank. - o_rc = startTdScrub( iv_chip, iv_rank, MASTER_RANK, stopCond ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "startTdScrub(0x%08x,0x%2x) failed", - iv_chip->getHuid(), getKey() ); - } - - return o_rc; - - #undef PRDF_FUNC -} - -template<> -uint32_t VcmEvent::startCmd() -{ - #define PRDF_FUNC "[VcmEvent::startCmd] " - - uint32_t o_rc = SUCCESS; - - PRDF_ERR( PRDF_FUNC "Function not supported yet" ); - /* TODO RTC 208262 - // No stop conditions. - mss::mcbist::stop_conditions stopCond; - - // Start the time based scrub procedure on this master rank. - o_rc = startTdScrub( iv_chip, iv_rank, MASTER_RANK, stopCond ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "startTdScrub(0x%08x,0x%2x) failed", - iv_chip->getHuid(), getKey() ); - } - */ - - return o_rc; - - #undef PRDF_FUNC -} - -//------------------------------------------------------------------------------ - -template<> -uint32_t VcmEvent::handlePhaseComplete( const uint32_t & i_eccAttns, - STEP_CODE_DATA_STRUCT & io_sc, - bool & o_done ) +template +uint32_t VcmEvent::handlePhaseComplete( const uint32_t & i_eccAttns, + STEP_CODE_DATA_STRUCT & io_sc, + bool & o_done ) { - #define PRDF_FUNC "[VcmEvent::handlePhaseComplete] " + #define PRDF_FUNC "[VcmEvent::handlePhaseComplete] " uint32_t o_rc = SUCCESS; @@ -126,36 +75,39 @@ uint32_t VcmEvent::handlePhaseComplete( const uint32_t & i_eccAttns, #undef PRDF_FUNC } -template<> +template +uint32_t VcmEvent::handlePhaseComplete( const uint32_t & i_eccAttns, + STEP_CODE_DATA_STRUCT & io_sc, + bool & o_done ); +template uint32_t VcmEvent::handlePhaseComplete( const uint32_t & i_eccAttns, STEP_CODE_DATA_STRUCT & io_sc, - bool & o_done ) + bool & o_done ); + +//############################################################################## +// +// Specializations for MCA +// +//############################################################################## + +template<> +uint32_t VcmEvent::startCmd() { - #define PRDF_FUNC "[VcmEvent::handlePhaseComplete] " + #define PRDF_FUNC "[VcmEvent::startCmd] " uint32_t o_rc = SUCCESS; - PRDF_ERR( PRDF_FUNC "Function not supported yet" ); - /* TODO RTC 208262 - do - { - if ( TD_PHASE_2 == iv_phase ) - { - // Determine if the chip mark has been verified. - o_rc = (i_eccAttns & MAINT_MCE) ? verified(io_sc) - : falseAlarm(io_sc); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "verified()/falseAlarm() failed" ); - break; - } - - o_done = true; // Procedure is complete. - } + // No stop conditions. + mss::mcbist::stop_conditions<> stopCond; - } while (0); - */ + // Start the time based scrub procedure on this master rank. + o_rc = startTdScrub( iv_chip, iv_rank, MASTER_RANK, stopCond ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "startTdScrub(0x%08x,0x%2x) failed", + iv_chip->getHuid(), getKey() ); + } return o_rc; @@ -510,6 +462,36 @@ uint32_t VcmEvent::handlePhaseComplete( const uint32_t & i_eccAttns, #undef PRDF_FUNC } +//############################################################################## +// +// Specializations for OCMB +// +//############################################################################## + +template<> +uint32_t VcmEvent::startCmd() +{ + #define PRDF_FUNC "[VcmEvent::startCmd] " + + uint32_t o_rc = SUCCESS; + + // No stop conditions. + mss::mcbist::stop_conditions<> stopCond; + + // Start the time based scrub procedure on this master rank. + o_rc = startTdScrub( iv_chip, iv_rank, MASTER_RANK, + stopCond ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "startTdScrub(0x%08x,0x%2x) failed", + iv_chip->getHuid(), getKey() ); + } + + return o_rc; + + #undef PRDF_FUNC +} + //------------------------------------------------------------------------------ } // end namespace PRDF diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm.H b/src/usr/diag/prdf/plat/mem/prdfMemVcm.H index b319f910b2c..c712d6aa32b 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemVcm.H +++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -342,6 +342,9 @@ class VcmEvent : public TdEntry #ifdef __HOSTBOOT_RUNTIME template<> uint32_t VcmEvent::cleanup(STEP_CODE_DATA_STRUCT & io_sc); +template<> +uint32_t VcmEvent::cleanup( + STEP_CODE_DATA_STRUCT & io_sc); #endif template<> diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C index 67c64b90a4f..e6422799609 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C @@ -68,16 +68,16 @@ VcmFalseAlarm * __getFalseAlarmCounter( ExtensibleChip * i_chip ) //############################################################################## // -// Specializations for MCA +// Generic Specializations // //############################################################################## -template<> -uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, - STEP_CODE_DATA_STRUCT & io_sc, - bool & o_done ) +template +uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, + STEP_CODE_DATA_STRUCT & io_sc, + bool & o_done ) { - #define PRDF_FUNC "[VcmEvent::checkEcc] " + #define PRDF_FUNC "[VcmEvent::checkEcc] " uint32_t o_rc = SUCCESS; @@ -94,7 +94,7 @@ uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, // At this point we don't actually have an address for the UE. The // best we can do is get the address in which the command stopped. MemAddr addr; - o_rc = getMemMaintAddr( iv_chip, addr ); + o_rc = getMemMaintAddr( iv_chip, addr ); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "getMemMaintAddr(0x%08x) failed", @@ -102,7 +102,7 @@ uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, break; } - o_rc = MemEcc::handleMemUe( iv_chip, addr, + o_rc = MemEcc::handleMemUe( iv_chip, addr, UE_TABLE::SCRUB_UE, io_sc ); if ( SUCCESS != o_rc ) { @@ -113,7 +113,7 @@ uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, // Because of the UE, any further TPS requests will likely have no // effect. So ban all subsequent requests. - MemDbUtils::banTps( iv_chip, addr.getRank() ); + MemDbUtils::banTps( iv_chip, addr.getRank() ); // Leave the mark in place and abort this procedure. o_done = true; break; @@ -124,7 +124,7 @@ uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, io_sc.service_data->setSignature( iv_chip->getHuid(), PRDFSIG_MaintIUE ); - o_rc = MemEcc::handleMemIue( iv_chip, iv_rank, io_sc ); + o_rc = MemEcc::handleMemIue( iv_chip, iv_rank, io_sc ); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "handleMemIue(0x%08x,0x%02x) failed", @@ -149,87 +149,14 @@ uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, #undef PRDF_FUNC } - -template<> +template +uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, + STEP_CODE_DATA_STRUCT & io_sc, + bool & o_done ); +template uint32_t VcmEvent::checkEcc( const uint32_t & i_eccAttns, STEP_CODE_DATA_STRUCT & io_sc, - bool & o_done ) -{ - #define PRDF_FUNC "[VcmEvent::checkEcc] " - - uint32_t o_rc = SUCCESS; - - PRDF_ERR( PRDF_FUNC "Function not supported yet" ); - /* TODO RTC 208262 - do - { - if ( i_eccAttns & MAINT_UE ) - { - PRDF_TRAC( PRDF_FUNC "UE Detected: 0x%08x,0x%02x", - iv_chip->getHuid(), getKey() ); - - io_sc.service_data->setSignature( iv_chip->getHuid(), - PRDFSIG_MaintUE ); - - // At this point we don't actually have an address for the UE. The - // best we can do is get the address in which the command stopped. - MemAddr addr; - o_rc = getMemMaintAddr( iv_chip, addr ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "getMemMaintAddr(0x%08x) failed", - iv_chip->getHuid() ); - break; - } - - o_rc = MemEcc::handleMemUe( iv_chip, addr, - UE_TABLE::SCRUB_UE, io_sc ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "handleMemUe(0x%08x,0x%02x) failed", - iv_chip->getHuid(), getKey() ); - break; - } - - // Because of the UE, any further TPS requests will likely have no - // effect. So ban all subsequent requests. - MemDbUtils::banTps( iv_chip, addr.getRank() ); - - // Leave the mark in place and abort this procedure. - o_done = true; break; - } - - if ( mfgMode() && (i_eccAttns & MAINT_IUE) ) - { - io_sc.service_data->setSignature( iv_chip->getHuid(), - PRDFSIG_MaintIUE ); - - o_rc = MemEcc::handleMemIue( iv_chip, iv_rank, io_sc ); - if ( SUCCESS != o_rc ) - { - PRDF_ERR( PRDF_FUNC "handleMemIue(0x%08x,0x%02x) failed", - iv_chip->getHuid(), getKey() ); - break; - } - - // If service call is set, then IUE threshold was reached. - if ( io_sc.service_data->queryServiceCall() ) - { - PRDF_TRAC( PRDF_FUNC "IUE threshold detected: 0x%08x,0x%02x", - iv_chip->getHuid(), getKey() ); - - // Leave the mark in place and abort this procedure. - o_done = true; break; - } - } - - } while (0); - */ - - return o_rc; - - #undef PRDF_FUNC -} + bool & o_done ); //------------------------------------------------------------------------------ @@ -274,11 +201,10 @@ uint32_t VcmEvent::cleanup( STEP_CODE_DATA_STRUCT & io_sc ) uint32_t o_rc = SUCCESS; - PRDF_ERR( PRDF_FUNC "Function not supported yet" ); - /* TODO RTC 208262 do { - o_rc = MarkStore::chipMarkCleanup( iv_chip, iv_rank, io_sc ); + o_rc = MarkStore::chipMarkCleanup( iv_chip, iv_rank, + io_sc ); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "chipMarkCleanup(0x%08x,0x%02x) failed", @@ -291,13 +217,12 @@ uint32_t VcmEvent::cleanup( STEP_CODE_DATA_STRUCT & io_sc ) // a least one false alarm on any DRAM on this rank other than this // DRAM. This is required on Nimbus because of two symbol correction, // which does not exist on Centaur. - VcmFalseAlarm * faCntr = __getFalseAlarmCounter(iv_chip); + VcmFalseAlarm * faCntr =__getFalseAlarmCounter(iv_chip); uint8_t dram = iv_mark.getSymbol().getDram(); if ( faCntr->queryDrams(iv_rank, dram, io_sc) ) io_sc.service_data->setServiceCall(); } while (0); - */ return o_rc;