summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-03-30 13:38:06 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-03-30 16:35:40 -0400
commit1fa7778144abe8e64ad6ae4109be9689422442ad (patch)
treeb4e1cb386f2d4b7b029002d3d9389599306d23a1 /src
parent59e8d054c52eedd3a7ebca7893b97f41c5cf0888 (diff)
downloadtalos-hostboot-1fa7778144abe8e64ad6ae4109be9689422442ad.tar.gz
talos-hostboot-1fa7778144abe8e64ad6ae4109be9689422442ad.zip
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 <dsanner@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/isteps/istep14/call_mss_memdiag.C136
-rw-r--r--src/usr/isteps/istep16/call_mss_scrub.C68
-rw-r--r--src/usr/isteps/istep16/makefile2
3 files changed, 148 insertions, 58 deletions
diff --git a/src/usr/isteps/istep14/call_mss_memdiag.C b/src/usr/isteps/istep14/call_mss_memdiag.C
index 8354e5fa6..56c5ce142 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,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -31,15 +31,57 @@
#include <diag/mdia/mdia.H>
#include <targeting/common/targetservice.H>
+#include <plat_hwp_invoker.H> // for FAPI_INVOKE_HWP
+#include <lib/fir/memdiags_fir.H> // for mss::unmask::after_memdiags
+#include <lib/mc/port.H> // for mss::reset_reorder_queue_settings
+
using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace ERRORLOG;
+using namespace TARGETING;
namespace ISTEP_14
{
+
+// Helper function to run Memory Diagnostics on a list of targets.
+errlHndl_t __runMemDiags( TargetHandleList i_trgtList )
+{
+ errlHndl_t errl = nullptr;
+
+ do
+ {
+ errl = ATTN::startService();
+ if ( nullptr != errl )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ATTN::startService() failed" );
+ break;
+ }
+
+ errl = MDIA::runStep( i_trgtList );
+ if ( nullptr != errl )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "MDIA::runStep() failed" );
+ break;
+ }
+
+ errl = ATTN::stopService();
+ if ( nullptr != errl )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "ATTN::stopService() failed" );
+ break;
+ }
+
+ } while (0);
+
+ return errl;
+}
+
void* call_mss_memdiag (void* io_pArgs)
{
- errlHndl_t l_errl = NULL;
+ errlHndl_t errl = nullptr;
IStepError l_stepError;
@@ -52,64 +94,72 @@ void* call_mss_memdiag (void* io_pArgs)
#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS
// @TODO-RTC: 155065
// update firdata inputs for OCC
- l_errl = HBOCC::loadHostDataToSRAM(masterproc,
+ errl = HBOCC::loadHostDataToSRAM(masterproc,
PRDF::ALL_PROC_MEM_MASTER_CORE);
- assert(l_errl==NULL,
+ assert(nullptr == errl,
"Error returned from call to HBOCC::loadHostDataToSRAM");
#endif
- TARGETING::TargetHandleList l_targetList;
- TARGETING::TYPE targetType;
-
- // we need to check the model of the master proc
- // 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
- if ( TARGETING::MODEL_CUMULUS ==
- masterproc->getAttr<TARGETING::ATTR_MODEL>() )
- {
- targetType = TARGETING::TYPE_MBA;
- }
- else
- {
- 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;
- }
+ // Actions vary by processor type.
+ ATTR_MODEL_type procType = masterproc->getAttr<ATTR_MODEL>();
- l_errl = MDIA::runStep(l_targetList);
- if( NULL != l_errl )
+ if ( MODEL_NIMBUS == procType )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "MDIA subStep failed");
- break;
+ TargetHandleList trgtList; getAllChiplets( trgtList, TYPE_MCBIST );
+
+ // Start Memory Diagnostics.
+ errl = __runMemDiags( trgtList );
+ if ( nullptr != errl ) break;
+
+ for ( auto & tt : trgtList )
+ {
+ fapi2::Target<fapi2::TARGET_TYPE_MCBIST> ft ( tt );
+
+ // Unmask mainline FIRs.
+ FAPI_INVOKE_HWP( errl, mss::unmask::after_memdiags, ft );
+ if ( nullptr != errl )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "mss::unmask::after_memdiags(0x%08x) failed",
+ get_huid(tt) );
+ break;
+ }
+
+ // Turn off FIFO mode to improve performance.
+ FAPI_INVOKE_HWP( errl, mss::reset_reorder_queue_settings, ft );
+ if ( nullptr != errl )
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "mss::reset_reorder_queue_settings(0x%08x) "
+ "failed", get_huid(tt) );
+ break;
+ }
+ }
+ if ( nullptr != errl ) break;
}
-
- l_errl = ATTN::stopService();
- if( NULL != l_errl )
+ else if ( MODEL_CUMULUS == procType )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ATTN stopService failed");
- break;
+ TargetHandleList trgtList; getAllChiplets( trgtList, TYPE_MBA );
+
+ // Start Memory Diagnostics
+ errl = __runMemDiags( trgtList );
+ if ( nullptr != errl ) break;
+
+ // No need to unmask or turn off FIFO. That is already contained
+ // within the other Centaur HWPs.
}
- }while( 0 );
+ } while (0);
- if( NULL != l_errl )
+ if ( nullptr != errl )
{
// Create IStep error log and cross reference to error that occurred
- l_stepError.addErrorDetails(l_errl);
+ l_stepError.addErrorDetails(errl);
// Commit Error
- errlCommit(l_errl, HWPF_COMP_ID);
+ errlCommit(errl, HWPF_COMP_ID);
}
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
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 <util/misc.H>
#include <diag/prdf/prdfMain.H>
+#include <plat_hwp_invoker.H> // for FAPI_INVOKE_HWP
+#include <lib/fir/memdiags_fir.H> // 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<ATTR_MODEL>() )
+ {
+ 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<fapi2::TARGET_TYPE_MCBIST> 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/
OpenPOWER on IntegriCloud