summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2017-05-18 18:20:02 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-06-01 13:31:37 -0400
commitd96098eaf93f873dc859dacb1b91eb95f1c8877a (patch)
tree86d1bc83498aa9ff2949cb7ad46ad884a430686c /src/usr/htmgt
parentf4424e7fdbdcd0c4eb6549e8013bec7993e2197e (diff)
downloadtalos-hostboot-d96098eaf93f873dc859dacb1b91eb95f1c8877a.tar.gz
talos-hostboot-d96098eaf93f873dc859dacb1b91eb95f1c8877a.zip
Update HTMGT state when called from host
HTMGT state needs to get initialized the first time the host makes a call into HTMGT. Change-Id: Ifb4524f793abe6310d4f3aa18895549b7bcf9da0 RTC: 174507 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40737 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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> Reviewed-by: Sheldon R. Bailey <baileysh@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt')
-rw-r--r--src/usr/htmgt/htmgt.C4
-rw-r--r--src/usr/htmgt/htmgt_occ.C22
-rw-r--r--src/usr/htmgt/htmgt_occ.H6
3 files changed, 24 insertions, 8 deletions
diff --git a/src/usr/htmgt/htmgt.C b/src/usr/htmgt/htmgt.C
index d44f1dec3..56759c39f 100644
--- a/src/usr/htmgt/htmgt.C
+++ b/src/usr/htmgt/htmgt.C
@@ -67,8 +67,8 @@ namespace HTMGT
{
if (i_startCompleted)
{
- // Query functional OCCs
- l_err = OccManager::buildOccs();
+ // Query functional OCCs (OCCs have just been started)
+ l_err = OccManager::buildOccs(true);
if (nullptr == l_err)
{
if (nullptr != OccManager::getMasterOcc())
diff --git a/src/usr/htmgt/htmgt_occ.C b/src/usr/htmgt/htmgt_occ.C
index 207697be7..0d47926b6 100644
--- a/src/usr/htmgt/htmgt_occ.C
+++ b/src/usr/htmgt/htmgt_occ.C
@@ -401,7 +401,7 @@ namespace HTMGT
// Query the functional OCCs and build OCC objects
- errlHndl_t OccManager::_buildOccs()
+ errlHndl_t OccManager::_buildOccs(const bool i_occStart)
{
errlHndl_t err = nullptr;
bool safeModeNeeded = false;
@@ -551,6 +551,19 @@ namespace HTMGT
safeModeNeeded = true;
}
+ if ((false == i_occStart) && (nullptr == err))
+ {
+ // Send poll to query state of all OCCs
+ // and flush any errors reported by the OCCs
+ err = sendOccPoll(true);
+ if (err)
+ {
+ TMGT_ERR("_buildOccs: Poll all OCCs failed");
+ ERRORLOG::errlCommit(err, HTMGT_COMP_ID);
+ }
+ _syncOccStates();
+ }
+
if (safeModeNeeded)
{
// Clear OCC active sensors
@@ -1318,7 +1331,8 @@ namespace HTMGT
{
if (iv_state != currentState)
{
- TMGT_INF("syncOccStates: All OCCs are in 0x%02X", currentState);
+ TMGT_INF("_syncOccStates: All OCCs are in 0x%02X",
+ currentState);
iv_state = currentState;
}
}
@@ -1373,9 +1387,9 @@ namespace HTMGT
}
- errlHndl_t OccManager::buildOccs()
+ errlHndl_t OccManager::buildOccs(const bool i_occStart)
{
- return Singleton<OccManager>::instance()._buildOccs();
+ return Singleton<OccManager>::instance()._buildOccs(i_occStart);
}
diff --git a/src/usr/htmgt/htmgt_occ.H b/src/usr/htmgt/htmgt_occ.H
index c1e45d641..1c33cbbe4 100644
--- a/src/usr/htmgt/htmgt_occ.H
+++ b/src/usr/htmgt/htmgt_occ.H
@@ -417,9 +417,11 @@ namespace HTMGT
/**
* @brief Query the functional OCCs and build OCC objects
*
+ * @param[in] i_occStart true if call is being made after
+ * OCCs have just been started.
* @return NULL on success, or error handle on failure
*/
- static errlHndl_t buildOccs();
+ static errlHndl_t buildOccs(const bool i_occStart = false);
/**
@@ -652,7 +654,7 @@ namespace HTMGT
/* See buildOccs() above */
- errlHndl_t _buildOccs();
+ errlHndl_t _buildOccs(const bool i_occStart = false);
/* See getNumOccs() above */
OpenPOWER on IntegriCloud