diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2018-03-28 11:00:35 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-04-09 16:38:00 -0400 |
commit | 7383c3a4fbaff710ecbefb3e9eeeae7320d9f8b1 (patch) | |
tree | fabf0c55c9f4c048b330ec60ea97e97c5f2ebaea | |
parent | 519b09db143e87b3d43f39790486f6c5dc1be96b (diff) | |
download | talos-hostboot-7383c3a4fbaff710ecbefb3e9eeeae7320d9f8b1.tar.gz talos-hostboot-7383c3a4fbaff710ecbefb3e9eeeae7320d9f8b1.zip |
Get Hostboot Dump after Hostboot Crash
When Hostboot has a TI with a PLID rather than a Reason Code (RC), HWSV does not
attempt the Hostboot Dump. Thought is that happens per the design as the error
log related to the PLID sent by Hostboot should already have the required
information. There are instances where the error log does not have sufficient
data and a dump would be beneficial. A path is being added so an error log can
be flagged as needing a Hostboot dump.
Change-Id: I97972308c70e7210f578fb818563bb9b0cd940b4
CQ: SW420219
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56600
CI-Ready: Daniel M. Crowell <dcrowell@us.ibm.com>
CI-Ready: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-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>
-rw-r--r-- | src/include/kernel/hbterminatetypes.H | 5 | ||||
-rw-r--r-- | src/include/kernel/terminate.H | 13 | ||||
-rw-r--r-- | src/include/usr/errl/errlentry.H | 25 | ||||
-rw-r--r-- | src/kernel/terminate.C | 13 | ||||
-rw-r--r-- | src/usr/errl/errlentry.C | 6 | ||||
-rw-r--r-- | src/usr/errl/errlmanager.C | 10 | ||||
-rw-r--r-- | src/usr/initservice/baseinitsvc/initservice.C | 11 |
7 files changed, 71 insertions, 12 deletions
diff --git a/src/include/kernel/hbterminatetypes.H b/src/include/kernel/hbterminatetypes.H index 6aa97e023..e95a77010 100644 --- a/src/include/kernel/hbterminatetypes.H +++ b/src/include/kernel/hbterminatetypes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -82,7 +82,8 @@ struct HB_TI_DataArea struct { uint64_t type:16; /**< indicates either plid or src */ uint64_t source:16; /**< Caller of the TI */ - uint64_t reserved2:16; /**< Reserved space */ + uint64_t hbDumpFlag:1; /**< get HB dump flag */ + uint64_t reserved2:15; /**< Reserved space */ uint64_t reserved3:16; /**< Reserved space */ }; uint64_t flag; /**< Full word - flag */ diff --git a/src/include/kernel/terminate.H b/src/include/kernel/terminate.H index c80304d93..551f66057 100644 --- a/src/include/kernel/terminate.H +++ b/src/include/kernel/terminate.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -68,4 +68,15 @@ void termModifySRC(uint8_t i_moduleID, uint32_t i_word7 = 0, uint32_t i_word8 = 0); +/** @fn termSetHbDump + * + * @brief Set flag for system to get an HB dump during processing of the TI. + * + * @param[in] NONE + * @param[out] NONE: + * + * @return Nothing + */ +void termSetHbDump(void); + #endif diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 418e48fe6..dede1c21b 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -127,6 +127,9 @@ public: * in the primary SRC * @param[in] i_hbSwError if true, will automatically add a HIGH * severity callout for EPUB_PRC_HB_CODE + * @param[in] i_hbDump if true, will flag error log as a candidate + * for an HB dump if log is committed and is + * used as status for a shutdown * @return None */ ErrlEntry(const errlSeverity_t i_sev, @@ -134,7 +137,8 @@ public: const uint16_t i_reasonCode, const uint64_t i_user1 = 0, const uint64_t i_user2 = 0, - const bool i_hbSwError = false ); + const bool i_hbSwError = false, + const bool i_hbDump = false ); /** * @brief Destructor @@ -632,6 +636,14 @@ public: */ bool getEselCallhomeInfoEvent(); + /** + * @brief get iv_doHbDump + * + * @return true if this log should result in a HB dump during a shutdown, + * false otherwise + */ + bool getDoHbDump(); + private: /** @@ -862,6 +874,10 @@ private: // when true, send this special type of eSEL to the BMC // This is used to send OCC informational errors up to BMC bool iv_eselCallhomeInfoEvent; + + // when true, if error log is committed, then the error log is tracked so + // doShutdown can request that a HB dump be done. + bool iv_doHbDump; }; @@ -1023,6 +1039,13 @@ inline bool ErrlEntry::getEselCallhomeInfoEvent() return iv_eselCallhomeInfoEvent; } +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline bool ErrlEntry::getDoHbDump() +{ + return iv_doHbDump; +} + } // End namespace diff --git a/src/kernel/terminate.C b/src/kernel/terminate.C index 52756b825..499fd96b9 100644 --- a/src/kernel/terminate.C +++ b/src/kernel/terminate.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2017 */ +/* Contributors Listed Below - COPYRIGHT 2012,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -52,7 +52,6 @@ HB_Descriptor kernel_hbDescriptor = #endif // BOOTLOADER - void terminateExecuteTI() { // Call the function that actually executes the TI code. @@ -98,3 +97,13 @@ void termModifySRC(uint8_t i_moduleID, uint32_t i_word7, uint32_t i_word8) kernel_TIDataArea.src.word7 = i_word7; kernel_TIDataArea.src.word8 = i_word8; } + +#ifndef BOOTLOADER +void termSetHbDump(void) +{ + // Set indicator flag for doing HB dump + kernel_TIDataArea.hbDumpFlag = 1; + + return; +} +#endif // BOOTLOADER diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 972c8b272..c05d10d1d 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -79,7 +79,8 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, const uint16_t i_reasonCode, const uint64_t i_user1, const uint64_t i_user2, - const bool i_hbSwError ) : + const bool i_hbSwError, + const bool i_hbDump ) : 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 @@ -88,7 +89,8 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, iv_termState(TERM_STATE_UNKNOWN), iv_sevFinal(false), iv_skipShowingLog(true), - iv_eselCallhomeInfoEvent(false) + iv_eselCallhomeInfoEvent(false), + iv_doHbDump(i_hbDump) { #ifdef CONFIG_ERRL_ENTRY_TRACE TRACFCOMP( g_trac_errl, ERR_MRK"Error created : PLID=%.8X, RC=%.4X, Mod=%.2X, Userdata=%.16llX %.16llX", plid(), i_reasonCode, i_modId, i_user1, i_user2 ); diff --git a/src/usr/errl/errlmanager.C b/src/usr/errl/errlmanager.C index 724c03a63..24008e7ea 100644 --- a/src/usr/errl/errlmanager.C +++ b/src/usr/errl/errlmanager.C @@ -53,6 +53,7 @@ #include <config.h> #include <functional> #include <hwas/common/deconfigGard.H> +#include <kernel/terminate.H> namespace ERRORLOG { @@ -193,7 +194,7 @@ ErrlManager::~ErrlManager() // Singleton destructor gets run when module gets unloaded. // This errorlog module never gets unloaded. So rather to send a - // message to error log daemon and tell it to shutdow and delete + // message to error log daemon and tell it to shutdown and delete // the queue we will assert here because the destructor never gets // call. assert(0); @@ -736,6 +737,13 @@ void ErrlManager::commitErrLog(errlHndl_t& io_err, compId_t i_committerComp ) //Ask ErrlEntry to check for any special deferred deconfigure callouts io_err->deferredDeconfigure(); + // Is error flagged for doing HB Dump during a shutdown / TI? + if (io_err->getDoHbDump() == true) + { + // Then set flag in TI data + termSetHbDump(); + } + //Offload the error log to the errlog message queue sendErrlogToMessageQueue ( io_err, i_committerComp ); io_err = NULL; diff --git a/src/usr/initservice/baseinitsvc/initservice.C b/src/usr/initservice/baseinitsvc/initservice.C index 58a86ac26..b16fd213e 100644 --- a/src/usr/initservice/baseinitsvc/initservice.C +++ b/src/usr/initservice/baseinitsvc/initservice.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2017 */ +/* Contributors Listed Below - COPYRIGHT 2011,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -260,11 +260,13 @@ errlHndl_t InitService::startTask( * */ const bool hbSwError = true; + const bool hbDump = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::WAIT_TASK_FAILED, - l_tidretrc, l_childsts, hbSwError); + l_tidretrc, l_childsts, hbSwError, + hbDump); // Add Printk Buffer for FFDC. ERRORLOG::ErrlUserDetailsPrintk().addToLog(l_errl); @@ -392,11 +394,13 @@ errlHndl_t InitService::executeFn( * */ const bool hbSwError = true; + const bool hbDump = true; l_errl = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, INITSERVICE::BASE_INITSVC_MOD_ID, INITSERVICE::WAIT_FN_FAILED, - l_tidretrc, l_childsts, hbSwError); + l_tidretrc, l_childsts, hbSwError, + hbDump); // Add Printk Buffer for FFDC. ERRORLOG::ErrlUserDetailsPrintk().addToLog(l_errl); @@ -775,6 +779,7 @@ void InitService::doShutdown(uint64_t i_status, // Ensure no one is manpulating the registry lists and that only one // thread actually executes the shutdown path. mutex_lock(&iv_registryMutex); + if (iv_shutdownInProgress) { // switch the failing status if an RC comes in after |