diff options
author | Chris Cain <cjcain@us.ibm.com> | 2017-12-04 10:42:39 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-12-12 17:26:25 -0500 |
commit | a1f431ee3a68d366851b276c5a022a769527a26c (patch) | |
tree | 83e20492b7f77384f97a2fc74285ddaaa026f472 /src/usr/htmgt/htmgt_occ.C | |
parent | 526f5106cc176d84dbc48a23acda0ce2ada52f54 (diff) | |
download | talos-hostboot-a1f431ee3a68d366851b276c5a022a769527a26c.tar.gz talos-hostboot-a1f431ee3a68d366851b276c5a022a769527a26c.zip |
HTMGT: Ensure processor callout added when going to safe mode
Change-Id: Ib5e1035121ed574a97416d59498b39f997131fd6
CQ: SW398232
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50597
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sheldon R. Bailey <baileysh@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt_occ.C')
-rw-r--r-- | src/usr/htmgt/htmgt_occ.C | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/src/usr/htmgt/htmgt_occ.C b/src/usr/htmgt/htmgt_occ.C index f7ae48a78..686a8338b 100644 --- a/src/usr/htmgt/htmgt_occ.C +++ b/src/usr/htmgt/htmgt_occ.C @@ -1022,6 +1022,51 @@ namespace HTMGT HTMGT_RC_OCC_CRIT_FAILURE, 0, cv_safeReturnCode, 0, cv_safeOccInstance, ERRORLOG::ERRL_SEV_UNRECOVERABLE); + + // Check if OCC already logged reason for safe mode + // (add proc callout if non-OCC safe mode reason or + // the OCC hit an exception) + TMGT_ERR("_resetOccs: Safe Mode (RC: 0x%04X OCC%d)", + cv_safeReturnCode, cv_safeOccInstance); + if (((cv_safeReturnCode & OCCC_COMP_ID) != OCCC_COMP_ID) || + ((cv_safeReturnCode & 0xE0) == 0xE0)) + { + // Add processor callout + TARGETING::ConstTargetHandle_t procTarget = nullptr; + Occ *occPtr = _getOcc(cv_safeOccInstance); + if (occPtr != nullptr) + { + procTarget = + TARGETING::getParentChip(occPtr->getTarget()); + } + else + { + TMGT_ERR("_resetOCCs: Unable to determine target, " + "using first proc"); + // Get all functional processors + TARGETING::TargetHandleList pProcs; + TARGETING::getChipResources(pProcs, + TARGETING::TYPE_PROC, + TARGETING::UTIL_FILTER_FUNCTIONAL); + procTarget = pProcs[0]; + } + if (nullptr != procTarget) + { + const unsigned long huid = + procTarget->getAttr<TARGETING::ATTR_HUID>(); + TMGT_ERR("_resetOCCs: Adding processor callout " + "(HUID=0x%0lX)", huid); + err->addHwCallout(procTarget, + HWAS::SRCI_PRIORITY_MED, + HWAS::NO_DECONFIG, + HWAS::GARD_NULL); + } + } + else + { + TMGT_INF("_resetOccs: OCC should have already logged " + "an error for safe mode"); + } } // Any error at this point means OCCs were not reactivated @@ -1302,12 +1347,13 @@ namespace HTMGT // First add HTMGT specific data o_data[index++] = _getNumOccs(); - o_data[index++] = (nullptr!=iv_occMaster)?iv_occMaster->getInstance():0xFF; + o_data[index++] = + (nullptr!=iv_occMaster)?iv_occMaster->getInstance():0xFF; o_data[index++] = iv_state; o_data[index++] = iv_targetState; o_data[index++] = iv_sysResetCount; o_data[index++] = iv_normalPstateTables ? 0 : 1; - index += 1; // reserved for expansion + o_data[index++] = 0x00; // STATUS VERSION (for future expansion) o_data[index++] = safeMode; UINT32_PUT(&o_data[index], cv_safeReturnCode); index += 4; @@ -1322,11 +1368,13 @@ namespace HTMGT o_data[index++] = occ->getRole(); o_data[index++] = occ->iv_masterCapable; o_data[index++] = occ->iv_commEstablished; - index += 3; // reserved for expansion + o_data[index++] = 0; // reserved for expansion + o_data[index++] = 0; // reserved for expansion + o_data[index++] = 0; // reserved for expansion o_data[index++] = occ->iv_failed; o_data[index++] = occ->needsReset(); o_data[index++] = occ->iv_resetReason; - o_data[index++] = occ->iv_resetCount; + o_data[index++] = (occ->iv_wofResetCount<<4)|occ->iv_resetCount; if (occ->iv_lastPollValid) { memcpy(&o_data[index], occ->iv_lastPollResponse, 4); |