summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/mdia
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2017-09-20 16:37:07 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2017-09-29 16:06:35 -0400
commitc201607e1be4e39c7dfd369d7b43b7784f98345c (patch)
tree0124d56b41f15736ddf5f5fbd1eda6e4c1dcd09d /src/usr/diag/mdia
parent22edf1585727cfa8b09b6f060651b446bdbe9fe3 (diff)
downloadtalos-hostboot-c201607e1be4e39c7dfd369d7b43b7784f98345c.tar.gz
talos-hostboot-c201607e1be4e39c7dfd369d7b43b7784f98345c.zip
MDIA: Update maint cmds with Centaur Hwp
Change-Id: I7b2d34e511392fae0a6f3671aa6ab8dea00205c8 RTC: 155857 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46542 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@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> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia')
-rw-r--r--src/usr/diag/mdia/makefile6
-rw-r--r--src/usr/diag/mdia/mdiafwd.H1
-rw-r--r--src/usr/diag/mdia/mdiamba.C8
-rw-r--r--src/usr/diag/mdia/mdiasm.C175
4 files changed, 104 insertions, 86 deletions
diff --git a/src/usr/diag/mdia/makefile b/src/usr/diag/mdia/makefile
index 5d5412c8f..afcf82931 100644
--- a/src/usr/diag/mdia/makefile
+++ b/src/usr/diag/mdia/makefile
@@ -42,6 +42,12 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/targeting/common
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs
+##########################################################
+# Following is needed to include p9c_mss_maint_cmds.H
+##########################################################
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/centaur/common/include
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/centaur/procedures/hwp/memory
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/centaur/procedures/hwp/memory/lib/shared
MODULE = mdia
diff --git a/src/usr/diag/mdia/mdiafwd.H b/src/usr/diag/mdia/mdiafwd.H
index 61505cb9f..fb693084e 100644
--- a/src/usr/diag/mdia/mdiafwd.H
+++ b/src/usr/diag/mdia/mdiafwd.H
@@ -96,7 +96,6 @@ enum
MCBIST_FIR_ACT0 = 0x07012306,
MCBIST_FIR_ACT1 = 0x07012307,
- //TODO RTC 155857
// mcs unit regs
MCI_FIR = 0x02011840,
MCI_FIR_MASK = 0x02011843,
diff --git a/src/usr/diag/mdia/mdiamba.C b/src/usr/diag/mdia/mdiamba.C
index 1daf16d89..df75c093a 100644
--- a/src/usr/diag/mdia/mdiamba.C
+++ b/src/usr/diag/mdia/mdiamba.C
@@ -141,6 +141,14 @@ errlHndl_t getDiagnosticMode(
o_mode = FOUR_PATTERNS;
}
+ // TODO RTC 180118
+ // For Cumulus PON we will only support init to 0
+ ConstTargetHandle_t parent = getParentChip( i_trgt );
+ if ( MODEL_CUMULUS == parent->getAttr<ATTR_MODEL>() )
+ {
+ o_mode = ONE_PATTERN;
+ }
+
} while(0);
MDIA_FAST("getDiagnosticMode: trgt: %x, o_mode: 0x%x, "
diff --git a/src/usr/diag/mdia/mdiasm.C b/src/usr/diag/mdia/mdiasm.C
index 8b585b116..4d6c451ae 100644
--- a/src/usr/diag/mdia/mdiasm.C
+++ b/src/usr/diag/mdia/mdiasm.C
@@ -46,6 +46,7 @@
#include <config.h>
#include <initservice/initserviceif.H>
#include <sys/time.h>
+#include <p9c_mss_maint_cmds.H>
using namespace TARGETING;
using namespace ERRORLOG;
@@ -565,29 +566,25 @@ void StateMachine::processCommandTimeout(const MonitorIDs & i_monitorIDs)
//target type is MBA
if ( TYPE_MBA == trgtType )
{
- //TODO RTC 155857
- //no longer have the mss_MaintCmd class at the moment
- //will need to update once we have Cumulus support
-
- //fapi2::ReturnCode fapirc =
- // static_cast<mss_MaintCmd *>((*wit)->data)->stopCmd();
- //err = fapi2::rcToErrl(fapirc);
-
- //if( nullptr != err )
- //{
- // MDIA_ERR("sm: mss_MaintCmd::stopCmd failed");
- // errlCommit(err, MDIA_COMP_ID);
- //}
-
- //fapirc =
- // static_cast<mss_MaintCmd *>((*wit)->data)->cleanupCmd();
- //err = fapi2::rcToErrl(fapirc);
-
- //if( nullptr != err )
- //{
- // MDIA_ERR("sm: mss_MaintCmd::cleanupCmd failed");
- // errlCommit(err, MDIA_COMP_ID);
- //}
+ fapi2::ReturnCode fapirc =
+ static_cast<mss_MaintCmd *>((*wit)->data)->stopCmd();
+ err = fapi2::rcToErrl(fapirc);
+
+ if( nullptr != err )
+ {
+ MDIA_ERR("sm: mss_MaintCmd::stopCmd failed");
+ errlCommit(err, MDIA_COMP_ID);
+ }
+
+ fapirc =
+ static_cast<mss_MaintCmd *>((*wit)->data)->cleanupCmd();
+ err = fapi2::rcToErrl(fapirc);
+
+ if( nullptr != err )
+ {
+ MDIA_ERR("sm: mss_MaintCmd::cleanupCmd failed");
+ errlCommit(err, MDIA_COMP_ID);
+ }
}
//target type is MCBIST
else
@@ -1018,9 +1015,7 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
//target type is MBA
if (TYPE_MBA == trgtType)
{
- /*TODO RTC 155857
-
- uint64_t stopCondition =
+ uint32_t stopCondition =
mss_MaintCmd::STOP_END_OF_RANK |
mss_MaintCmd::STOP_ON_MPE |
mss_MaintCmd::STOP_ON_UE |
@@ -1034,8 +1029,8 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
stopCondition |= mss_MaintCmd::STOP_ON_HARD_NCE_ETE;
}
- ecmdDataBufferBase startAddr(64), endAddr(64);
- mss_MaintCmd * cmd = NULL;
+ fapi2::buffer<uint64_t> startAddr, endAddr;
+ mss_MaintCmd * cmd = nullptr;
cmd = static_cast<mss_MaintCmd *>(i_wfp.data);
fapi2::Target<fapi2::TARGET_TYPE_MBA> fapiMba(target);
@@ -1049,12 +1044,12 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
break;
}
- fapirc = mss_get_address_range(
+ fapi2::ReturnCode fapirc = mss_get_address_range(
fapiMba,
MSS_ALL_RANKS,
startAddr,
endAddr);
- err = fapiRcToErrl(fapirc);
+ err = fapi2::rcToErrl(fapirc);
if(err)
{
@@ -1062,33 +1057,45 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
break;
}
+ ConstTargetHandle_t parent = getParentChip(target);
+
// new command...use the full range
switch(workItem)
{
case START_RANDOM_PATTERN:
- cmd = new mss_SuperFastRandomInit(
- fapiMba,
- startAddr,
- endAddr,
- mss_MaintCmd::PATTERN_RANDOM,
- stopCondition,
- false);
-
- MDIA_FAST("sm: random init %p on: %x", cmd,
- get_huid(target));
+ // TODO RTC 180118
+ // For Cumulus PON we will only support init to 0
+ if ( MODEL_CUMULUS != parent->getAttr<ATTR_MODEL>() )
+ {
+ cmd = new mss_SuperFastRandomInit(
+ fapiMba,
+ startAddr,
+ endAddr,
+ mss_MaintCmd::PATTERN_RANDOM,
+ stopCondition,
+ false);
+
+ MDIA_FAST("sm: random init %p on: %x", cmd,
+ get_huid(target));
+ }
break;
case START_SCRUB:
- cmd = new mss_SuperFastRead(
- fapiMba,
- startAddr,
- endAddr,
- stopCondition,
- false);
-
- MDIA_FAST("sm: scrub %p on: %x", cmd,
- get_huid(target));
+ // TODO RTC 180118
+ // For Cumulus PON we will only support init to 0
+ if ( MODEL_CUMULUS != parent->getAttr<ATTR_MODEL>() )
+ {
+ cmd = new mss_SuperFastRead(
+ fapiMba,
+ startAddr,
+ endAddr,
+ stopCondition,
+ false);
+
+ MDIA_FAST("sm: scrub %p on: %x", cmd,
+ get_huid(target));
+ }
break;
case START_PATTERN_0:
case START_PATTERN_1:
@@ -1144,7 +1151,6 @@ errlHndl_t StateMachine::doMaintCommand(WorkFlowProperties & i_wfp)
}
}
- */
}
//target type is MCBIST
else
@@ -1376,41 +1382,40 @@ bool StateMachine::processMaintCommandEvent(const MaintCommandEvent & i_event)
//target type is MBA
if(TYPE_MBA == trgtType)
{
- //TODO RTC 155857
- //mss_MaintCmd * cmd = static_cast<mss_MaintCmd *>(wfp.data);
- //
- //if(cmd && (flags & STOP_CMD))
- //{
- // MDIA_FAST("sm: stopping command: %p", target);
-
- // fapi2::ReturnCode fapirc = cmd->stopCmd();
- // err = fapi2::rcToErrl(fapirc);
-
- // if (nullptr != err)
- // {
- // MDIA_ERR("sm: mss_MaintCmd::stopCmd failed");
- // errlCommit(err, MDIA_COMP_ID);
- // }
- //}
-
- //if(cmd && (flags & CLEANUP_CMD))
- //{
- // // restore any init settings that
- // // may have been changed by the command
-
- // fapi2::ReturnCode fapirc = cmd->cleanupCmd();
- // err = fapi2::rcToErrl(fapirc);
- // if(nullptr != err)
- // {
- // MDIA_ERR("sm: mss_MaintCmd::cleanupCmd failed");
- // errlCommit(err, MDIA_COMP_ID);
- // }
- //}
-
- //if(cmd && (flags & DELETE_CMD))
- //{
- // delete cmd;
- //}
+ mss_MaintCmd * cmd = static_cast<mss_MaintCmd *>(wfp.data);
+
+ if(cmd && (flags & STOP_CMD))
+ {
+ MDIA_FAST("sm: stopping command: %p", target);
+
+ fapi2::ReturnCode fapirc = cmd->stopCmd();
+ err = fapi2::rcToErrl(fapirc);
+
+ if (nullptr != err)
+ {
+ MDIA_ERR("sm: mss_MaintCmd::stopCmd failed");
+ errlCommit(err, MDIA_COMP_ID);
+ }
+ }
+
+ if(cmd && (flags & CLEANUP_CMD))
+ {
+ // restore any init settings that
+ // may have been changed by the command
+
+ fapi2::ReturnCode fapirc = cmd->cleanupCmd();
+ err = fapi2::rcToErrl(fapirc);
+ if(nullptr != err)
+ {
+ MDIA_ERR("sm: mss_MaintCmd::cleanupCmd failed");
+ errlCommit(err, MDIA_COMP_ID);
+ }
+ }
+
+ if(cmd && (flags & DELETE_CMD))
+ {
+ delete cmd;
+ }
}
//target type is MCBIST
else
OpenPOWER on IntegriCloud