diff options
author | Chris Cain <cjcain@us.ibm.com> | 2015-01-30 12:10:28 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-09 17:58:57 -0600 |
commit | 42c08eb3adaef09645324fb96358c80a18a4b96a (patch) | |
tree | c092bfbbeb6ffabcfbd87f1badc009aadc87a010 /src/usr/htmgt/htmgt_occ.H | |
parent | eb5642b95b3ba4e2968b727ba616ad6da24ff057 (diff) | |
download | talos-hostboot-42c08eb3adaef09645324fb96358c80a18a4b96a.tar.gz talos-hostboot-42c08eb3adaef09645324fb96358c80a18a4b96a.zip |
OCC Poll Validation and startup checkpoint monitoring
Change-Id: I2f6e6d31ccd10bb6add9d608363db3e5048975a8
RTC: 117248
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15483
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/htmgt/htmgt_occ.H')
-rw-r--r-- | src/usr/htmgt/htmgt_occ.H | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/usr/htmgt/htmgt_occ.H b/src/usr/htmgt/htmgt_occ.H index 398cf928e..72834346d 100644 --- a/src/usr/htmgt/htmgt_occ.H +++ b/src/usr/htmgt/htmgt_occ.H @@ -176,6 +176,26 @@ namespace HTMGT occStateId getState() { return iv_state; }; + /** + * @brief Return OCCs present bits + * + * @return bitmask representing this OCC position + */ + uint8_t getPresentBits() { return iv_occsPresent; }; + + + /** + * @brief Update OCCs present bits in the master OCC + * + * @note Should only be called for Maseter OCC. This is + * used to ensure the master can see all Slave OCCs + * and that no two slaves have same chip id. + * + * @param[in] i_slavePresent Bitmask for slave OCC to add + */ + void updateOccPresentBits(uint8_t i_slavePresent); + + protected: // Instance number of this OCC: 0 = first physical OCC uint8_t iv_instance; @@ -201,6 +221,8 @@ namespace HTMGT uint8_t iv_lastPollResponse[OCC_POLL_DATA_MIN_SIZE]; // true if lastPollResponse contains valid data bool iv_lastPollValid; + // expected occsPresent byte in POLL response + uint8_t iv_occsPresent; private: @@ -304,6 +326,16 @@ namespace HTMGT + /** + * @brief Wait for all of the OCCs to reach their checkpoint + * state. That indicates that the OCCs are ready to + * communicate and start handling commands. This + * function will wait up to 10 seconds for all OCCs + * before returning to the caller. + */ + void waitForOccCheckpoint(); + + private: Occ * iv_occMaster; std::vector<Occ*> iv_occArray; @@ -354,6 +386,8 @@ namespace HTMGT /* See setOccState() above */ errlHndl_t _setOccState(const occStateId i_state); + void _waitForOccCheckpoint(); + }; typedef Singleton<OccManager> occMgr; |