summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-09-27 06:11:21 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-07 10:25:53 -0500
commit65ef164ec915c3e9c2f02d8450a12ce997e588a1 (patch)
treeebced7df40c969db1ae166165c7cdae0b5e67e8d /src
parentb8d7070d329b3a6577ae6c11ae7b1afb27db7a22 (diff)
downloadblackbird-hostboot-65ef164ec915c3e9c2f02d8450a12ce997e588a1.tar.gz
blackbird-hostboot-65ef164ec915c3e9c2f02d8450a12ce997e588a1.zip
set deconfigure and gard bits in errlog as appropriate.
Change-Id: I1a39ee435df10fcc16dda165e5fc7cbfda35d724 CQ: SW226070 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6374 Reviewed-by: Donald E. Dahle <dedahle@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/errl/errlentry.H20
-rw-r--r--src/include/usr/errl/errlsrc.H2
-rw-r--r--src/usr/errl/errlentry.C8
-rw-r--r--src/usr/errl/errlsrc.C15
-rw-r--r--src/usr/errl/test/errltest.H30
5 files changed, 73 insertions, 2 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 7da534152..d90f358a6 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -331,6 +331,15 @@ public:
void addUserData2( const uint64_t i_data );
/**
+ * @brief set Deconfigure and GARD bits in Hex Word 5
+ *
+ * @return void
+ *
+ */
+ void setDeconfigBit();
+ void setGardBit();
+
+ /**
* @brief Return iv_Src user data words.
*
* @return data1 word from SRC
@@ -695,6 +704,17 @@ inline void ErrlEntry::addUserData2( const uint64_t i_data )
{
iv_Src.iv_user2 = i_data;
}
+
+////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+inline void ErrlEntry::setDeconfigBit()
+{
+ iv_Src.iv_deconfig = true;
+}
+inline void ErrlEntry::setGardBit()
+{
+ iv_Src.iv_gard = true;
+}
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
inline uint64_t ErrlEntry::getUserData1() const
diff --git a/src/include/usr/errl/errlsrc.H b/src/include/usr/errl/errlsrc.H
index 66d907b84..42c75158b 100644
--- a/src/include/usr/errl/errlsrc.H
+++ b/src/include/usr/errl/errlsrc.H
@@ -138,6 +138,8 @@ private:
epubSubSystem_t iv_ssid : 8 ; // subsystem type, the ?? in SRC xx??xxxx
uint64_t iv_user1; // user data 1
uint64_t iv_user2; // user data 2
+ bool iv_deconfig; // true if there is a deconfigure callout
+ bool iv_gard; // true if there is a gard callout
};
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index ee23e4097..8d1084f76 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -417,6 +417,14 @@ void ErrlEntry::addHwCallout(const TARGETING::Target *i_target,
ErrlUserDetailsCallout(&ep, size1,
i_priority, i_deconfigState, i_gardErrorType).addToLog(this);
}
+ if (i_gardErrorType != GARD_NULL)
+ {
+ setGardBit();
+ }
+ if (i_deconfigState != NO_DECONFIG)
+ {
+ setDeconfigBit();
+ }
} // addHwCallout
diff --git a/src/usr/errl/errlsrc.C b/src/usr/errl/errlsrc.C
index 11e46d92b..69d29e18a 100644
--- a/src/usr/errl/errlsrc.C
+++ b/src/usr/errl/errlsrc.C
@@ -66,10 +66,11 @@ ErrlSrc::ErrlSrc( srcType_t i_srcType,
iv_reasonCode( i_reasonCode ),
iv_ssid( EPUB_FIRMWARE_SUBSYS ),
iv_user1( i_user1 ),
- iv_user2( i_user2 )
+ iv_user2( i_user2 ),
+ iv_deconfig(false),
+ iv_gard(false)
{
-
}
@@ -138,6 +139,16 @@ uint64_t ErrlSrc::flatten( void * o_pBuffer, const uint64_t i_cbBuffer )
// Stash the Hostboot module id into hex word 3
psrc->moduleId = iv_modId;
+ // set deconfigure and/or gard bits
+ if (iv_deconfig)
+ {
+ psrc->word5 |= 0x02000000; // deconfigure - bit 6
+ }
+ if (iv_gard)
+ {
+ psrc->word5 |= 0x01000000; // GARD - bit 7
+ }
+
// Stash the Hostboot long long words into the hexwords of the SRC.
psrc->word6 = iv_user1; // spans 6-7
psrc->word8 = iv_user2; // spans 8-9
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 3d8a247db..08163abee 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -420,27 +420,57 @@ public:
deconfigCount++;
gardCount++;
+ errlCommit(errl, CXXTEST_COMP_ID);
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ERRL_TEST_MOD_ID,
+ ERRL_TEST_REASON_CODE);
+
errl->addHwCallout(pTarget,
HWAS::SRCI_PRIORITY_MED,
HWAS::DELAYED_DECONFIG,
HWAS::GARD_NULL);
+ errlCommit(errl, CXXTEST_COMP_ID);
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ERRL_TEST_MOD_ID,
+ ERRL_TEST_REASON_CODE);
+
errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
HWAS::SRCI_PRIORITY_LOW,
HWAS::NO_DECONFIG,
HWAS::GARD_PHYP);
gardCount++;
+ errlCommit(errl, CXXTEST_COMP_ID);
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ERRL_TEST_MOD_ID,
+ ERRL_TEST_REASON_CODE);
+
errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL,
HWAS::SRCI_PRIORITY_MED,
HWAS::DELAYED_DECONFIG,
HWAS::GARD_NULL);
deconfigCount++;
+ errlCommit(errl, CXXTEST_COMP_ID);
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ERRL_TEST_MOD_ID,
+ ERRL_TEST_REASON_CODE);
+
errl->addProcedureCallout(
HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR,
HWAS::SRCI_PRIORITY_HIGH);
+ errlCommit(errl, CXXTEST_COMP_ID);
+ errl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ ERRL_TEST_MOD_ID,
+ ERRL_TEST_REASON_CODE);
+
errl->addClockCallout(
pExList[0],
HWAS::TODCLK_TYPE,
OpenPOWER on IntegriCloud