summaryrefslogtreecommitdiffstats
path: root/src/usr/errldisplay/errldisplay.C
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2017-03-07 06:46:40 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-03-28 15:35:32 -0400
commitfd1825282b1cfef42129f5788c84ed259c73b470 (patch)
treef7fdde83915f8c15c3554e81fdeaa741fe642e77 /src/usr/errldisplay/errldisplay.C
parentefc8d3c19f61b47ed4b9de3ce5f8fabf2c59fefc (diff)
downloadtalos-hostboot-fd1825282b1cfef42129f5788c84ed259c73b470.tar.gz
talos-hostboot-fd1825282b1cfef42129f5788c84ed259c73b470.zip
Update err console display to include PRDF logs
Change-Id: I42ec4de748bcfaf1efd41680e087b9664539a69f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37608 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/errldisplay/errldisplay.C')
-rw-r--r--src/usr/errldisplay/errldisplay.C82
1 files changed, 75 insertions, 7 deletions
diff --git a/src/usr/errldisplay/errldisplay.C b/src/usr/errldisplay/errldisplay.C
index d54d4bb1f..3cb40d6f9 100644
--- a/src/usr/errldisplay/errldisplay.C
+++ b/src/usr/errldisplay/errldisplay.C
@@ -65,13 +65,28 @@
#include <console/consoleif.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/iterators/targetiterator.H>
+#include <targeting/common/target.H>
#ifdef CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY
//Generated hearder files for HWP parsing
#include <hbfwErrDisplayPlatHwpErr.H>
#include <hbfwErrDisplayPlatHwpFFDC.H>
+#include <prdrErrlDisplaySupt.H>
+
+namespace PRDF
+{
+namespace HOSTBOOT
+{
+PrdrErrSigTable & GetErrorSigTable()
+{
+ static PrdrErrSigTable l_sigTable = PrdrErrSigTable();
+ return l_sigTable;
+}
+}
+}
#endif
+
namespace ERRORLOGDISPLAY
{
@@ -97,11 +112,10 @@ static const ErrLogDisplay::errLogInfo unknownErrorInfo = {
"<none>", // Description
"unknown", // Module Name
"unknown", // Reason
- "unknown", // User Data 1 string
- "unknown" // User Data 2 string
+ "", // User Data 1 string
+ "" // User Data 2 string
};
-
ErrLogDisplay& errLogDisplay()
{
return Singleton<ErrLogDisplay>::instance();
@@ -184,6 +198,50 @@ void displayCalloutTarget (uint8_t * epRaw, size_t& o_size)
free(tmp_str);
}
+void ErrLogDisplay::displayPrdf (uint64_t i_ud1, uint64_t i_ud2)
+{
+ //PRD stores the HUID of the callout in top word of ud1
+ // and the signature in the top word of ud2
+ uint32_t l_huid = i_ud1 >> 32;
+ uint32_t l_sig = i_ud2 >> 32;
+
+ CONSOLE::displayf(NULL, " PRD Signature : 0x%X 0x%X",
+ l_huid, l_sig);
+
+#ifdef CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY
+ //Find the Target from the HUID
+ TARGETING::Target* l_pTopLevel = NULL;
+ TARGETING::targetService().getTopLevelTarget(l_pTopLevel);
+ TARGETING::Target * l_target = l_pTopLevel->getTargetFromHuid(l_huid);
+
+ if(l_target)
+ {
+ TARGETING::TYPE l_targetType =
+ l_target->getAttr<TARGETING::ATTR_TYPE>();
+
+ const char * l_nameStr =
+ PRDF::HOSTBOOT::GetErrorSigTable()[l_targetType][l_sig].first;
+ const char * l_descStr =
+ PRDF::HOSTBOOT::GetErrorSigTable()[l_targetType][l_sig].second;
+
+ TARGETING::ATTR_FAPI_NAME_type l_fapiStr = {0};
+ l_target->tryGetAttr<TARGETING::ATTR_FAPI_NAME>(l_fapiStr);
+
+ if(l_nameStr)
+ {
+ CONSOLE::displayf(NULL, " Signature Description : %s (%s) %s",
+ l_fapiStr, l_nameStr, l_descStr);
+ }
+ else
+ {
+ CONSOLE::displayf(NULL, " Signature Description : %s UNKNOWN",
+ l_fapiStr);
+ }
+ }
+#endif
+}
+
+
void ErrLogDisplay::displayCallout (void *data, size_t size)
{
CONSOLE::displayf(NULL,
@@ -504,17 +562,27 @@ void ErrLogDisplay::msgDisplay (const errlHndl_t &i_err,
CONSOLE::displayf(NULL, "Error reported by %s (0x%04X) PLID 0x%08X",
findComponentName( i_committerComp ),
i_committerComp, i_err->plid() );
- CONSOLE::displayf(NULL, " %s", info->descriptString);
- CONSOLE::displayf(NULL, " ModuleId 0x%02x %s",
+
+ //PRD doesn't follow the rest of the HB conventions
+ // Handle them special
+ if(i_committerComp == PRDF_COMP_ID)
+ {
+ displayPrdf(i_err->getUserData1(), i_err->getUserData2());
+ }
+ else
+ {
+ CONSOLE::displayf(NULL, " %s", info->descriptString);
+ CONSOLE::displayf(NULL, " ModuleId 0x%02x %s",
i_err->moduleId(), info->moduleName);
- CONSOLE::displayf(NULL, " ReasonCode 0x%04x %s",
+ CONSOLE::displayf(NULL, " ReasonCode 0x%04x %s",
i_err->reasonCode(), info->reasonString);
+ }
+
CONSOLE::displayf(NULL, " UserData1 %s : 0x%016lx",
info->userData1String, i_err->getUserData1());
CONSOLE::displayf(NULL, " UserData2 %s : 0x%016lx",
info->userData2String, i_err->getUserData2());
-
// Loop through and print interesting user data sections.
for ( size_t i = 0; i < i_err->iv_SectionVector.size(); ++i )
{
OpenPOWER on IntegriCloud