diff options
author | Tsung Yeung <tyeung@us.ibm.com> | 2019-02-12 16:37:15 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-02-19 12:30:35 -0600 |
commit | 85e03b6c3d2e06f7e5c83daa989facf8704c8c4b (patch) | |
tree | c704b47e2c69127acc580cc614efbf040c57405b | |
parent | cbc7571007852b87d2d3144d2aa58406f4167fcb (diff) | |
download | talos-hostboot-85e03b6c3d2e06f7e5c83daa989facf8704c8c4b.tar.gz talos-hostboot-85e03b6c3d2e06f7e5c83daa989facf8704c8c4b.zip |
Enable mss_scrub on MPIPL if NVDIMM is configured
NVDIMM restore blows away the scrub settings so it needs to be
reinitialized during MPIPL
Change-Id: I67f74c71e98b8907351eb7477bf197a941aefb8d
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71786
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
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>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: TSUNG K. YEUNG <tyeung@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/include/usr/diag/prdf/prdfMain_ipl.H | 13 | ||||
-rw-r--r-- | src/include/usr/isteps/istep16list.H | 6 | ||||
-rw-r--r-- | src/include/usr/isteps/istep_reasoncodes.H | 1 | ||||
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemBgScrub.H | 2 | ||||
-rw-r--r-- | src/usr/diag/prdf/prdfMain_ipl.C | 68 | ||||
-rw-r--r-- | src/usr/isteps/istep16/call_mss_scrub.C | 112 |
6 files changed, 122 insertions, 80 deletions
diff --git a/src/include/usr/diag/prdf/prdfMain_ipl.H b/src/include/usr/diag/prdf/prdfMain_ipl.H index 933a3d47f..08b626ce2 100644 --- a/src/include/usr/diag/prdf/prdfMain_ipl.H +++ b/src/include/usr/diag/prdf/prdfMain_ipl.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -65,16 +65,13 @@ extern int32_t analyzeIplCEStats( const TARGETING::TargetHandle_t i_mba, bool &o_calloutMade ); /** - * @brief Starts memory background scrubbing on all MBAs in the node. - * - * This will only start the initial fast scrub of all memory. PRD on the FSP or - * HostServices (SP-less machines) will need to resume normal background - * scrubbing once this initial fast scrub is complete. - * + * @brief Starts memory background scrubbing on the given target. + * @param i_trgt A target that contains the maintenance command logic (i.e. + * MCBIST or MBA). * @return If an error log is returned, then some internal function failed. See * the FFDC in the error log for failure details. */ -extern errlHndl_t startScrub(); +extern errlHndl_t startScrub( const TARGETING::TargetHandle_t i_trgt ); #ifdef CONFIG_ENABLE_CHECKSTOP_ANALYSIS diff --git a/src/include/usr/isteps/istep16list.H b/src/include/usr/isteps/istep16list.H index a6a5f7df7..37cc26ed4 100644 --- a/src/include/usr/isteps/istep16list.H +++ b/src/include/usr/isteps/istep16list.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -141,7 +141,11 @@ namespace INITSERVICE // Hostboot PRD should no longer be called after this step. ISTEPNAME(16,04,"mss_scrub"), ISTEP_16::call_mss_scrub, +#ifdef CONFIG_NVDIMM + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } +#else { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } +#endif }, { ISTEPNAME(16,05,"host_load_io_ppe"), diff --git a/src/include/usr/isteps/istep_reasoncodes.H b/src/include/usr/isteps/istep_reasoncodes.H index 4aa6a78a0..09b12abdc 100644 --- a/src/include/usr/isteps/istep_reasoncodes.H +++ b/src/include/usr/isteps/istep_reasoncodes.H @@ -65,6 +65,7 @@ namespace ISTEP MOD_SMP_WRAP_PROC_IOVALID = 0x22, MOD_APPLY_HCODE_GEN_CPU_REGS = 0x23, MOD_GET_LANEMASK_FROM_HX_KEYWORD = 0x24, + MOD_MSS_SCRUB = 0x25, }; /** diff --git a/src/usr/diag/prdf/plat/mem/prdfMemBgScrub.H b/src/usr/diag/prdf/plat/mem/prdfMemBgScrub.H index c04d9dcbb..c937e423b 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemBgScrub.H +++ b/src/usr/diag/prdf/plat/mem/prdfMemBgScrub.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/usr/diag/prdf/prdfMain_ipl.C b/src/usr/diag/prdf/prdfMain_ipl.C index 8241d925f..b6959e00f 100644 --- a/src/usr/diag/prdf/prdfMain_ipl.C +++ b/src/usr/diag/prdf/prdfMain_ipl.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2018 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,10 +40,9 @@ // Platform includes #include <prdfCenMbaDataBundle.H> -#include <prdfCenMbaDomain.H> #include <prdfPlatServices.H> #include <prdfP9McaDataBundle.H> -#include <prdfP9McbistDomain.H> +#include <prdfMemBgScrub.H> // Custom compile configs #include <config.h> @@ -115,7 +114,7 @@ int32_t analyzeIplCEStats( TargetHandle_t i_trgt, bool &o_calloutMade ) //------------------------------------------------------------------------------ -errlHndl_t startScrub() +errlHndl_t startScrub( const TargetHandle_t i_trgt ) { #define PRDF_FUNC "[PRDF::startScrub] " PRDF_ENTER( PRDF_FUNC ); @@ -123,63 +122,40 @@ errlHndl_t startScrub() errlHndl_t o_errl = nullptr; int32_t l_rc = SUCCESS; - HUID nodeId = INVALID_HUID; // will unlock when going out of scope PRDF_SYSTEM_SCOPELOCK; do { - // Since the last refresh is in istep10 host_prd_hwreconfig, - // it may be good to call it again here at istep16 mss_scrub - // to remove any non-functional MBAs from PRD system model. - o_errl = noLock_refresh(); - // This shouldn't return any error but if it does, break out - if( nullptr != o_errl ) + // Get the PRD chip object. + ExtensibleChip * chip = (ExtensibleChip *)systemPtr->GetChip(i_trgt); + if ( nullptr == chip ) { - PRDF_ERR( PRDF_FUNC "noLock_refresh() failed" ); - break; - } - - // This is run in Hostboot so there should only be one node. - TargetHandleList list = getFunctionalTargetList( TYPE_NODE ); - if ( 1 != list.size() ) - { - PRDF_ERR( PRDF_FUNC "getFunctionalTargetList(TYPE_NODE) failed" ); + PRDF_ERR( PRDF_FUNC "unable to find chip object for given target: " + "0x%08x", getHuid(i_trgt) ); l_rc = FAIL; break; } - nodeId = getHuid(list[0]); - PRDF_ENTER( PRDF_FUNC "HUID=0x%08x", nodeId ); - - // Start background scrubbing. - TARGETING::MODEL procModel = getChipModel( getMasterProc() ); - if ( MODEL_CUMULUS == procModel ) + // Start background scrubbing on this target. + switch ( chip->getType() ) { - MbaDomain * domain = (MbaDomain *)systemPtr->GetDomain(MBA_DOMAIN); - l_rc = domain->startScrub(); + case TYPE_MBA: startInitialBgScrub<TYPE_MBA>( chip); break; + case TYPE_MCBIST: startInitialBgScrub<TYPE_MCBIST>(chip); break; + default: + PRDF_ERR( PRDF_FUNC "Unsupported maintenance target type " + "0x%02x", chip->getType() ); + l_rc = FAIL; } - else if ( MODEL_NIMBUS == procModel ) - { - McbistDomain * domain = - (McbistDomain *)systemPtr->GetDomain(MCBIST_DOMAIN); - l_rc = domain->startScrub(); - } - else - { - PRDF_ERR(PRDF_FUNC "Master PROC model %d not supported", procModel); - PRDF_ASSERT(false); - } - - PRDF_EXIT( PRDF_FUNC "HUID=0x%08x", nodeId ); + if ( SUCCESS != l_rc ) break; } while (0); - if (( SUCCESS != l_rc ) && (NULL == o_errl)) + if ( SUCCESS != l_rc ) { // Get user data - uint64_t ud12 = PRDF_GET_UINT64_FROM_UINT32( nodeId, __LINE__ ); - uint64_t ud34 = PRDF_GET_UINT64_FROM_UINT32( 0, 0 ); + uint64_t ud12 = PRDF_GET_UINT64_FROM_UINT32( getHuid(i_trgt), 0 ); + uint64_t ud34 = PRDF_GET_UINT64_FROM_UINT32( 0, 0 ); // Create error log o_errl = new ERRORLOG::ErrlEntry( @@ -193,7 +169,9 @@ errlHndl_t startScrub() HWAS::SRCI_PRIORITY_HIGH ); // Add traces - o_errl->collectTrace( PRDF_COMP_NAME, 512 ); + o_errl->collectTrace( PRDF_COMP_NAME, 512 ); + o_errl->collectTrace( FAPI_TRACE_NAME, 256 ); + o_errl->collectTrace( FAPI_IMP_TRACE_NAME, 256 ); } PRDF_EXIT( PRDF_FUNC ); diff --git a/src/usr/isteps/istep16/call_mss_scrub.C b/src/usr/isteps/istep16/call_mss_scrub.C index 55e186334..aa8fd3861 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,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -44,9 +44,11 @@ namespace ISTEP_16 { void* call_mss_scrub (void *io_pArgs) { + #define ISTEP_FUNC "call_mss_scrub: " + IStepError l_stepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scrub entry" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ISTEP_FUNC "entry" ); errlHndl_t errl = nullptr; @@ -56,57 +58,117 @@ void* call_mss_scrub (void *io_pArgs) { // 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" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ISTEP_FUNC + "Background scrubbing not supported in SIMICs" ); + break; } - else + + TargetHandle_t sysTrgt = nullptr; + targetService().getTopLevelTarget( sysTrgt ); + + TargetHandle_t masterProc = nullptr; + targetService().masterProcChipTargetHandle( masterProc ); + + // Determine which target type runs the maintenance commands. + TARGETING::MODEL masterProcModel = masterProc->getAttr<ATTR_MODEL>(); + TARGETING::TYPE maintTrgtType; + switch ( masterProcModel ) { - // Start background scrubbing. - errl = PRDF::startScrub(); + case MODEL_CUMULUS: maintTrgtType = TYPE_MBA; break; + case MODEL_NIMBUS: maintTrgtType = TYPE_MCBIST; break; + default: + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ISTEP_FUNC + "Master PROC model %d not supported", + masterProcModel ); + /*@ + * @errortype + * @moduleid ISTEP::MOD_MSS_SCRUB + * @reasoncode ISTEP::RC_INVALID_TARGET_TYPE + * @userdata1 Master processor model + * @userdata2 unused + * @devdesc The master processor model is unsupported. + * @custdesc A problem occurred during the IPL of the system. + */ + errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + ISTEP::MOD_MSS_SCRUB, + ISTEP::RC_INVALID_TARGET_TYPE, + masterProcModel, 0 ); + } + if ( nullptr != errl ) break; + + // Start background scrubbing on all targets of this maintenance type. + TargetHandleList maintList; getAllChiplets( maintList, maintTrgtType ); + for ( auto & maintTrgt : maintList ) + { + bool start = true; // initially true except for MP-IPL conditions. + +#ifdef CONFIG_NVDIMM + // During MP-IPLs, We only want to start background scrubbing on + // maintenance targets that have connected NVDIMMs. + if ( sysTrgt->getAttr<ATTR_IS_MPIPL_HB>() ) + { + start = false; // Only true if there is an NVDIMM. + + // Find at least one DIMM behind this MCBIST that is an NVDIMM. + TargetHandleList dimmList; + getChildAffinityTargets( dimmList, maintTrgt, CLASS_NA, + TYPE_DIMM ); + for ( auto & dimmTrgt : dimmList ) + { + start = isNVDIMM(dimmTrgt); + if ( start ) break; + } + } +#endif + // Continue to the next target if we are unable to start background + // scrubbing on this target. + if ( !start ) continue; + + // Start the command on this target. + errl = PRDF::startScrub( maintTrgt ); if ( nullptr != errl ) { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "PRDF::startScrub() failed" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ISTEP_FUNC + "PRDF::startScrub(0x%08x) failed", + get_huid(maintTrgt) ); break; } - } - // 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<ATTR_MODEL>() ) - { - TargetHandleList trgtList; getAllChiplets( trgtList, TYPE_MCBIST ); - - for ( auto & tt : trgtList ) + // 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. + if ( TYPE_MCBIST == maintTrgtType ) { - fapi2::Target<fapi2::TARGET_TYPE_MCBIST> ft ( tt ); + fapi2::Target<fapi2::TARGET_TYPE_MCBIST> ft ( maintTrgt ); FAPI_INVOKE_HWP( errl, mss::unmask::after_background_scrub, ft); if ( nullptr != errl ) { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ISTEP_FUNC "mss::unmask::after_background_scrub(0x%08x) " - "failed", get_huid(tt) ); + "failed", get_huid(maintTrgt) ); break; } } - if ( nullptr != errl ) break; } + if ( nullptr != errl ) break; } while (0); if ( nullptr != errl ) { l_stepError.addErrorDetails( errl ); + errl->collectTrace( "ISTEPS_TRACE", 256 ); errlCommit( errl, HWPF_COMP_ID ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_scrub exit" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, ISTEP_FUNC "exit" ); + // end task, returning any errorlogs to IStepDisp return l_stepError.getErrorHandle(); + + #undef ISTEP_FUNC } }; |