diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2016-04-18 13:17:48 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2016-05-02 12:12:15 -0400 |
commit | c040570318915921ad29b18f2521e6201b68ff53 (patch) | |
tree | d566bc193f2b599210fe2c6c89eb8a94ab6e121d /src | |
parent | c248bf82f11e8dbc291eb9833e4a02e63d8d1b8f (diff) | |
download | talos-hostboot-c040570318915921ad29b18f2521e6201b68ff53.tar.gz talos-hostboot-c040570318915921ad29b18f2521e6201b68ff53.zip |
PRD: update call_mss_memdiag
Change-Id: I17c4b8ca56e739622ea7e53a84a956f620432eeb
RTC: 145354
Depends-on: I9e76c07849331bf1402aeeddd32fdf1dcc26eafc
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23360
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/diag/mdia/mdia.C | 104 | ||||
-rw-r--r-- | src/usr/isteps/istep14/call_mss_memdiag.C | 81 |
2 files changed, 114 insertions, 71 deletions
diff --git a/src/usr/diag/mdia/mdia.C b/src/usr/diag/mdia/mdia.C index 572879e43..6376a19d7 100644 --- a/src/usr/diag/mdia/mdia.C +++ b/src/usr/diag/mdia/mdia.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -46,76 +48,78 @@ namespace MDIA errlHndl_t runStep(const TargetHandleList & i_targetList) { - MDIA_FAST("memory diagnostics entry with %d target(s)", - i_targetList.size()); + //TODO RTC 151755 + //MDIA_FAST("memory diagnostics entry with %d target(s)", + // i_targetList.size()); // memory diagnostics ipl step entry point - errlHndl_t err = 0; + errlHndl_t err = NULL; - Globals globals; + // TODO RTC 151755 + // Globals globals; - TargetHandle_t top = 0; - targetService().getTopLevelTarget(top); + // TargetHandle_t top = 0; + // targetService().getTopLevelTarget(top); - if(top) - { - globals.mfgPolicy = top->getAttr<ATTR_MNFG_FLAGS>(); + // if(top) + // { + // globals.mfgPolicy = top->getAttr<ATTR_MNFG_FLAGS>(); - uint8_t maxMemPatterns = - top->getAttr<ATTR_RUN_MAX_MEM_PATTERNS>(); + // uint8_t maxMemPatterns = + // top->getAttr<ATTR_RUN_MAX_MEM_PATTERNS>(); - // This registry / attr is the same as the - // exhaustive mnfg one - if(maxMemPatterns) - { - globals.mfgPolicy |= - MNFG_FLAG_ENABLE_EXHAUSTIVE_PATTERN_TEST; - } + // // This registry / attr is the same as the + // // exhaustive mnfg one + // if(maxMemPatterns) + // { + // globals.mfgPolicy |= + // MNFG_FLAG_ENABLE_EXHAUSTIVE_PATTERN_TEST; + // } - globals.simicsRunning = Util::isSimicsRunning(); + // globals.simicsRunning = Util::isSimicsRunning(); - globals.disableScrubs = - top->getAttr<ATTR_DISABLE_SCRUB_AFTER_PATTERN_TEST>(); - } + // globals.disableScrubs = + // top->getAttr<ATTR_DISABLE_SCRUB_AFTER_PATTERN_TEST>(); + // } - // get the workflow for each target mba passed in. - // associate each workflow with the target handle. + // // get the workflow for each target mba passed in. + // // associate each workflow with the target handle. - WorkFlowAssocMap list; + // WorkFlowAssocMap list; - TargetHandleList::const_iterator tit; - DiagMode mode; + // TargetHandleList::const_iterator tit; + // DiagMode mode; - for(tit = i_targetList.begin(); tit != i_targetList.end(); ++tit) - { - err = getMbaDiagnosticMode(globals, *tit, mode); + // for(tit = i_targetList.begin(); tit != i_targetList.end(); ++tit) + // { + // err = getMbaDiagnosticMode(globals, *tit, mode); - if(err) - { - break; - } + // if(err) + // { + // break; + // } - err = getMbaWorkFlow(mode, list[*tit], globals); + // err = getMbaWorkFlow(mode, list[*tit], globals); - if(err) - { - break; - } - } + // if(err) + // { + // break; + // } + // } - if(!err) - { - // set global data - Singleton<StateMachine>::instance().setGlobals(globals); + // if(!err) + // { + // // set global data + // Singleton<StateMachine>::instance().setGlobals(globals); - // TODO...run the workflow through the state machine - err = Singleton<StateMachine>::instance().run(list); - } + // // TODO...run the workflow through the state machine + // err = Singleton<StateMachine>::instance().run(list); + // } - // ensure threads and pools are shutdown when finished + // // ensure threads and pools are shutdown when finished - doStepCleanup(globals); + // doStepCleanup(globals); return err; diff --git a/src/usr/isteps/istep14/call_mss_memdiag.C b/src/usr/isteps/istep14/call_mss_memdiag.C index c03550463..ec8b8b884 100644 --- a/src/usr/isteps/istep14/call_mss_memdiag.C +++ b/src/usr/isteps/istep14/call_mss_memdiag.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,6 +26,10 @@ #include <errl/errlmanager.H> #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> +#include <targeting/common/utilFilter.H> +#include <diag/attn/attn.H> +#include <diag/mdia/mdia.H> +#include <targeting/namedtarget.H> using namespace ISTEP; using namespace ISTEP_ERROR; @@ -33,38 +37,73 @@ using namespace ERRORLOG; namespace ISTEP_14 { -void* call_mss_memdiag (void *io_pArgs) +void* call_mss_memdiag (void* io_pArgs) { - errlHndl_t l_errl = NULL; + errlHndl_t l_errl = NULL; - IStepError l_stepError; + IStepError l_stepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_mss_extent_setup entry" ); + TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_memdiag entry"); - //@TODO RTC:133831 call the HWP - //FAPI_INVOKE_HWP( l_errl, mss_extent_setup ); + TARGETING::TargetHandleList l_targetList; + TARGETING::TYPE targetType; - if ( l_errl ) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : failed executing mss_extent_setup returning error" ); - - // Create IStep error log and cross reference to error that occurred - l_stepError.addErrorDetails( l_errl ); + // we need to check the model of the master core + // if it is Cumulus then we will use TYPE_MBA for targetType + // else it is Nimbus so then we will use TYPE_MCBIST for targetType + const TARGETING::Target* masterCore = TARGETING::getMasterCore(); - // Commit Error - errlCommit( l_errl, HWPF_COMP_ID ); + if ( TARGETING::MODEL_CUMULUS == + masterCore->getAttr<TARGETING::ATTR_MODEL>() ) + { + targetType = TARGETING::TYPE_MBA; } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : mss_extent_setup completed ok" ); + targetType = TARGETING::TYPE_MCBIST; } + getAllChiplets(l_targetList, targetType); + + do + { + l_errl = ATTN::startService(); + if( NULL != l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ATTN startService failed"); + break; + } + + l_errl = MDIA::runStep(l_targetList); + if( NULL != l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "MDIA subStep failed"); + break; + } + + l_errl = ATTN::stopService(); + if( NULL != l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ATTN stopService failed"); + break; + } + + }while( 0 ); + + if( NULL != l_errl ) + { + // Create IStep error log and cross reference to error that occurred + l_stepError.addErrorDetails(l_errl); + + // Commit Error + errlCommit(l_errl, HWPF_COMP_ID); + } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_mss_extent_setup exit" ); + TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_memdiag exit"); // end task, returning any errorlogs to IStepDisp return l_stepError.getErrorHandle(); |