diff options
author | Mike Baiocchi <mbaiocch@us.ibm.com> | 2018-07-27 11:13:39 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-07-30 12:34:29 -0500 |
commit | 887663e6ad51a489099a43c200358f689621fbe2 (patch) | |
tree | 9c87f6b03b848e3887b71b677270182448b0a63d /src/usr | |
parent | e4f0610314ca8734c8ec1309bfb364104b94531d (diff) | |
download | talos-hostboot-887663e6ad51a489099a43c200358f689621fbe2.tar.gz talos-hostboot-887663e6ad51a489099a43c200358f689621fbe2.zip |
Minor Error Log Improvements
This commit adds the error log severity to the trace saying that
a new error log is being created. It also cleans up an unused
variable in some error log parsing logic.
Change-Id: Iff196993bdabf80ad65006fca195f0785221257f
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63476
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@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>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/errl/errlentry.C | 16 | ||||
-rw-r--r-- | src/usr/secureboot/common/plugins/errludP_secure.H | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index f9b0ec870..b31ef8b8c 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -35,6 +35,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <map> #include <hbotcompid.H> #include <errl/errlentry.H> #include <errl/errlmanager.H> @@ -74,6 +75,17 @@ namespace ERRORLOG trace_desc_t* g_trac_errl = NULL; TRAC_INIT(&g_trac_errl, "ERRL", KILOBYTE, TRACE::BUFFER_SLOW); +// std::map to trace severity in trace +// NOTE: must be kept in sync with enum definition in hberrltypes.H +std::map<uint8_t, const char *> errl_sev_str_map { + {ERRL_SEV_INFORMATIONAL, "INFORMATIONAL"}, + {ERRL_SEV_RECOVERED, "RECOVERED"}, + {ERRL_SEV_PREDICTIVE, "PREDICTIVE"}, + {ERRL_SEV_UNRECOVERABLE, "UNRECOVERABLE"}, + {ERRL_SEV_CRITICAL_SYS_TERM, "CRITICAL_SYS_TERM"}, + {ERRL_SEV_UNKNOWN, "UNKNOWN"}, +}; + /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, @@ -95,9 +107,9 @@ ErrlEntry::ErrlEntry(const errlSeverity_t i_sev, 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 ); + TRACFCOMP( g_trac_errl, ERR_MRK"Error created : PLID=%.8X, RC=%.4X, Mod=%.2X, Userdata=%.16llX %.16llX, Sev=%s", plid(), i_reasonCode, i_modId, i_user1, i_user2, errl_sev_str_map.at(i_sev) ); #else - TRACDCOMP( 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 ); + TRACDCOMP( g_trac_errl, ERR_MRK"Error created : PLID=%.8X, RC=%.4X, Mod=%.2X, Userdata=%.16llX %.16llX, Sev=%s", plid(), i_reasonCode, i_modId, i_user1, i_user2, errl_sev_str_map.at(i_sev) ); #endif // Collect the Backtrace and add it to the error log iv_pBackTrace = new ErrlUserDetailsBackTrace(); diff --git a/src/usr/secureboot/common/plugins/errludP_secure.H b/src/usr/secureboot/common/plugins/errludP_secure.H index acdf3032e..388298ce1 100644 --- a/src/usr/secureboot/common/plugins/errludP_secure.H +++ b/src/usr/secureboot/common/plugins/errludP_secure.H @@ -377,7 +377,6 @@ class UdParserNodeCommInfo : public ERRORLOG::ErrlUserDetailsParser // 1 byte : MboxId char* l_databuf = static_cast<char*>(i_pBuffer); - bool l_parseError = false; do { |