summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/htmgt/htmgt_cfgdata.C26
-rw-r--r--src/usr/htmgt/htmgt_occ.C56
-rw-r--r--src/usr/htmgt/htmgt_utility.H14
3 files changed, 80 insertions, 16 deletions
diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C
index 995042f4f..457aee9dd 100644
--- a/src/usr/htmgt/htmgt_cfgdata.C
+++ b/src/usr/htmgt/htmgt_cfgdata.C
@@ -212,7 +212,7 @@ namespace HTMGT
{
TMGT_ERR("sendOccConfigData: OCC%d cfg "
"format 0x%02X had bad rsp status"
- " 0x%02X for sysConfig",
+ " 0x%02X",
occInstance, format,
cmd.getRspStatus());
}
@@ -761,7 +761,15 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data,
uint64_t index = 0;
uint32_t SensorID1 = 0;
uint32_t SensorID2 = 0;
- assert(o_data != nullptr);
+ assert(o_data != nullptr);
+
+ TargetHandle_t sys = nullptr;
+ TargetHandleList nodes;
+ targetService().getTopLevelTarget(sys);
+ assert(sys != nullptr);
+ getChildAffinityTargets(nodes, sys, CLASS_ENC, TYPE_NODE);
+ assert(!nodes.empty());
+ TargetHandle_t node = nodes[0];
o_data[index++] = OCC_CFGDATA_SYS_CONFIG;
o_data[index++] = OCC_CFGDATA_SYS_CONFIG_VERSION;
@@ -781,6 +789,10 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data,
TargetHandleList cores;
getChildChiplets(cores, proc, TYPE_CORE, false);
+ TMGT_INF("getSystemConfigMessageData: systemType: 0x%02X, "
+ "procSensor: 0x%04X, %d cores, %d nodes",
+ G_opalMode, SensorID1, cores.size(), nodes.size());
+
for (uint64_t core=0; core<CFGDATA_CORES; core++)
{
SensorID1 = 0;
@@ -804,16 +816,6 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data,
index += 4;
}
-
- TargetHandle_t sys = nullptr;
- TargetHandleList nodes;
- targetService().getTopLevelTarget(sys);
- assert(sys != nullptr);
- getChildAffinityTargets(nodes, sys, CLASS_ENC, TYPE_NODE);
- assert(!nodes.empty());
- TargetHandle_t node = nodes[0];
-
-
//Backplane Callout Sensor ID
SensorID1 = UTIL::getSensorNumber(node, SENSOR_NAME_BACKPLANE_FAULT);
memcpy(&o_data[index], &SensorID1, 4);
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);
diff --git a/src/usr/htmgt/htmgt_utility.H b/src/usr/htmgt/htmgt_utility.H
index 5ef5d7457..0ffc63e7f 100644
--- a/src/usr/htmgt/htmgt_utility.H
+++ b/src/usr/htmgt/htmgt_utility.H
@@ -57,6 +57,20 @@
#define TMGT_CONSOLE(_fmt_, _args_...)
#endif
+
+// Enable this to force all HTMGT traces to console (for debug)
+#if 0
+#if defined(CONFIG_CONSOLE) && !defined(__HOSTBOOT_RUNTIME)
+#undef TMGT_INF
+#define TMGT_INF( _fmt_, _args_...) \
+ CONSOLE::displayf( HTMGT_COMP_NAME, _fmt_, ##_args_ )
+#undef TMGT_ERR
+#define TMGT_ERR( _fmt_, _args_...) \
+ CONSOLE::displayf( HTMGT_COMP_NAME, "E>" _fmt_, ##_args_ )
+#endif
+#endif
+
+
inline uint16_t UINT16_GET(const uint8_t * i_ptr)
{
return (*i_ptr) << 8 | *(i_ptr+1);
OpenPOWER on IntegriCloud