summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2014-03-18 14:05:27 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-20 14:12:25 -0500
commitde48dcc5cc2640f42fa18a76666aa70ff7933562 (patch)
tree0761d1d5b318387fe58261369c513504fcfd65c2
parentf146335272226da8ec3cfc9f40e5ab2c9a5d3fb2 (diff)
downloadtalos-hostboot-de48dcc5cc2640f42fa18a76666aa70ff7933562.tar.gz
talos-hostboot-de48dcc5cc2640f42fa18a76666aa70ff7933562.zip
Look at eid and plid when going through errlogs
HB needs to look for the case where a special REF code is provided by the FSP and only look at its PLID Change-Id: I299bf6056bcfaca37bc60449a745a9bbeaa754c2 RTC: 99598 CQ: SW251889 Backport: release-fips810 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9703 Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/errl/errlmanager.H10
-rw-r--r--src/usr/errl/errlmanager.C26
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)
OpenPOWER on IntegriCloud