summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt/htmgt_occ.H
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/htmgt_occ.H
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/htmgt_occ.H')
-rw-r--r--src/usr/htmgt/htmgt_occ.H36
1 files changed, 31 insertions, 5 deletions
diff --git a/src/usr/htmgt/htmgt_occ.H b/src/usr/htmgt/htmgt_occ.H
index 80df52ab7..fb439672d 100644
--- a/src/usr/htmgt/htmgt_occ.H
+++ b/src/usr/htmgt/htmgt_occ.H
@@ -72,6 +72,7 @@ namespace HTMGT
enum
{
OCC_RESET_COUNT_THRESHOLD = 3,
+ WOF_RESET_COUNT_THRESHOLD = 3,
};
enum occResetReason
@@ -83,6 +84,7 @@ namespace HTMGT
OCC_RESET_REASON_POWER_FAULT = 0x04,
OCC_RESET_REASON_DIFF_OCC = 0x05,
OCC_RESET_REASON_OCC_REQUEST = 0x06,
+ OCC_RESET_REASON_WOF_REQUEST = 0x07,
};
// OCC Callout Structure
@@ -215,12 +217,14 @@ namespace HTMGT
*/
occStateId getState() { return iv_state; };
+
/**
* @brief Prepare this OCC for reset
* @return return true if at threshold otherwise false
*/
bool resetPrep();
+
/**
* @brief Set IPMI OCC sensor state
* @param i_activate: true - set active
@@ -256,6 +260,22 @@ namespace HTMGT
/**
+ * @brief Determine if OCC needs to be reset due to WOF
+ *
+ * @return true if this OCC needs to be reset
+ */
+ bool needsWofReset() { return iv_needsWofReset; }
+
+
+ /**
+ * @brief Returns the number of times a WOF reset has occured
+ *
+ * @return Number of WOF resets for this OCC
+ */
+ uint8_t wofResetCount() { return iv_wofResetCount; }
+
+
+ /**
* @brief Return OCCs present bits
*
* @return bitmask representing this OCC position
@@ -282,6 +302,7 @@ namespace HTMGT
*/
void collectCheckpointScomData(errlHndl_t i_err);
+
/**
* @brief Add OCC trace buffers to given error log (ERR, IMP, INF)
*
@@ -290,8 +311,6 @@ namespace HTMGT
void addOccTrace( errlHndl_t & io_errl );
-
-
private: // functions
/**
@@ -303,6 +322,7 @@ namespace HTMGT
void pollRspHandler(const uint8_t * i_pollResponse,
const uint16_t i_pollResponseSize);
+
/**
* @brief Collect, Commit and Clear error log from the OCC
*
@@ -314,6 +334,7 @@ namespace HTMGT
const uint32_t i_address,
const uint16_t i_length);
+
/**
* @brief Determine what actions are required for elog
*
@@ -325,6 +346,7 @@ namespace HTMGT
bool & o_occReset,
ERRORLOG::errlSeverity_t & o_errlSeverity);
+
/**
* @brief Add specified callout to the error log
*
@@ -339,11 +361,13 @@ namespace HTMGT
const occErrlCallout_t i_callout,
uint8_t & io_callout_num);
+
/**
* @brief Update the GPU presence sensors in the system
*/
void updateGpuPresence();
+
protected:
// Instance number of this OCC: 0 = first physical OCC
uint8_t iv_instance;
@@ -357,6 +381,10 @@ namespace HTMGT
bool iv_commEstablished;
// true if OCC needs to be reset
bool iv_needsReset;
+ // true if OCC needs to be reset due to WOF
+ bool iv_needsWofReset;
+ // WOF reset count
+ uint8_t iv_wofResetCount;
// true if OCC failed
bool iv_failed;
// Sequence number of last/current OCC command
@@ -390,7 +418,6 @@ namespace HTMGT
uint8_t iv_resetCount;
// Version of data stored (0 = not written)
uint8_t iv_version;
-
};
@@ -565,7 +592,6 @@ namespace HTMGT
*/
static bool occNeedsReset();
-
/**
* @brief Collect FFDC debug data for HTMGT and OCCs
*
@@ -645,7 +671,7 @@ namespace HTMGT
occList_t iv_occArray;
occStateId iv_state;
occStateId iv_targetState;
- uint8_t iv_resetCount;
+ uint8_t iv_sysResetCount;
bool iv_normalPstateTables;
OpenPOWER on IntegriCloud