From 75b83336b121f59c1efee3c84ddd12f3bee4ce85 Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Mon, 10 Oct 2016 16:04:05 -0500 Subject: MDIA: Fix addTimeoutFFDC Change-Id: Ic96e9c58a17fd15b26ca6ddc80cfe771200418fd Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30965 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Zane C. Shelley --- src/usr/diag/mdia/mdiasm.C | 156 +++++++++++++++++++++++++++++---------------- 1 file changed, 101 insertions(+), 55 deletions(-) (limited to 'src/usr/diag/mdia/mdiasm.C') diff --git a/src/usr/diag/mdia/mdiasm.C b/src/usr/diag/mdia/mdiasm.C index d318421be..28e3ccc7d 100644 --- a/src/usr/diag/mdia/mdiasm.C +++ b/src/usr/diag/mdia/mdiasm.C @@ -62,7 +62,7 @@ void StateMachine::running(bool & o_running) mutex_unlock(&iv_mutex); } -void addTimeoutFFDC(TargetHandle_t i_mba, errlHndl_t & io_log) +void addTimeoutFFDC(TargetHandle_t i_target, errlHndl_t & io_log) { const uint64_t mbaRegs[] = { MBA01_SPA, @@ -87,75 +87,121 @@ void addTimeoutFFDC(TargetHandle_t i_mba, errlHndl_t & io_log) MCS_MODE4, }; + const uint64_t mcbRegs[] = { + MCBIST_FIR, + MCBIST_FIR_MASK, + MCBIST_FIR_ACT0, + MCBIST_FIR_ACT1, + }; + const uint64_t procRegs[] = { - HOST_ATTN_PRES, - HOST_ATTN_MASK, - HOST_ATTN_CFG, IPOLL_MASK, IPOLL_STATUS, - PBUS_GP1, - PBUS_GP2, GLOBAL_CS_FIR, GLOBAL_RE_FIR, - GLOBAL_SPA, + GLOBAL_UCS_FIR, + GLOBAL_HA_FIR, + MC0_CHIPLET_HA_FIR, + MC0_CHIPLET_HA_FIR_MASK, + MC1_CHIPLET_HA_FIR, + MC1_CHIPLET_HA_FIR_MASK , }; - // 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) + // target type + if ( TYPE_MBA == i_target->getAttr() ) { - mcs = targetList[0]; - } + // get the parent membuf + ConstTargetHandle_t membuf = getParentChip(i_target); - // get the parent proc - ConstTargetHandle_t proc = NULL; - if(mcs) - { - proc = getParentChip(mcs); - } + // 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]; + } - 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)}, - }; + // get the parent proc + ConstTargetHandle_t proc = NULL; + if(mcs) + { + proc = getParentChip(mcs); + } - for(const Entry * tableIt = tables; - tableIt != tables + sizeof(tables)/sizeof(*tables); - ++tableIt) - { - if(!tableIt->target) + const struct Entry { - continue; + TARGETING::ConstTargetHandle_t target; + const uint64_t * begin; + const uint64_t * end; + } tables[] = { + {i_target, 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); + } } + } + else if ( TYPE_MCBIST == i_target->getAttr() ) + { + // get the parent proc + ConstTargetHandle_t proc = getParentChip(i_target); - for(const uint64_t * regIt = tableIt->begin; - regIt != tableIt->end; - ++regIt) + const struct Entry { - ErrlUserDetailsLogRegister udLogRegister( - tableIt->target, - DEVICE_SCOM_ADDRESS(*regIt)); - udLogRegister.addToLog(io_log); + TARGETING::ConstTargetHandle_t target; + const uint64_t * begin; + const uint64_t * end; + } tables[] = { + {i_target, mcbRegs, mcbRegs + sizeof(mcbRegs)/sizeof(*mcbRegs)}, + {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); + } } } -- cgit v1.2.1