From 887663e6ad51a489099a43c200358f689621fbe2 Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Fri, 27 Jul 2018 11:13:39 -0500 Subject: 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 Reviewed-by: Marshall J. Wilks Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: ILYA SMIRNOV Reviewed-by: Daniel M. Crowell --- src/usr/errl/errlentry.C | 16 ++++++++++++++-- src/usr/secureboot/common/plugins/errludP_secure.H | 1 - 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src/usr') 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 #include #include +#include #include #include #include @@ -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 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(i_pBuffer); - bool l_parseError = false; do { -- cgit v1.2.1