From 1fa7778144abe8e64ad6ae4109be9689422442ad Mon Sep 17 00:00:00 2001 From: Zane Shelley Date: Thu, 30 Mar 2017 13:38:06 -0500 Subject: Add mss unmask and FIFO reset calls to step code Change-Id: I9991d25ce0d33e0608970736f84c4816e3d274fe Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38644 Reviewed-by: Dean Sanner Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Caleb N. Palmer Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Reviewed-by: Zane C. Shelley --- src/usr/isteps/istep16/call_mss_scrub.C | 68 +++++++++++++++++++++++++-------- src/usr/isteps/istep16/makefile | 2 + 2 files changed, 55 insertions(+), 15 deletions(-) (limited to 'src/usr/isteps/istep16') diff --git a/src/usr/isteps/istep16/call_mss_scrub.C b/src/usr/isteps/istep16/call_mss_scrub.C index 701ace8e6..55e186334 100644 --- a/src/usr/isteps/istep16/call_mss_scrub.C +++ b/src/usr/isteps/istep16/call_mss_scrub.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,12 +31,14 @@ #include #include +#include // for FAPI_INVOKE_HWP +#include // for mss::unmask::after_background_scrub using namespace ERRORLOG; using namespace TARGETING; using namespace ISTEP; using namespace ISTEP_ERROR; - +using namespace TARGETING; namespace ISTEP_16 { @@ -46,24 +48,60 @@ void* call_mss_scrub (void *io_pArgs) TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scrub entry" ); - // There are performance issues and some functional deficiencies - // that make runtime scrub problematic, so turning it off - if( Util::isSimicsRunning() ) + errlHndl_t errl = nullptr; + + do { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Skipping runtime scrub in Simics" ); - return NULL; - } + if ( Util::isSimicsRunning() ) + { + // There are performance issues and some functional deficiencies + // that make background scrub problematic in SIMICs. + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Skipping background " + "scrub in SIMICs" ); + } + else + { + // Start background scrubbing. + errl = PRDF::startScrub(); + if ( nullptr != errl ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "PRDF::startScrub() failed" ); + break; + } + } - errlHndl_t l_errl = PRDF::startScrub(); + // Nimbus chips require us to unmask some additional FIR bits. Note that + // this is not needed on Cumulus based systems because this is already + // contained within the other Centaur HWPs. + TargetHandle_t masterProc = nullptr; + targetService().masterProcChipTargetHandle(masterProc); + if ( MODEL_NIMBUS == masterProc->getAttr() ) + { + TargetHandleList trgtList; getAllChiplets( trgtList, TYPE_MCBIST ); - if ( NULL != l_errl ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Error returned from call to PRDF::startScrub" ); + for ( auto & tt : trgtList ) + { + fapi2::Target ft ( tt ); + + FAPI_INVOKE_HWP( errl, mss::unmask::after_background_scrub, ft); + if ( nullptr != errl ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "mss::unmask::after_background_scrub(0x%08x) " + "failed", get_huid(tt) ); + break; + } + } + if ( nullptr != errl ) break; + } - l_stepError.addErrorDetails( l_errl ); + } while (0); - errlCommit( l_errl, HWPF_COMP_ID ); + if ( nullptr != errl ) + { + l_stepError.addErrorDetails( errl ); + errlCommit( errl, HWPF_COMP_ID ); } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scrub exit" ); diff --git a/src/usr/isteps/istep16/makefile b/src/usr/isteps/istep16/makefile index 14c96c6d8..c04dc08f2 100644 --- a/src/usr/isteps/istep16/makefile +++ b/src/usr/isteps/istep16/makefile @@ -31,6 +31,8 @@ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/pm/ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/perv/ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/nest/ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/lib/ +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/memory +EXTRAINCDIR += ${ROOTPATH}/src/import EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/ -- cgit v1.2.1