diff options
| author | Elizabeth K. Liner <eliner@us.ibm.com> | 2017-03-23 12:56:51 -0400 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-03-23 15:24:17 -0400 |
| commit | 08fd06fdc5c3e997ebc1e978cc3b42ad7082664c (patch) | |
| tree | 10571f3669b674a4abbfc268bf9ccc162e5b74b8 /src/usr/errl | |
| parent | ae077907670f4c5442a12f20ee2f694500b4b757 (diff) | |
| download | talos-hostboot-08fd06fdc5c3e997ebc1e978cc3b42ad7082664c.tar.gz talos-hostboot-08fd06fdc5c3e997ebc1e978cc3b42ad7082664c.zip | |
Revert "Adding in support for PHYP SRC and all 9 words"
This reverts commit a0c2aa6132a0b49975327f5aa9238d1d3e2b750b.
Change-Id: I6cfe36de59e6981ff23aa7d9aea1474f14729d2d
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38362
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
| -rw-r--r-- | src/usr/errl/errlentry.C | 24 | ||||
| -rw-r--r-- | src/usr/errl/errlsrc.C | 99 | ||||
| -rw-r--r-- | src/usr/errl/runtime/test/rt_errltest.H | 6 | ||||
| -rw-r--r-- | src/usr/errl/test/errltest.H | 6 |
4 files changed, 33 insertions, 102 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index d11c40608..e05691874 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -192,9 +192,11 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, const uint64_t i_user1, const uint64_t i_user2, const bool i_hbSwError ) : - iv_Src( HBT_ERR_INFO, i_modId, i_reasonCode, i_user1, i_user2 ), iv_Private( static_cast<compId_t>(i_reasonCode & 0xFF00)), iv_User( i_sev ), + // The SRC_ERR_INFO becomes part of the SRC; example, B1 in SRC B180xxxx + // iv_Src assigns the epubSubSystem_t; example, 80 in SRC B180xxxx + iv_Src( SRC_ERR_INFO, i_modId, i_reasonCode, i_user1, i_user2 ), iv_termState(TERM_STATE_UNKNOWN), iv_sevFinal(false), iv_skipShowingLog(true) @@ -216,26 +218,6 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, - uint32_t i_srcWords[9] ): - iv_Src( i_srcWords ), - iv_Private( static_cast<compId_t>((iv_Src.iv_reasonCode) & 0xFF00)), - iv_User( i_sev ), - iv_termState(TERM_STATE_UNKNOWN), - iv_sevFinal(false), - iv_skipShowingLog(true) -{ - #ifdef CONFIG_ERRL_ENTRY_TRACE - TRACFCOMP( g_trac_errl, ERR_MRK"Error created : Source Words=[0]:%.4X,[1]:%.4X,[2]:%.4X,[3]:%.4X,[4]:%.4X,[5]:%.4X,[6]:%.4X,[7]:%.4X,[8]:%.4X",i_srcWords[0],i_srcWords[1],i_srcWords[2],i_srcWords[3],i_srcWords[4],i_srcWords[5],i_srcWords[6],i_srcWords[7],i_srcWords[8]); - #else - TRACDCOMP( g_trac_errl, ERR_MRK"Error created : Source Words=[0]:%.4X,[1]:%.4X,[2]:%.4X,[3]:%.4X,[4]:%.4X,[5]:%.4X,[6]:%.4X,[7]:%.4X,[8]:%.4X",i_srcWords[0],i_srcWords[1],i_srcWords[2],i_srcWords[3],i_srcWords[4],i_srcWords[5],i_srcWords[6],i_srcWords[7],i_srcWords[8]); - #endif - // Collect the Backtrace and add it to the error log - iv_pBackTrace = new ErrlUserDetailsBackTrace(); -} - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// ErrlEntry::~ErrlEntry() { // Free memory of all sections diff --git a/src/usr/errl/errlsrc.C b/src/usr/errl/errlsrc.C index 1c16691a9..45dd42d9c 100644 --- a/src/usr/errl/errlsrc.C +++ b/src/usr/errl/errlsrc.C @@ -56,7 +56,7 @@ ErrlSrc::ErrlSrc( srcType_t i_srcType, uint8_t i_modId, uint16_t i_reasonCode, uint64_t i_user1, - uint64_t i_user2) : + uint64_t i_user2 ) : ErrlSctn( ERRL_SID_PRIMARY_SRC, ErrlSrc::SLEN, @@ -70,28 +70,11 @@ ErrlSrc::ErrlSrc( srcType_t i_srcType, iv_user1( i_user1 ), iv_user2( i_user2 ), iv_deconfig(false), - iv_gard(false), - iv_fromSRCWords(false) + iv_gard(false) { } -ErrlSrc::ErrlSrc( uint32_t i_srcWords[9]) : - ErrlSctn( ERRL_SID_PRIMARY_SRC, - ErrlSrc::SLEN, - ErrlSrc::VER, - ErrlSrc::SST, - 0 ), // Component ID zero for now. - iv_srcType( (srcType_t) ((i_srcWords[0] & 0xFF000000) >> 24) ), - iv_ssid( EPUB_FIRMWARE_SUBSYS), - iv_fromSRCWords(true) -{ - for(int i=0; i<9; i++) - { - iv_srcWords[i] = i_srcWords[i]; - } - formatSRCWords(); -} //**************************************************************************** // @@ -116,11 +99,6 @@ uint64_t ErrlSrc::flatten( void * o_pBuffer, const uint64_t i_cbBuffer ) do { - if(!iv_fromSRCWords) - { - setSRCWords(); - } - if( i_cbBuffer < flatSize() ) { TRACFCOMP( g_trac_errl, "ErrlSrc::flatten: buffer too small"); @@ -151,15 +129,33 @@ uint64_t ErrlSrc::flatten( void * o_pBuffer, const uint64_t i_cbBuffer ) // Use reserved1 word to stash the reason code for easy extract in // unflatten rather than parsing srcString - psrc->reserved1 = iv_srcWords[0] >> 8; + psrc->reserved1 = iv_reasonCode; CPPASSERT( ErrlSrc::SLEN == sizeof(pelSRCSection_t)-iv_header.flatSize()); psrc->srcLength = ErrlSrc::SLEN; - psrc->word2 = iv_srcWords[1]; + // SRC format + psrc->word2 = 0x000000E0; // SRCI_HBT_FORMAT + + // Stash the Hostboot module id into hex word 3 + psrc->moduleId = iv_modId; + + // set deconfigure and/or gard bits + if (iv_deconfig) + { + psrc->word5 |= ErrlSrc::DECONFIG_BIT; // deconfigure + } + if (iv_gard) + { + psrc->word5 |= ErrlSrc::GARD_BIT; // GARD + } + + // set ACK bit - means unacknowledged + psrc->word5 |= ErrlSrc::ACK_BIT; // ACK - psrc->moduleId = iv_srcWords[2]; - psrc->word5 = iv_srcWords[4]; // spans 4-8 + // 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 // Build the char string for the SRC. uint32_t l_u32; @@ -225,53 +221,6 @@ uint64_t ErrlSrc::aschex2bin(char c) const return c; } -void ErrlSrc::setSRCWords() -{ - - //word 0 = reason code and SRC length - iv_srcWords[0] = 0xBC000000 || (iv_reasonCode) ; - - //word 1 = SRC format - iv_srcWords[1] = 0x000000E0; // SRCI_HBT_FORMAT - - //word 2 = Hostboot module ID - iv_srcWords[2] = iv_modId; - - //word 4 deconfigure, gard and ack bits. - if (iv_deconfig) - { - iv_srcWords[4] |= ErrlSrc::DECONFIG_BIT; // deconfigure - } - if (iv_gard) - { - iv_srcWords[4] |= ErrlSrc::GARD_BIT; // GARD - } - - // set ACK bit - means unacknowledged - iv_srcWords[4] |= ErrlSrc::ACK_BIT; // ACK - - //word 5 = First half of the hostboot long long word user1 - iv_srcWords[5] = (uint32_t) ((uint64_t)iv_user1 >> 32); - //word 6 = Second half of the hostboot long long word user1 - iv_srcWords[6] = (uint32_t) ( iv_user1 & 0xFFFFFFFF); - //word 7 = First half of the hostboot long long word user2 - iv_srcWords[7] = (uint32_t) ((uint64_t) iv_user2 >> 32); - //word 8 = Second half of the hostboot long long word user2 - iv_srcWords[8] = (uint32_t) ( iv_user2 & 0xFFFFFFFF); - - return; -} - -void ErrlSrc::formatSRCWords() -{ - iv_reasonCode = (iv_srcWords[0] && 0x3F00) >> 8; - iv_modId = iv_srcWords[2]; - iv_user1 = ((uint64_t)iv_srcWords[5] << 32) || (iv_srcWords[6]); - iv_user2 = ((uint64_t)iv_srcWords[7] << 32) || (iv_srcWords[8]); - - return; -} - } // namespace diff --git a/src/usr/errl/runtime/test/rt_errltest.H b/src/usr/errl/runtime/test/rt_errltest.H index 404205920..5458058fd 100644 --- a/src/usr/errl/runtime/test/rt_errltest.H +++ b/src/usr/errl/runtime/test/rt_errltest.H @@ -173,7 +173,7 @@ public: break; } - if (l_err->srcType() != HBT_ERR_INFO) + if (l_err->srcType() != ERRORLOG::SRC_ERR_INFO) { TS_FAIL("testErrl1: createErrlLog() returns incorrect SRC type!"); break; @@ -231,7 +231,7 @@ public: l_err->setSev(ERRORLOG::ERRL_SEV_UNKNOWN); l_err->setEventType(ERRORLOG::ERRL_ETYPE_CAPACITY_UPGRADE); l_err->setSubSys(ERRORLOG::EPUB_UNKNOWN); - l_err->setSrcType(HBT_ERR_INFO); + l_err->setSrcType(ERRORLOG::SRC_ERR_INFO); l_err->setTermState(ERRORLOG::TERM_STATE_NO_FLAGS); if (l_err->sev() != ERRORLOG::ERRL_SEV_UNKNOWN) @@ -246,7 +246,7 @@ public: { TS_FAIL("testErrl2: setSubSys() fails!"); } - else if (l_err->srcType() != HBT_ERR_INFO) + else if (l_err->srcType() != ERRORLOG::SRC_ERR_INFO) { TS_FAIL("testErrl2: setSrcType() fails!"); } diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index f4368049c..9dace8d04 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -241,7 +241,7 @@ public: break; } - if (l_err->srcType() != HBT_ERR_INFO) + if (l_err->srcType() != ERRORLOG::SRC_ERR_INFO) { TS_FAIL("testErrl1: createErrlLog() returns incorrect SRC type!"); break; @@ -299,7 +299,7 @@ public: l_err->setSev(ERRORLOG::ERRL_SEV_UNKNOWN); l_err->setEventType(ERRORLOG::ERRL_ETYPE_CAPACITY_UPGRADE); l_err->setSubSys(ERRORLOG::EPUB_UNKNOWN); - l_err->setSrcType(HBT_ERR_INFO); + l_err->setSrcType(ERRORLOG::SRC_ERR_INFO); l_err->setTermState(ERRORLOG::TERM_STATE_NO_FLAGS); if (l_err->sev() != ERRORLOG::ERRL_SEV_UNKNOWN) @@ -314,7 +314,7 @@ public: { TS_FAIL("testErrl2: setSubSys() fails!"); } - else if (l_err->srcType() != HBT_ERR_INFO) + else if (l_err->srcType() != ERRORLOG::SRC_ERR_INFO) { TS_FAIL("testErrl2: setSrcType() fails!"); } |

