diff options
author | Brad Bishop <bradleyb@us.ibm.com> | 2013-04-12 08:06:52 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-05-06 16:19:16 -0500 |
commit | 85ccc6bf69ed809c8ef64f02faa01728f761344a (patch) | |
tree | cb21fb5de774da4542938b67a22e7c180714735b /src/usr/diag/mdia/mdiasm.C | |
parent | e458eba2ec2c56e37b206e7fec5f1e79f2445fde (diff) | |
download | talos-hostboot-85ccc6bf69ed809c8ef64f02faa01728f761344a.tar.gz talos-hostboot-85ccc6bf69ed809c8ef64f02faa01728f761344a.zip |
MDIA: Collect ffdc after command timeout
Change-Id: I6405e43ab0d7f28b4730900674403d297660e6f0
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4048
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/mdia/mdiasm.C')
-rw-r--r-- | src/usr/diag/mdia/mdiasm.C | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/usr/diag/mdia/mdiasm.C b/src/usr/diag/mdia/mdiasm.C index f46575c8c..5e9a8132a 100644 --- a/src/usr/diag/mdia/mdiasm.C +++ b/src/usr/diag/mdia/mdiasm.C @@ -38,6 +38,8 @@ #include <fapiPlatHwpInvoker.H> #include <diag/prdf/prdfMain.H> #include <devicefw/userif.H> +#include <targeting/common/utilFilter.H> +#include <errl/errludlogregister.H> using namespace TARGETING; using namespace ERRORLOG; @@ -57,6 +59,100 @@ void StateMachine::running(bool & o_running) mutex_unlock(&iv_mutex); } +void addTimeoutFFDC(TargetHandle_t i_mba, errlHndl_t & io_log) +{ + const uint64_t mbaRegs[] = { + MBA01_SPA, + MBA01_SPA_MASK, + MBA01_CMD_TYPE, + MBA01_CMD_CONTROL, + MBA01_CMD_STATUS, + MBA01_MBMACAQ, + MBA01_MBMEA, + }; + + const uint64_t membufRegs[] = { + MEM_SPA_FIR, + MEM_SPA_FIR_MASK, + }; + + const uint64_t mcsRegs[] = { + MCI_FIR, + MCI_FIR_MASK, + MCI_FIR_ACT0, + MCI_FIR_ACT1, + MCS_MODE4, + }; + + const uint64_t procRegs[] = { + HOST_ATTN_PRES, + HOST_ATTN_MASK, + HOST_ATTN_CFG, + IPOLL_MASK, + IPOLL_STATUS, + PBUS_GP1, + PBUS_GP2, + }; + + // get the parent membuf + ConstTargetHandle_t membuf = getParentChip(i_mba); + + // get the parent mcs + TargetHandleList targetList; + TargetHandle_t mcs = NULL; + if(membuf) + { + getParentAffinityTargets( + targetList, + membuf, + CLASS_UNIT, + TYPE_MCS); + } + if(targetList.size() == 1) + { + mcs = targetList[0]; + } + + // get the parent proc + ConstTargetHandle_t proc = NULL; + if(mcs) + { + proc = getParentChip(mcs); + } + + const struct Entry + { + TARGETING::ConstTargetHandle_t target; + const uint64_t * begin; + const uint64_t * end; + } tables[] = { + {i_mba, mbaRegs, mbaRegs + sizeof(mbaRegs)/sizeof(*mbaRegs)}, + {membuf, + membufRegs, membufRegs + sizeof(membufRegs)/sizeof(*membufRegs)}, + {mcs, mcsRegs, mcsRegs + sizeof(mcsRegs)/sizeof(*mcsRegs)}, + {proc, procRegs, procRegs + sizeof(procRegs)/sizeof(*procRegs)}, + }; + + for(const Entry * tableIt = tables; + tableIt != tables + sizeof(tables)/sizeof(*tables); + ++tableIt) + { + if(!tableIt->target) + { + continue; + } + for(const uint64_t * regIt = tableIt->begin; + regIt != tableIt->end; + ++regIt) + { + ErrlUserDetailsLogRegister udLogRegister( + tableIt->target, + DEVICE_SCOM_ADDRESS(*regIt)); + udLogRegister.addToLog(io_log); + } + } +} + void StateMachine::processCommandTimeout(const MonitorIDs & i_monitorIDs) { MDIA_FAST("sm: processCommandTimeout"); @@ -106,6 +202,10 @@ void StateMachine::processCommandTimeout(const MonitorIDs & i_monitorIDs) MAINT_COMMAND_TIMED_OUT, *((*wit)->workItem), 0); + // collect ffdc + + addTimeoutFFDC(target, err); + err->addHwCallout(target, HWAS::SRCI_PRIORITY_HIGH, HWAS::DECONFIG, |