From d1b590057bc0a0effb94a589ac8ab590425fc28d Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Tue, 5 Nov 2019 10:56:50 -0600 Subject: PRD: Uncomment Axone HWP code Change-Id: I1d60cd40e93974a9a71bee35d27b2a2b7f3be510 RTC: 207273 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/86516 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/88206 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins --- src/usr/diag/prdf/common/iipconst.h | 5 +- .../prdf/common/plat/prdfPlatServices_common.C | 4 +- .../diag/prdf/plat/explorer/prdfExplorerPlugins.C | 6 +- src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C | 8 ++- src/usr/diag/prdf/plat/mem/prdfMemDsd_rt.C | 8 ++- src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C | 14 ++++- src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C | 14 ++++- src/usr/diag/prdf/plat/mem/prdfMemVcm.C | 14 ++++- src/usr/diag/prdf/plat/prdfPlatServices.C | 70 +++++++++++---------- src/usr/diag/prdf/plat/prdfPlatServices_ipl.C | 71 +++++++++++----------- src/usr/diag/prdf/plat/prdfPlatServices_rt.C | 30 ++++----- src/usr/diag/prdf/prdf_hb_only.mk | 21 +++++++ 12 files changed, 165 insertions(+), 100 deletions(-) (limited to 'src') diff --git a/src/usr/diag/prdf/common/iipconst.h b/src/usr/diag/prdf/common/iipconst.h index 07c5ded16..5c71cf8f7 100755 --- a/src/usr/diag/prdf/common/iipconst.h +++ b/src/usr/diag/prdf/common/iipconst.h @@ -65,12 +65,13 @@ namespace PRDF /* Constants */ /*--------------------------------------------------------------------*/ +// Return code constants #ifndef SUCCESS -#define SUCCESS 0 +static const int32_t SUCCESS = 0; #endif #ifndef FAIL -#define FAIL -1 +static const int32_t FAIL = -1; #endif enum DOMAIN_ID diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C index 2535f2d54..5cabaedc8 100644 --- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C +++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C @@ -973,7 +973,7 @@ int32_t mssGetSteerMux( TargetHandle_t i_ocmb, { int32_t o_rc = SUCCESS; - /* TODO RTC 207273 - sparing support + /* TODO RTC 199032 - sparing support // called by FSP code so can't just move to hostboot side #ifdef __HOSTBOOT_MODULE @@ -1043,7 +1043,7 @@ int32_t mssSetSteerMux( TargetHandle_t i_memPort, { int32_t o_rc = SUCCESS; - /* TODO RTC 207273 - sparing support + /* TODO RTC 199032 - sparing support #ifdef __HOSTBOOT_MODULE errlHndl_t errl = NULL; diff --git a/src/usr/diag/prdf/plat/explorer/prdfExplorerPlugins.C b/src/usr/diag/prdf/plat/explorer/prdfExplorerPlugins.C index 9b55250f4..4a8dba1a2 100644 --- a/src/usr/diag/prdf/plat/explorer/prdfExplorerPlugins.C +++ b/src/usr/diag/prdf/plat/explorer/prdfExplorerPlugins.C @@ -61,12 +61,10 @@ int32_t McbistCmdComplete( ExtensibleChip * i_chip, { #define PRDF_FUNC "[explorer_ocmb::McbistCmdComplete] " - // TODO RTC 207273 - Do nothing for now until we have full support for - // Axone/Explorer return SUCCESS; // Tell the TD controller there was a command complete attention. - /*OcmbDataBundle * db = getOcmbDataBundle( i_chip ); + OcmbDataBundle * db = getOcmbDataBundle( i_chip ); if ( SUCCESS != db->getTdCtlr()->handleCmdComplete(io_sc) ) { // Something failed. It is possible the command complete attention has @@ -79,7 +77,7 @@ int32_t McbistCmdComplete( ExtensibleChip * i_chip, // MDIA to do it, the command complete bit has already been cleared. // Don't do it again. return PRD_NO_CLEAR_FIR_BITS; - }*/ + } #undef PRDF_FUNC } diff --git a/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C index 7abab6368..9dbaeeb3c 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C @@ -30,6 +30,8 @@ #include #include +#include + using namespace TARGETING; namespace PRDF @@ -231,7 +233,9 @@ uint32_t DsdEvent::startCmd() uint32_t o_rc = SUCCESS; - mss::mcbist::stop_conditions<> stopCond; + #ifdef CONFIG_AXONE + + mss::mcbist::stop_conditions stopCond; switch ( iv_phase ) { @@ -260,6 +264,8 @@ uint32_t DsdEvent::startCmd() default: PRDF_ASSERT( false ); // invalid phase } + #endif + return o_rc; #undef PRDF_FUNC diff --git a/src/usr/diag/prdf/plat/mem/prdfMemDsd_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemDsd_rt.C index e85e04720..1478a666d 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemDsd_rt.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemDsd_rt.C @@ -29,6 +29,8 @@ #include #include +#include + using namespace TARGETING; namespace PRDF @@ -224,7 +226,9 @@ uint32_t DsdEvent::startCmd() uint32_t o_rc = SUCCESS; - mss::mcbist::stop_conditions<> stopCond; + #ifdef CONFIG_AXONE + + mss::mcbist::stop_conditions stopCond; stopCond.set_pause_on_ue(mss::ON); @@ -237,6 +241,8 @@ uint32_t DsdEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C index d9ebc24a5..64eb74648 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemTps_ipl.C @@ -36,6 +36,8 @@ #include #include +#include + using namespace TARGETING; namespace PRDF @@ -258,13 +260,15 @@ uint32_t TpsEvent::startCmd() uint32_t o_rc = SUCCESS; + #ifndef CONFIG_AXONE + // We don't need to set any stop-on-error conditions or thresholds for // soft/inter/hard CEs during Memory Diagnostics. The design is to let the // command continue to the end of the rank and we do diagnostics on the // CE counts found in the per-symbol counters. Therefore, all we need to do // is tell the hardware which CE types to count. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; switch ( iv_phase ) { @@ -290,6 +294,8 @@ uint32_t TpsEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC @@ -381,13 +387,15 @@ uint32_t TpsEvent::startCmd() uint32_t o_rc = SUCCESS; + #ifdef CONFIG_AXONE + // We don't need to set any stop-on-error conditions or thresholds for // soft/inter/hard CEs during Memory Diagnostics. The design is to let the // command continue to the end of the rank and we do diagnostics on the // CE counts found in the per-symbol counters. Therefore, all we need to do // is tell the hardware which CE types to count. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; switch ( iv_phase ) { @@ -413,6 +421,8 @@ uint32_t TpsEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C b/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C index f7023c07e..8b3b220c6 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemTps_rt.C @@ -37,6 +37,8 @@ #include #include +#include + using namespace TARGETING; namespace PRDF @@ -1330,13 +1332,15 @@ uint32_t TpsEvent::startCmd() uint32_t o_rc = SUCCESS; + #ifndef CONFIG_AXONE + // We don't need to set any stop-on-error conditions or thresholds for // soft/inter/hard CEs at runtime. The design is to let the command continue // to the end of the rank and we do diagnostics on the CE counts found in // the per-symbol counters. Therefore, all we need to do is tell the // hardware which CE types to count. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; switch ( iv_phase ) { @@ -1364,6 +1368,8 @@ uint32_t TpsEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC @@ -1382,13 +1388,15 @@ uint32_t TpsEvent::startCmd() uint32_t o_rc = SUCCESS; + #ifdef CONFIG_AXONE + // We don't need to set any stop-on-error conditions or thresholds for // soft/inter/hard CEs at runtime. The design is to let the command continue // to the end of the rank and we do diagnostics on the CE counts found in // the per-symbol counters. Therefore, all we need to do is tell the // hardware which CE types to count. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; switch ( iv_phase ) { @@ -1416,6 +1424,8 @@ uint32_t TpsEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm.C index 74ec3dfed..784306baf 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemVcm.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm.C @@ -30,6 +30,8 @@ // Platform includes #include +#include + using namespace TARGETING; namespace PRDF @@ -98,8 +100,10 @@ uint32_t VcmEvent::startCmd() uint32_t o_rc = SUCCESS; + #ifndef CONFIG_AXONE + // No stop conditions. - mss::mcbist::stop_conditions<> stopCond; + 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 ); @@ -109,6 +113,8 @@ uint32_t VcmEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC @@ -475,8 +481,10 @@ uint32_t VcmEvent::startCmd() uint32_t o_rc = SUCCESS; + #ifdef CONFIG_AXONE + // No stop conditions. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; // Start the time based scrub procedure on this master rank. o_rc = startTdScrub( iv_chip, iv_rank, MASTER_RANK, @@ -487,6 +495,8 @@ uint32_t VcmEvent::startCmd() iv_chip->getHuid(), getKey() ); } + #endif + return o_rc; #undef PRDF_FUNC diff --git a/src/usr/diag/prdf/plat/prdfPlatServices.C b/src/usr/diag/prdf/plat/prdfPlatServices.C index a3112f54f..0ad247134 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices.C +++ b/src/usr/diag/prdf/plat/prdfPlatServices.C @@ -62,6 +62,8 @@ #include #include +#include + #ifdef CONFIG_NVDIMM #include #endif @@ -400,25 +402,25 @@ uint32_t getMemAddrRange( ExtensibleChip * i_chip, mss::mcbist::address & o_endAddr, AddrRangeType i_rangeType ) { - #define PRDF_FUNC "[PlatServices::getMemAddrRange] " + #define PRDF_FUNC "[PlatServices::getMemAddrRange] " + + #ifdef CONFIG_AXONE PRDF_ASSERT( nullptr != i_chip ); PRDF_ASSERT( TYPE_OCMB_CHIP == i_chip->getType() ); - /* TODO RTC 207273 - no HWP support yet - uint32_t port = i_chip->getPos() % MAX_PORT_PER_OCMB; - + // TODO RTC 210072 - support for multiple ports if ( SLAVE_RANK == i_rangeType ) { FAPI_CALL_HWP_NORETURN( mss::mcbist::address::get_srank_range, - port, i_rank.getDimmSlct(), + 0, i_rank.getDimmSlct(), i_rank.getRankSlct(), i_rank.getSlave(), o_startAddr, o_endAddr ); } else if ( MASTER_RANK == i_rangeType ) { FAPI_CALL_HWP_NORETURN( mss::mcbist::address::get_mrank_range, - port, i_rank.getDimmSlct(), + 0, i_rank.getDimmSlct(), i_rank.getRankSlct(), o_startAddr, o_endAddr ); } else @@ -426,7 +428,8 @@ uint32_t getMemAddrRange( ExtensibleChip * i_chip, PRDF_ERR( PRDF_FUNC "unsupported range type %d", i_rangeType ); PRDF_ASSERT(false); } - */ + + #endif return SUCCESS; @@ -713,7 +716,6 @@ bool isRowRepairEnabled( ExtensibleChip * i_chip, bool o_isEnabled = false; - /* TODO RTC 207273 - no HWP support yet do { // Don't do row repair if DRAM repairs is disabled. @@ -739,7 +741,6 @@ bool isRowRepairEnabled( ExtensibleChip * i_chip, } }while(0); - */ return o_isEnabled; @@ -962,11 +963,11 @@ uint32_t startBgScrub( ExtensibleChip * i_mcaChip, //------------------------------------------------------------------------------ +#ifndef CONFIG_AXONE template<> uint32_t startTdScrub( ExtensibleChip * i_chip, - const MemRank & i_rank, - AddrRangeType i_rangeType, - mss::mcbist::stop_conditions<> i_stopCond ) + const MemRank & i_rank, AddrRangeType i_rangeType, + mss::mcbist::stop_conditions i_stopCond ) { #define PRDF_FUNC "[PlatServices::startTdScrub] " @@ -1023,6 +1024,7 @@ uint32_t startTdScrub( ExtensibleChip * i_chip, #undef PRDF_FUNC } +#endif //############################################################################## //## Centaur Maintenance Command wrappers @@ -1437,22 +1439,21 @@ uint32_t startBgScrub( ExtensibleChip * i_ocmb, uint32_t o_rc = SUCCESS; - PRDF_TRAC( PRDF_FUNC "Background scrubbing not yet supported." ); + #ifdef CONFIG_AXONE - /* TODO RTC 207273 - no HWP support yet // Get the OCMB fapi target fapi2::Target fapiTrgt (i_ocmb->getTrgt()); #ifdef __HOSTBOOT_RUNTIME // Starting a new command. Clear the UE and CE scrub stop counters - getOcmbDataBundle( mcbChip )->iv_ueStopCounter.reset(); - getOcmbDataBundle( mcbChip )->iv_ceStopCounter.reset(); + getOcmbDataBundle( i_ocmb )->iv_ueStopCounter.reset(); + getOcmbDataBundle( i_ocmb )->iv_ceStopCounter.reset(); #endif // Get the stop conditions. // NOTE: If HBRT_PRD is not configured, we want to use the defaults so that // background scrubbing never stops. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; // AUEs are checkstop attentions. Unfortunately, MCBIST commands do not stop // when the system checkstops. Therefore, we must set the stop condition for @@ -1491,12 +1492,12 @@ uint32_t startBgScrub( ExtensibleChip * i_ocmb, { // Get the first address of the given rank. mss::mcbist::address saddr, eaddr; - o_rc = getMemAddrRange( i_memPort, i_rank, saddr, eaddr, + o_rc = getMemAddrRange( i_ocmb, i_rank, saddr, eaddr, SLAVE_RANK ); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "getMemAddrRange(0x%08x,0x%2x) failed", - i_memPort->getHuid(), i_rank.getKey() ); + i_ocmb->getHuid(), i_rank.getKey() ); break; } @@ -1511,20 +1512,20 @@ uint32_t startBgScrub( ExtensibleChip * i_ocmb, // Start the background scrub command. errlHndl_t errl = nullptr; - FAPI_INVOKE_HWP( errl, mss::memdiags::background_scrub, fapiTrgt, + FAPI_INVOKE_HWP( errl, exp_background_scrub, fapiTrgt, stopCond, scrubSpeed, saddr ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::background_scrub(0x%08x,%d) " + PRDF_ERR( PRDF_FUNC "exp_background_scrub(0x%08x,%d) " "failed", i_ocmb->getHuid(), i_rank.getMaster() ); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); o_rc = FAIL; break; } } while (0); + #endif - */ return o_rc; #undef PRDF_FUNC @@ -1532,11 +1533,11 @@ uint32_t startBgScrub( ExtensibleChip * i_ocmb, //------------------------------------------------------------------------------ +#ifdef CONFIG_AXONE template<> uint32_t startTdScrub(ExtensibleChip * i_chip, - const MemRank & i_rank, - AddrRangeType i_rangeType, - mss::mcbist::stop_conditions<> i_stopCond) + const MemRank & i_rank, AddrRangeType i_rangeType, + mss::mcbist::stop_conditions i_stopCond) { #define PRDF_FUNC "[PlatServices::startTdScrub] " @@ -1545,7 +1546,6 @@ uint32_t startTdScrub(ExtensibleChip * i_chip, uint32_t o_rc = SUCCESS; - /* TODO RTC 207273 - no HWP support yet // Set stop-on-AUE for all target scrubs. See explanation in startBgScrub() // for the reasons why. i_stopCond.set_pause_on_aue(mss::ON); @@ -1554,8 +1554,8 @@ uint32_t startTdScrub(ExtensibleChip * i_chip, { // Get the address range of the given rank. mss::mcbist::address saddr, eaddr; - o_rc = getMemAddrRange( i_chip, i_rank, saddr, eaddr, - i_rangeType ); + o_rc = getMemAddrRange( i_chip, i_rank, saddr, eaddr, + i_rangeType ); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "getMemAddrRange(0x%08x,0x%2x) failed", @@ -1564,12 +1564,10 @@ uint32_t startTdScrub(ExtensibleChip * i_chip, } // Get the OCMB_CHIP fapi target. - ExtensibleChip * ocmbChip = getConnectedParent(i_chip, TYPE_OCMB_CHIP); - fapi2::Target - fapiTrgt(ocmbChip->getTrgt()); + fapi2::Target fapiTrgt(i_chip->getTrgt()); // Clear all of the counters and maintenance ECC attentions. - o_rc = prepareNextCmd( ocmbChip ); + o_rc = prepareNextCmd( i_chip ); if ( SUCCESS != o_rc ) { PRDF_ERR( PRDF_FUNC "prepareNextCmd(0x%08x) failed", @@ -1579,23 +1577,23 @@ uint32_t startTdScrub(ExtensibleChip * i_chip, // Start targeted scrub command. errlHndl_t errl = nullptr; - FAPI_INVOKE_HWP( errl, mss::memdiags::targeted_scrub, fapiTrgt, + FAPI_INVOKE_HWP( errl, exp_targeted_scrub, fapiTrgt, i_stopCond, saddr, eaddr, mss::mcbist::NONE ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::targeted_scrub(0x%08x,0x%02x) " - "failed", ocmbChip->getHuid(), i_rank.getKey() ); + PRDF_ERR( PRDF_FUNC "exp_targeted_scrub(0x%08x,0x%02x) " + "failed", i_chip->getHuid(), i_rank.getKey() ); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); o_rc = FAIL; break; } } while (0); - */ return o_rc; #undef PRDF_FUNC } +#endif //############################################################################## //## Core/cache trace array functions diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C b/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C index 08f4efd4d..14d1c26ba 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C +++ b/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C @@ -44,6 +44,8 @@ #include +#include + using namespace TARGETING; namespace PRDF @@ -216,7 +218,7 @@ uint32_t mssRestoreDramRepairs( TargetHandle_t i_target, { uint32_t o_rc = SUCCESS; - /* TODO RTC 207273 - no HWP support yet + /* TODO RTC 199032 - no HWP support yet errlHndl_t errl = NULL; @@ -842,17 +844,19 @@ uint32_t resumeTdSteerCleanup( ExtensibleChip * i_chip, template<> bool isBroadcastModeCapable( ExtensibleChip * i_chip ) { - /* TODO RTC 207273 - no HWP support yet PRDF_ASSERT( nullptr != i_chip ); PRDF_ASSERT( TYPE_OCMB_CHIP == i_chip->getType() ); + mss::states l_ret = mss::states::NO; + + #ifdef CONFIG_AXONE + fapi2::Target fapiTrgt ( i_chip->getTrgt() ); + FAPI_CALL_HWP( l_ret, exp_is_broadcast_capable, fapiTrgt ); + + #endif - mss::states l_ret = mss::states::NO; - FAPI_CALL_HWP( l_ret, mss::mcbist::is_broadcast_capable, fapiTrgt ); return ( mss::states::YES == l_ret ); - */ - return false; } //------------------------------------------------------------------------------ @@ -870,12 +874,13 @@ uint32_t startSfRead( ExtensibleChip * i_ocmb, uint32_t o_rc = SUCCESS; - /* TODO RTC 207273 - no HWP support yet + #ifdef CONFIG_AXONE + // Get the OCMB_CHIP fapi target - fapi2::Target fapiTrgt ( i_ocmb->getTrgt() ); + fapi2::Target fapiTrgt ( i_ocmb->getTrgt() ); // Get the stop conditions. - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; stopCond.set_pause_on_mpe(mss::ON) .set_pause_on_ue(mss::ON) .set_pause_on_aue(mss::ON) @@ -910,11 +915,11 @@ uint32_t startSfRead( ExtensibleChip * i_ocmb, // Start the super fast read command. errlHndl_t errl; - FAPI_INVOKE_HWP( errl, mss::memdiags::sf_read, fapiTrgt, stopCond, + FAPI_INVOKE_HWP( errl, exp_sf_read, fapiTrgt, stopCond, saddr ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::sf_read(0x%08x,%d) failed", + PRDF_ERR( PRDF_FUNC "exp_sf_read(0x%08x,%d) failed", i_ocmb->getHuid(), i_rank.getMaster() ); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); o_rc = FAIL; break; @@ -922,7 +927,7 @@ uint32_t startSfRead( ExtensibleChip * i_ocmb, } while (0); - */ + #endif return o_rc; @@ -939,10 +944,12 @@ uint32_t cleanupSfRead( ExtensibleChip * i_ocmbChip ) //------------------------------------------------------------------------------ +#ifdef CONFIG_AXONE + template<> uint32_t startTdSteerCleanup( ExtensibleChip * i_chip, - const MemRank & i_rank, AddrRangeType i_rangeType, - mss::mcbist::stop_conditions<> i_stopCond ) + const MemRank & i_rank, AddrRangeType i_rangeType, + mss::mcbist::stop_conditions i_stopCond ) { #define PRDF_FUNC "[PlatServices::startTdSteerCleanup] " @@ -982,7 +989,7 @@ uint32_t startTdSteerCleanup( ExtensibleChip * i_chip, break; } - /* TODO RTC 207273 - sparing support + /* TODO RTC 199032 - sparing support // Get the MBA fapi target. fapi2::Target fapiTrgt ( i_chip->getTrgt() ); @@ -1007,13 +1014,16 @@ uint32_t startTdSteerCleanup( ExtensibleChip * i_chip, #undef PRDF_FUNC } +#endif + //------------------------------------------------------------------------------ +#ifdef CONFIG_AXONE + template<> uint32_t startTdSfRead(ExtensibleChip * i_chip, - const MemRank & i_rank, - AddrRangeType i_rangeType, - mss::mcbist::stop_conditions<> i_stopCond) + const MemRank & i_rank, AddrRangeType i_rangeType, + mss::mcbist::stop_conditions i_stopCond) { #define PRDF_FUNC "[PlatServices::startTdSfRead] " @@ -1050,29 +1060,20 @@ uint32_t startTdSfRead(ExtensibleChip * i_chip, break; } - /* TODO RTC 207273 - HWP support - // Get the MBA fapi target. - fapi2::Target fapiTrgt ( i_chip->getTrgt() ); - - // Create the new command. Store a pointer to the command in the MBA - // data bundle so that we can call the cleanup function after the - // command has completed. - MbaDataBundle * db = getMbaDataBundle( i_chip ); - PRDF_ASSERT( nullptr == db->iv_sfCmd ); // Code bug. - db->iv_sfCmd = new mss_SuperFastRead { fapiTrgt, saddr, eaddr, - i_stopCond, false }; + // Get the OCMB fapi target. + fapi2::Target + fapiTrgt( i_chip->getTrgt() ); // Start the super fast read command. - errlHndl_t errl = nullptr; - FAPI_INVOKE_HWP( errl, db->iv_sfCmd->setupAndExecuteCmd ); + errlHndl_t errl; + FAPI_INVOKE_HWP( errl, exp_sf_read, fapiTrgt, i_stopCond, saddr ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "setupAndExecuteCmd() on 0x%08x,0x%02x failed", - i_chip->getHuid(), i_rank.getKey() ); + PRDF_ERR( PRDF_FUNC "exp_sf_read(0x%08x,%d) failed", + i_chip->getHuid(), i_rank.getMaster() ); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); o_rc = FAIL; break; } - */ } while (0); @@ -1081,6 +1082,8 @@ uint32_t startTdSfRead(ExtensibleChip * i_chip, #undef PRDF_FUNC } +#endif + //------------------------------------------------------------------------------ } // end namespace PlatServices diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C index 09eff0b6e..0fbe5b969 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C +++ b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C @@ -53,6 +53,8 @@ #include #include +#include + //------------------------------------------------------------------------------ using namespace TARGETING; @@ -435,21 +437,21 @@ uint32_t stopBgScrub( ExtensibleChip * i_chip ) uint32_t rc = SUCCESS; - PRDF_TRAC( PRDF_FUNC "Function not supported yet" ); + #ifdef CONFIG_AXONE - /* TODO RTC 207273 - no HWP support yet fapi2::Target fapiTrgt ( i_chip->getTrgt() ); errlHndl_t errl; - FAPI_INVOKE_HWP( errl, mss::memdiags::stop, fapiTrgt ); + FAPI_INVOKE_HWP( errl, exp_stop, fapiTrgt ); if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::stop(0x%08x) failed", i_chip->getHuid()); + PRDF_ERR( PRDF_FUNC "exp_stop(0x%08x) failed", i_chip->getHuid()); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); rc = FAIL; } - */ + + #endif return rc; @@ -469,8 +471,8 @@ uint32_t resumeBgScrub( ExtensibleChip * i_chip, uint32_t o_rc = SUCCESS; - PRDF_TRAC( PRDF_FUNC "Function not supported yet" ); - /* TODO RTC 207273 - no HWP support yet + #ifdef CONFIG_AXONE + // Get the OCMB fapi target fapi2::Target fapiTrgt ( i_chip->getTrgt() ); @@ -486,7 +488,7 @@ uint32_t resumeBgScrub( ExtensibleChip * i_chip, } // Check UE and CE stop counters to determine stop conditions - mss::mcbist::stop_conditions<> stopCond; + mss::mcbist::stop_conditions stopCond; if ( getOcmbDataBundle(i_chip)->iv_ueStopCounter.thReached(io_sc) ) { // If we've reached the limit of UEs we're allowed to stop on @@ -513,25 +515,25 @@ uint32_t resumeBgScrub( ExtensibleChip * i_chip, { // If we haven't reached threshold on the number of UEs or CEs we // have stopped on, do not change the stop conditions. - stopCond = mss::mcbist::stop_conditions<>( - mss::mcbist::stop_conditions<>::DONT_CHANGE ); + stopCond = mss::mcbist::stop_conditions( + mss::mcbist::stop_conditions::DONT_CHANGE ); } // Resume the command on the next address. errlHndl_t errl; - FAPI_INVOKE_HWP( errl, mss::memdiags::continue_cmd, fapiTrgt, + FAPI_INVOKE_HWP( errl, exp_continue_cmd, fapiTrgt, mss::mcbist::end_boundary::DONT_CHANGE, stopCond ); - if ( nullptr != errl ) { - PRDF_ERR( PRDF_FUNC "mss::memdiags::continue_cmd(0x%08x) failed", + PRDF_ERR( PRDF_FUNC "exp_continue_cmd(0x%08x) failed", i_chip->getHuid() ); PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); o_rc = FAIL; break; } } while (0); - */ + + #endif return o_rc; diff --git a/src/usr/diag/prdf/prdf_hb_only.mk b/src/usr/diag/prdf/prdf_hb_only.mk index bfd9487d8..6217c6b40 100644 --- a/src/usr/diag/prdf/prdf_hb_only.mk +++ b/src/usr/diag/prdf/prdf_hb_only.mk @@ -82,6 +82,14 @@ prd_incpath += ${ROOTPATH}/src/import/ prd_incpath += ${ROOTPATH}/src/import/chips/centaur/procedures/hwp/io/ prd_incpath += ${ROOTPATH}/src/usr/isteps/nvdimm +# For including hwp_wrappers.H +prd_incpath += ${ROOTPATH}/src/import/generic/memory/lib/prd/ +prd_incpath += ${ROOTPATH}/src/import/generic/memory/lib/utils/mcbist/ +prd_incpath += ${ROOTPATH}/src/import/chips/ocmb/explorer/common/include/ +prd_incpath += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/ +prd_incpath += ${ROOTPATH}/obj/genfiles/chips/ocmb/explorer/procedures/hwp/memory/lib/ +prd_incpath += ${ROOTPATH}/obj/genfiles/generic/memory/lib/ + ################################################################################ # Hostboot only object files common to both IPL and runtime ################################################################################ @@ -186,6 +194,19 @@ prd_obj_no_sim += p9c_dimmBadDqBitmapFuncs.o prd_obj_no_sim += p9c_query_channel_failure.o prd_obj_no_sim += p9c_mss_rowRepairFuncs.o +prd_vpath += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/ +prd_vpath += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/eff_config/ +prd_vpath += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/mcbist/ +prd_vpath += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/utils +prd_vpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib/utils/ +prd_obj_no_sim += hwp_wrappers_nim.o +prd_obj_no_sim += hwp_wrappers_exp.o +prd_obj_no_sim += nimbus_pos.o +prd_obj_no_sim += explorer_pos.o +prd_obj_no_sim += exp_mcbist.o +prd_obj_no_sim += exp_memdiags.o +prd_obj_no_sim += explorer_memory_size.o + ################################################################################ # The following are hardware procedure utilities that we are pulling into the # PRD library (only needed here for HBRT). This code is already compiled in -- cgit v1.2.1