diff options
-rw-r--r-- | src/include/usr/errl/errlmanager.H | 10 | ||||
-rw-r--r-- | src/usr/errl/errlmanager.C | 26 |
2 files changed, 32 insertions, 4 deletions
diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H index 134e3958f..06f0482e7 100644 --- a/src/include/usr/errl/errlmanager.H +++ b/src/include/usr/errl/errlmanager.H @@ -410,6 +410,16 @@ private: uint32_t readEidFromFlattened(uint32_t i_position); /** + * @brief read the Plid from the flattened error log in PNOR; + * MUST point to a non-empty slot + * + * @param[in] i_position - index into PNOR to check + * @return plid for that error log + * + */ + uint32_t readPlidFromFlattened(uint32_t i_position); + + /** * @brief set the ACK bit in the flattened error log in PNOR; * MUST point to a non-empty slot * diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C index edd5ac7ac..d6967a8e8 100644 --- a/src/usr/errl/errlmanager.C +++ b/src/usr/errl/errlmanager.C @@ -83,6 +83,7 @@ char* g_ErrlStorage; const uint32_t PNOR_ERROR_LENGTH = 4096; const uint32_t EMPTY_ERRLOG_IN_PNOR = 0xFFFFFFFF; +const uint32_t FIRST_BYTE_ERRLOG = 0xF0000000; class AtLoadFunctions { @@ -882,10 +883,15 @@ void ErrlManager::setupPnorInfo() { if (!isSlotEmpty(i)) { - uint32_t l_eid = readEidFromFlattened(i); - if (l_eid > l_maxId ) + uint32_t l_id = readEidFromFlattened(i); + // If id is not from HB (0x9XXXXXXX) grab plid instead + if ( (l_id & FIRST_BYTE_ERRLOG) != ERRLOG_PLID_BASE ) { - l_maxId = l_eid; + l_id = readPlidFromFlattened(i); + } + if (l_id > l_maxId ) + { + l_maxId = l_id; // set this - start at this 'max' slot so that our first // save will increment correctly @@ -897,7 +903,7 @@ void ErrlManager::setupPnorInfo() if (!isSlotACKed(i)) { TRACFCOMP( g_trac_errl, INFO_MRK"setupPnorInfo slot %d eid %.8X was not ACKed.", - i, l_eid); + i, l_id); setACKInFlattened(i); } // not ACKed } // not empty @@ -1092,6 +1098,18 @@ uint32_t ErrlManager::readEidFromFlattened(uint32_t i_position) return pPH->eid; } +// readPlidFromFlattened() +// i_position MUST be valid errlog (not EMPTY_ERRLOG_IN_PNOR) +uint32_t ErrlManager::readPlidFromFlattened(uint32_t i_position) +{ + const char * l_pnorAddr = iv_pnorAddr + (PNOR_ERROR_LENGTH * i_position); + const pelPrivateHeaderSection_t *pPH = + reinterpret_cast<const pelPrivateHeaderSection_t *>(l_pnorAddr); + TRACDCOMP(g_trac_errl, "readEid(%d): plid %.8x", i_position, pPH->plid); + + return pPH->plid; +} + // isSlotACKed() // i_position MUST be valid errlog (not EMPTY_ERRLOG_IN_PNOR) bool ErrlManager::isSlotACKed(uint32_t i_position) |