Skip to content

Commit

Permalink
Update continue_cmd API to not change conditions w/default params
Browse files Browse the repository at this point in the history
Change-Id: I7619f008322b93f7dc3dc311c9ed1ad421f91471
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42063
Reviewed-by: JACOB L. HARVEY <jlharvey@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42066
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
aamarin authored and dcrowell77 committed Jun 23, 2017
1 parent 69fd797 commit 8edc404
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
16 changes: 11 additions & 5 deletions src/import/chips/p9/procedures/hwp/memory/lib/mcbist/memdiags.C
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ fapi_try_exit:
/// @param[in] i_target the target
/// @param[in] i_end whether to end, and where (default = don't stop at end of rank)
/// @param[in] i_stop stop conditions (default - 0 meaning 'don't change conditions')
/// @param[in] i_speed the speed to scrub (default - NO_CHANGE meaning leave speed untouched)
/// @param[in] i_speed the speed to scrub (default - SAME_SPEED meaning leave speed untouched)
/// @return FAPI2_RC_SUCCESS iff ok
/// @note overloaded as there's no 'invalid' state for thresholds.
///
Expand Down Expand Up @@ -723,14 +723,20 @@ fapi2::ReturnCode continue_cmd( const fapi2::Target<TARGET_TYPE_MCBIST>& i_targe
}

// Thresholds
FAPI_TRY( mss::mcbist::load_thresholds(i_target, i_stop) );
// According to API definition, 0 means don't change conditions
if( i_stop != stop_conditions::DONT_CHANGE)
{
FAPI_TRY( mss::mcbist::load_thresholds(i_target, i_stop) );
}

// Setup speed
FAPI_TRY( l_program.change_speed(i_target, i_speed) );

// Clear the program complete FIR
FAPI_TRY( mss::putScom(i_target, MCBIST_MCBISTFIRQ_AND,
fapi2::buffer<uint64_t>().setBit<MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE>().invert()) );
// Load new speed unless we aren't changing it
if( i_speed != speed::SAME_SPEED )
{
FAPI_TRY( load_mcbparm(i_target, l_program) );
}

// Tickle the resume from pause
FAPI_TRY( mss::mcbist::resume(i_target) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,16 +387,15 @@ fapi2::ReturnCode targeted_scrub( const fapi2::Target<T>& i_target,
/// @param[in] i_target the target
/// @param[in] i_end whether to end, and where (default - don't stop at end of rank)
/// @param[in] i_stop stop conditions (default - 0 meaning 'don't change conditions')
/// @param[in] i_speed the speed to scrub (default - NO_CHANGE meaning leave speed untouched)
/// @param[in] i_speed the speed to scrub (default - SAME_SPEED meaning leave speed untouched)
/// @return FAPI2_RC_SUCCESS iff ok
///
template< fapi2::TargetType T >
fapi2::ReturnCode continue_cmd( const fapi2::Target<T>& i_target,
const end_boundary i_end = end_boundary::NONE,
const stop_conditions& i_stop = stop_conditions(),
const end_boundary i_end = end_boundary::DONT_CHANGE,
const stop_conditions& i_stop = stop_conditions(stop_conditions::DONT_CHANGE),
const speed i_speed = speed::SAME_SPEED );

} // namespace

#endif

Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class stop_conditions
// Many of the config fields share a disable bit pattern, so we define it here
static constexpr uint64_t DISABLE = 0b1111;
static constexpr uint64_t MAX_THRESHOLD = 0b1110;
static constexpr uint64_t DONT_CHANGE = 0;

private:

Expand Down

0 comments on commit 8edc404

Please sign in to comment.