Skip to content

Commit d96098e

Browse files
cjcainwghoffa
authored andcommitted
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>
1 parent f4424e7 commit d96098e

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

src/usr/htmgt/htmgt.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ namespace HTMGT
6767
{
6868
if (i_startCompleted)
6969
{
70-
// Query functional OCCs
71-
l_err = OccManager::buildOccs();
70+
// Query functional OCCs (OCCs have just been started)
71+
l_err = OccManager::buildOccs(true);
7272
if (nullptr == l_err)
7373
{
7474
if (nullptr != OccManager::getMasterOcc())

src/usr/htmgt/htmgt_occ.C

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ namespace HTMGT
401401

402402

403403
// Query the functional OCCs and build OCC objects
404-
errlHndl_t OccManager::_buildOccs()
404+
errlHndl_t OccManager::_buildOccs(const bool i_occStart)
405405
{
406406
errlHndl_t err = nullptr;
407407
bool safeModeNeeded = false;
@@ -551,6 +551,19 @@ namespace HTMGT
551551
safeModeNeeded = true;
552552
}
553553

554+
if ((false == i_occStart) && (nullptr == err))
555+
{
556+
// Send poll to query state of all OCCs
557+
// and flush any errors reported by the OCCs
558+
err = sendOccPoll(true);
559+
if (err)
560+
{
561+
TMGT_ERR("_buildOccs: Poll all OCCs failed");
562+
ERRORLOG::errlCommit(err, HTMGT_COMP_ID);
563+
}
564+
_syncOccStates();
565+
}
566+
554567
if (safeModeNeeded)
555568
{
556569
// Clear OCC active sensors
@@ -1318,7 +1331,8 @@ namespace HTMGT
13181331
{
13191332
if (iv_state != currentState)
13201333
{
1321-
TMGT_INF("syncOccStates: All OCCs are in 0x%02X", currentState);
1334+
TMGT_INF("_syncOccStates: All OCCs are in 0x%02X",
1335+
currentState);
13221336
iv_state = currentState;
13231337
}
13241338
}
@@ -1373,9 +1387,9 @@ namespace HTMGT
13731387
}
13741388

13751389

1376-
errlHndl_t OccManager::buildOccs()
1390+
errlHndl_t OccManager::buildOccs(const bool i_occStart)
13771391
{
1378-
return Singleton<OccManager>::instance()._buildOccs();
1392+
return Singleton<OccManager>::instance()._buildOccs(i_occStart);
13791393
}
13801394

13811395

src/usr/htmgt/htmgt_occ.H

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,11 @@ namespace HTMGT
417417
/**
418418
* @brief Query the functional OCCs and build OCC objects
419419
*
420+
* @param[in] i_occStart true if call is being made after
421+
* OCCs have just been started.
420422
* @return NULL on success, or error handle on failure
421423
*/
422-
static errlHndl_t buildOccs();
424+
static errlHndl_t buildOccs(const bool i_occStart = false);
423425

424426

425427
/**
@@ -652,7 +654,7 @@ namespace HTMGT
652654

653655

654656
/* See buildOccs() above */
655-
errlHndl_t _buildOccs();
657+
errlHndl_t _buildOccs(const bool i_occStart = false);
656658

657659

658660
/* See getNumOccs() above */

0 commit comments

Comments
 (0)