summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt/occError.C
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2017-08-28 09:50:55 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-22 09:45:44 -0400
commitc17f8e44c48c17c7ea9f049011e3151eede8d9aa (patch)
treef1e9f56a6b578f0cec5d1b319ce7b48dd7707bca /src/usr/htmgt/occError.C
parent72cf61348b47dfa2be0de8467ce4cceb113d3a62 (diff)
downloadtalos-hostboot-c17f8e44c48c17c7ea9f049011e3151eede8d9aa.tar.gz
talos-hostboot-c17f8e44c48c17c7ea9f049011e3151eede8d9aa.zip
Support for detecting a WOF requested reset
Change-Id: I385b20538230b152828075f695e8352f969d5cf2 RTC:174543 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45986 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: Prachi Gupta <pragupta@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/occError.C')
-rw-r--r--src/usr/htmgt/occError.C67
1 files changed, 43 insertions, 24 deletions
diff --git a/src/usr/htmgt/occError.C b/src/usr/htmgt/occError.C
index 70abd1c71..47b0eb395 100644
--- a/src/usr/htmgt/occError.C
+++ b/src/usr/htmgt/occError.C
@@ -89,7 +89,7 @@ namespace HTMGT
const uint32_t i_address,
const uint16_t i_length)
{
- errlHndl_t l_errlHndl = NULL;
+ errlHndl_t l_errlHndl = nullptr;
// Read data from SRAM (length must be multiple of 8 bytes)
const uint16_t l_length = (i_length) & 0xFFF8;
@@ -101,7 +101,7 @@ namespace HTMGT
reinterpret_cast<uint64_t*>(l_buffer.pointer()),
l_length );
#endif
- if (NULL == l_errlHndl)
+ if (nullptr == l_errlHndl)
{
const occErrlEntry_t * l_occElog= reinterpret_cast<occErrlEntry_t*>
@@ -129,6 +129,17 @@ namespace HTMGT
// Process Actions
bool l_occReset = false;
elogProcessActions(l_occElog->actions, l_occReset, severity);
+
+ // Check if we need a WOF requested reset
+ if(iv_needsWofReset == true)
+ {
+ if( iv_wofResetCount < WOF_RESET_COUNT_THRESHOLD )
+ {
+ // Not at WOF reset threshold yet. Set sev to INFO
+ severity = ERRORLOG::ERRL_SEV_INFORMATIONAL;
+ }
+ }
+
if (l_occReset == true)
{
iv_needsReset = true;
@@ -209,7 +220,7 @@ namespace HTMGT
}
// Any bad fru data found ?
- errlHndl_t err2 = NULL;
+ errlHndl_t err2 = nullptr;
if (l_bad_fru_data == true)
{
TMGT_BIN("Callout Data", &l_occElog->callout[0],
@@ -286,7 +297,7 @@ namespace HTMGT
OccCmd l_cmd(this, OCC_CMD_CLEAR_ERROR_LOG,
sizeof(l_cmdData), l_cmdData);
l_errlHndl = l_cmd.sendOccCmd();
- if (l_errlHndl != NULL)
+ if (l_errlHndl != nullptr)
{
TMGT_ERR("occProcessElog: Failed to clear elog id %d to"
" OCC%d (rc=0x%04X)",
@@ -321,7 +332,7 @@ namespace HTMGT
const uint32_t sensor = (uint32_t)i_callout.calloutValue;
TARGETING::Target * target =
TARGETING::UTIL::getSensorTarget(sensor);
- if (NULL != target)
+ if (nullptr != target)
{
io_errlHndl->addHwCallout(target, i_priority,
HWAS::NO_DECONFIG,
@@ -392,34 +403,42 @@ namespace HTMGT
bool & o_occReset,
ERRORLOG::errlSeverity_t & o_errlSeverity)
{
- if (i_actions & TMGT_ERRL_ACTIONS_RESET_REQUIRED)
+ if (i_actions & TMGT_ERRL_ACTIONS_WOF_RESET_REQUIRED)
{
o_occReset = true;
- iv_failed = true;
- iv_resetReason = OCC_RESET_REASON_OCC_REQUEST;
+ iv_failed = false;
+ iv_needsWofReset = true;
+ iv_resetReason = OCC_RESET_REASON_WOF_REQUEST;
- TMGT_INF("elogProcessActions: OCC%d requested reset",
- iv_instance);
+ TMGT_INF("elogProcessActions: OCC%d requested a WOF reset",
+ iv_instance);
}
-
- if (i_actions & TMGT_ERRL_ACTIONS_SAFE_MODE_REQUIRED)
+ else
{
- o_occReset = true;
- iv_failed = true;
- iv_resetReason = OCC_RESET_REASON_CRIT_FAILURE;
- iv_resetCount = OCC_RESET_COUNT_THRESHOLD;
+ if (i_actions & TMGT_ERRL_ACTIONS_RESET_REQUIRED)
+ {
+ o_occReset = true;
+ iv_failed = true;
+ iv_resetReason = OCC_RESET_REASON_OCC_REQUEST;
- TMGT_INF("elogProcessActions: OCC%d requested safe mode",
- iv_instance);
- TMGT_CONSOLE("OCC%d requested system enter safe mode",
+ TMGT_INF("elogProcessActions: OCC%d requested reset",
iv_instance);
+ }
+
+ if (i_actions & TMGT_ERRL_ACTIONS_SAFE_MODE_REQUIRED)
+ {
+ o_occReset = true;
+ iv_failed = true;
+ iv_resetReason = OCC_RESET_REASON_CRIT_FAILURE;
+ iv_resetCount = OCC_RESET_COUNT_THRESHOLD;
+
+ TMGT_INF("elogProcessActions: OCC%d requested safe mode",
+ iv_instance);
+ TMGT_CONSOLE("OCC%d requested system enter safe mode",
+ iv_instance);
+ }
}
} // end Occ::elogProcessActions()
-
-
} // end namespace
-
-
-
OpenPOWER on IntegriCloud