Skip to content

Commit

Permalink
PRD: Axone VCM Updates
Browse files Browse the repository at this point in the history
Change-Id: I9c54c9d8ae01186785bf4a773f6a9ea5d0d311fb
RTC: 208262
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84233
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamen G Tyner <ben.tyner@ibm.com>
Reviewed-by: Brian J Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84782
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
  • Loading branch information
cnpalmer authored and zane131 committed Oct 4, 2019
1 parent 2dbc309 commit 195dd6a
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 174 deletions.
140 changes: 61 additions & 79 deletions src/usr/diag/prdf/plat/mem/prdfMemVcm.C
Expand Up @@ -39,67 +39,16 @@ using namespace PlatServices;

//##############################################################################
//
// Specializations for MCA
// Generic Specializations
//
//##############################################################################

template<>
uint32_t VcmEvent<TYPE_MCA>::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<TYPE_MCA>( 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<TYPE_OCMB_CHIP>::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<TYPE_MCA>( 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<TYPE_MCA>::handlePhaseComplete( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done )
template<TARGETING::TYPE T>
uint32_t VcmEvent<T>::handlePhaseComplete( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done )
{
#define PRDF_FUNC "[VcmEvent<TYPE_MCA>::handlePhaseComplete] "
#define PRDF_FUNC "[VcmEvent<T>::handlePhaseComplete] "

uint32_t o_rc = SUCCESS;

Expand All @@ -126,36 +75,39 @@ uint32_t VcmEvent<TYPE_MCA>::handlePhaseComplete( const uint32_t & i_eccAttns,
#undef PRDF_FUNC
}

template<>
template
uint32_t VcmEvent<TYPE_MCA>::handlePhaseComplete( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done );
template
uint32_t VcmEvent<TYPE_OCMB_CHIP>::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<TYPE_MCA>::startCmd()
{
#define PRDF_FUNC "[VcmEvent<TYPE_OCMB_CHIP>::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<TYPE_MCA>( 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;

Expand Down Expand Up @@ -510,6 +462,36 @@ uint32_t VcmEvent<TYPE_MBA>::handlePhaseComplete( const uint32_t & i_eccAttns,
#undef PRDF_FUNC
}

//##############################################################################
//
// Specializations for OCMB
//
//##############################################################################

template<>
uint32_t VcmEvent<TYPE_OCMB_CHIP>::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<TYPE_OCMB_CHIP>( 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
Expand Down
5 changes: 4 additions & 1 deletion src/usr/diag/prdf/plat/mem/prdfMemVcm.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -342,6 +342,9 @@ class VcmEvent : public TdEntry
#ifdef __HOSTBOOT_RUNTIME
template<>
uint32_t VcmEvent<TARGETING::TYPE_MCA>::cleanup(STEP_CODE_DATA_STRUCT & io_sc);
template<>
uint32_t VcmEvent<TARGETING::TYPE_OCMB_CHIP>::cleanup(
STEP_CODE_DATA_STRUCT & io_sc);
#endif

template<>
Expand Down
113 changes: 19 additions & 94 deletions src/usr/diag/prdf/plat/mem/prdfMemVcm_rt.C
Expand Up @@ -68,16 +68,16 @@ VcmFalseAlarm * __getFalseAlarmCounter<TYPE_MBA>( ExtensibleChip * i_chip )

//##############################################################################
//
// Specializations for MCA
// Generic Specializations
//
//##############################################################################

template<>
uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done )
template<TARGETING::TYPE T>
uint32_t VcmEvent<T>::checkEcc( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done )
{
#define PRDF_FUNC "[VcmEvent<TYPE_MCA>::checkEcc] "
#define PRDF_FUNC "[VcmEvent<T>::checkEcc] "

uint32_t o_rc = SUCCESS;

Expand All @@ -94,15 +94,15 @@ uint32_t VcmEvent<TYPE_MCA>::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<TYPE_MCA>( iv_chip, addr );
o_rc = getMemMaintAddr<T>( iv_chip, addr );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getMemMaintAddr(0x%08x) failed",
iv_chip->getHuid() );
break;
}

o_rc = MemEcc::handleMemUe<TYPE_MCA>( iv_chip, addr,
o_rc = MemEcc::handleMemUe<T>( iv_chip, addr,
UE_TABLE::SCRUB_UE, io_sc );
if ( SUCCESS != o_rc )
{
Expand All @@ -113,7 +113,7 @@ uint32_t VcmEvent<TYPE_MCA>::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<TYPE_MCA>( iv_chip, addr.getRank() );
MemDbUtils::banTps<T>( iv_chip, addr.getRank() );

// Leave the mark in place and abort this procedure.
o_done = true; break;
Expand All @@ -124,7 +124,7 @@ uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
io_sc.service_data->setSignature( iv_chip->getHuid(),
PRDFSIG_MaintIUE );

o_rc = MemEcc::handleMemIue<TYPE_MCA>( iv_chip, iv_rank, io_sc );
o_rc = MemEcc::handleMemIue<T>( iv_chip, iv_rank, io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "handleMemIue(0x%08x,0x%02x) failed",
Expand All @@ -149,87 +149,14 @@ uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,

#undef PRDF_FUNC
}

template<>
template
uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done );
template
uint32_t VcmEvent<TYPE_OCMB_CHIP>::checkEcc( const uint32_t & i_eccAttns,
STEP_CODE_DATA_STRUCT & io_sc,
bool & o_done )
{
#define PRDF_FUNC "[VcmEvent<TYPE_OCMB_CHIP>::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<TYPE_MCA>( iv_chip, addr );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getMemMaintAddr(0x%08x) failed",
iv_chip->getHuid() );
break;
}
o_rc = MemEcc::handleMemUe<TYPE_MCA>( 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<TYPE_MCA>( 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<TYPE_MCA>( 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 );

//------------------------------------------------------------------------------

Expand Down Expand Up @@ -274,11 +201,10 @@ uint32_t VcmEvent<TYPE_OCMB_CHIP>::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<TYPE_MCA>( iv_chip, iv_rank, io_sc );
o_rc = MarkStore::chipMarkCleanup<TYPE_OCMB_CHIP>( iv_chip, iv_rank,
io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "chipMarkCleanup(0x%08x,0x%02x) failed",
Expand All @@ -291,13 +217,12 @@ uint32_t VcmEvent<TYPE_OCMB_CHIP>::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<TYPE_MCA>(iv_chip);
VcmFalseAlarm * faCntr =__getFalseAlarmCounter<TYPE_OCMB_CHIP>(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;

Expand Down

0 comments on commit 195dd6a

Please sign in to comment.