summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/errldisplay/errldisplay.H5
-rw-r--r--src/usr/diag/prdf/common/rule/prdf_rule.mk3
-rw-r--r--src/usr/diag/prdf/common/rule/prdrCompile.C20
-rw-r--r--src/usr/diag/prdf/plugins/prdrErrlDisplaySupt.H103
-rwxr-xr-xsrc/usr/diag/prdf/rule/makefile6
-rwxr-xr-xsrc/usr/errl/parser/genErrlParsers.pl11
-rw-r--r--src/usr/errldisplay/errldisplay.C82
-rw-r--r--src/usr/errldisplay/makefile9
-rw-r--r--src/usr/makefile6
9 files changed, 228 insertions, 17 deletions
diff --git a/src/include/usr/errldisplay/errldisplay.H b/src/include/usr/errldisplay/errldisplay.H
index 4f7830be9..b5856b7f1 100644
--- a/src/include/usr/errldisplay/errldisplay.H
+++ b/src/include/usr/errldisplay/errldisplay.H
@@ -169,6 +169,11 @@ private:
* @brief Displays a HWPF error log user details
*/
static void displayHwpf (void *data, size_t size, uint8_t i_type);
+
+ /**
+ * @brief Displays a PRDF error log user details
+ */
+ static void displayPrdf (uint64_t i_ud1, uint64_t i_ud2);
};
} // End namespace
diff --git a/src/usr/diag/prdf/common/rule/prdf_rule.mk b/src/usr/diag/prdf/common/rule/prdf_rule.mk
index 9ae0df31e..1a4665696 100644
--- a/src/usr/diag/prdf/common/rule/prdf_rule.mk
+++ b/src/usr/diag/prdf/common/rule/prdf_rule.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -39,6 +39,7 @@ PRDR_RULE_TABLES += p9_mca.prf
prd_rule_prf_targets = ${PRDR_RULE_TABLES}
prd_rule_err_targets = ${PRDR_RULE_TABLES:.prf=.prf.err.C}
+prd_rule_disp_targets = ${PRDR_RULE_TABLES:.prf=.prf.disp.C}
prd_rule_reg_targets = ${PRDR_RULE_TABLES:.prf=.prf.reg.C}
prd_rule_html_targets = ${PRDR_RULE_TABLES:.prf=.prf.html}
diff --git a/src/usr/diag/prdf/common/rule/prdrCompile.C b/src/usr/diag/prdf/common/rule/prdrCompile.C
index 23d4dda83..77b27546c 100644
--- a/src/usr/diag/prdf/common/rule/prdrCompile.C
+++ b/src/usr/diag/prdf/common/rule/prdrCompile.C
@@ -86,7 +86,9 @@ int main(int argc, char ** argv)
}
std::ofstream l_htmlFile((std::string(argv[1]) + ".html").c_str());
+ std::ofstream l_htmlDummy(std::string("/dev/null").c_str());
std::ofstream l_errFile((std::string(argv[1]) + ".err.C").c_str());
+ std::ofstream l_dispFile((std::string(argv[1]) + ".disp.C").c_str());
std::ofstream l_regFile((std::string(argv[1]) + ".reg.C").c_str());
#ifndef __HOSTBOOT_MODULE
@@ -113,6 +115,9 @@ int main(int argc, char ** argv)
l_errFile << "#include <prdrErrlPluginsSupt.H>" << std::endl;
l_errFile << "PRDR_ERROR_SIGNATURE_TABLE_START ";
+ l_dispFile << "#include <prdrErrlDisplaySupt.H>" << std::endl;
+ l_dispFile << "PRDR_ERROR_SIGNATURE_TABLE_START ";
+
// setup register id file.
l_regFile << "#include <prdrErrlPluginsSupt.H>" << std::endl;
l_regFile << "PRDR_REGISTER_ID_TABLE_START ";
@@ -163,6 +168,11 @@ int main(int argc, char ** argv)
<< std::hex << g_currentChip->cv_signatureOffset
<< " )" << std::endl;
+ // set error register HOM_TYPE
+ l_dispFile << "( 0x" << std::hex << g_currentChip->cv_targetType << ", 0x"
+ << std::hex << g_currentChip->cv_signatureOffset
+ << " )" << std::endl;
+
// output bit groups
uint32_t l_pos = 0;
l_size = htons((uint16_t)g_groups.size());
@@ -187,6 +197,7 @@ int main(int argc, char ** argv)
{
(*i).second->output(l_prfFile);
(*i).second->generateDoxygen(l_htmlFile, (*i).first, l_errFile);
+ (*i).second->generateDoxygen(l_htmlDummy, (*i).first, l_dispFile);
}
// output action classes.
@@ -218,6 +229,7 @@ int main(int argc, char ** argv)
// Add chip's extra signatures.
l_errFile << "//---- Extra Signatures ----" << std::endl;
+ l_dispFile << "//---- Extra Signatures ----" << std::endl;
for (std::list<ExtraSignature>::iterator i
= g_currentChip->cv_sigExtras.begin();
i != g_currentChip->cv_sigExtras.end();
@@ -227,11 +239,19 @@ int main(int argc, char ** argv)
<< std::setfill('0') << std::setw(8) << std::hex
<< i->iv_sig << ", " << *(i->iv_sname) << ", "
<< *(i->iv_desc) << ")" << std::endl;
+
+ l_dispFile << "\tPRDR_ERROR_SIGNATURE ( 0x"
+ << std::setfill('0') << std::setw(8) << std::hex
+ << i->iv_sig << ", " << *(i->iv_sname) << ", "
+ << *(i->iv_desc) << ")" << std::endl;
}
l_errFile << "PRDR_ERROR_SIGNATURE_TABLE_END" << std::endl;
l_errFile.close();
+ l_dispFile << "PRDR_ERROR_SIGNATURE_TABLE_END" << std::endl;
+ l_dispFile.close();
+
l_regFile << "PRDR_REGISTER_ID_TABLE_END" << std::endl;
l_regFile.close();
diff --git a/src/usr/diag/prdf/plugins/prdrErrlDisplaySupt.H b/src/usr/diag/prdf/plugins/prdrErrlDisplaySupt.H
new file mode 100644
index 000000000..c06d275e7
--- /dev/null
+++ b/src/usr/diag/prdf/plugins/prdrErrlDisplaySupt.H
@@ -0,0 +1,103 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/plugins/prdrErrlDisplaySupt.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2005,2017 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef __PRDRERRLDISPLAYSUPT_H
+#define __PRDRERRLDISPLAYSUPT_H
+
+#define __PRDR_PLUGIN_HUID uint32_t
+#define __PRDR_PLUGIN_IDTYPE uint32_t
+
+#define __PRDR_PLUGIN_XY(X,Y,Z) X##Y##_##Z
+#define __PRDR_PLUGIN_MAKENAME(X,Y,Z) __PRDR_PLUGIN_XY(X,Y,Z)
+
+#ifndef PRDR_ERROR_SIGNATURE_TABLE_START
+ #define PRDR_ERROR_SIGNATURE_TABLE_START( homtype, offset) \
+ namespace PRDF \
+ {\
+ namespace HOSTBOOT \
+ { \
+ class __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, homtype, offset)\
+ { \
+ public: \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, \
+ homtype, offset)(); \
+ private: \
+ struct __table_struct \
+ { \
+ uint32_t signature; \
+ const char * name; \
+ const char * brief; \
+ }; \
+ static __table_struct cv_table[]; \
+ }; \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, homtype, offset) \
+ __PRDR_PLUGIN_MAKENAME(g_PrdrPlugin_errTable_Reg_, homtype, offset);\
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, homtype, offset)::\
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, homtype, offset)() \
+ { \
+ __PRDR_PLUGIN_HUID l_homtype = homtype; \
+ __table_struct * l_tablePtr = cv_table; \
+ while (NULL != l_tablePtr->name) \
+ { \
+ GetErrorSigTable()[l_homtype][l_tablePtr->signature] = \
+ std::pair<const char*, const char*> \
+ (l_tablePtr->name,l_tablePtr->brief); \
+ l_tablePtr++; \
+ } \
+ } \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, homtype, offset):: \
+ __table_struct \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_ErrTable_Reg_, homtype, offset):: \
+ cv_table[] = \
+ {
+
+ #define PRDR_ERROR_SIGNATURE( signature , name, brief ) \
+ { signature , name , brief } ,
+
+ #define PRDR_ERROR_SIGNATURE_TABLE_END \
+ { 0, NULL, NULL } \
+ }; \
+ } \
+ } // end namespace PRDF
+#endif
+
+#include <map>
+#include <stdint.h>
+
+namespace PRDF
+{
+namespace HOSTBOOT
+{
+
+typedef std::map<__PRDR_PLUGIN_IDTYPE,
+ std::pair<const char*, const char*>> PrdrErrSigEntries;
+typedef std::map<__PRDR_PLUGIN_HUID, PrdrErrSigEntries> PrdrErrSigTable;
+
+PrdrErrSigTable & GetErrorSigTable();
+
+} // namespace HOSTBBOT
+} // end namespace PRDF
+
+#endif
diff --git a/src/usr/diag/prdf/rule/makefile b/src/usr/diag/prdf/rule/makefile
index 8c9d13049..102e82c2c 100755
--- a/src/usr/diag/prdf/rule/makefile
+++ b/src/usr/diag/prdf/rule/makefile
@@ -73,6 +73,7 @@ PRDR_CMP_FLEX_C_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_FLEX_C}
PRF_IMG_PATHS = $(addprefix ${IMGDIR}/, ${prd_rule_prf_targets})
ERR_PLUGIN_PATHS = $(addprefix ${OBJ_PLUG_DIR}/, ${prd_rule_err_targets})
+ERR_DISPLAY_PATHS= $(addprefix ${OBJ_PLUG_DIR}/, ${prd_rule_disp_targets})
REG_PLUGIN_PATHS = $(addprefix ${OBJ_PLUG_DIR}/, ${prd_rule_reg_targets})
#-------------------------------------------------------------------------------
@@ -105,6 +106,7 @@ LINK_PLUGIN_FILES += $(addprefix ${OBJ_PLUG_DIR}/,$(notdir ${SOURCE_PLUGIN_FILES
CODE_PASS_BODY += ${PRF_IMG_PATHS}
CODE_PASS_BODY += ${ERR_PLUGIN_PATHS}
+CODE_PASS_BODY += ${ERR_DISPLAY_PATHS}
CODE_PASS_BODY += ${REG_PLUGIN_PATHS}
CODE_PASS_BODY += ${LINK_PLUGIN_FILES}
@@ -117,10 +119,12 @@ CLEAN_TARGETS += ${PRDR_CMP_FLEX_o_PATH}
CLEAN_TARGETS += ${PRDR_CMP_FLEX_C_PATH}
CLEAN_TARGETS += $(addprefix ${OBJ_RULE_DIR}/, ${prd_rule_prf_targets})
CLEAN_TARGETS += $(addprefix ${OBJ_RULE_DIR}/, ${prd_rule_err_targets})
+CLEAN_TARGETS += $(addprefix ${OBJ_RULE_DIR}/, ${prd_rule_disp_targets})
CLEAN_TARGETS += $(addprefix ${OBJ_RULE_DIR}/, ${prd_rule_reg_targets})
CLEAN_TARGETS += $(addprefix ${OBJ_RULE_DIR}/, ${prd_rule_html_targets})
CLEAN_TARGETS += ${PRF_IMG_PATHS}
CLEAN_TARGETS += ${ERR_PLUGIN_PATHS}
+CLEAN_TARGETS += ${ERR_DISPLAY_PATHS}
CLEAN_TARGETS += ${REG_PLUGIN_PATHS}
CLEAN_TARGETS += ${LINK_PLUGIN_FILES}
@@ -211,6 +215,7 @@ PRDRPP_SEARCHDIRS = -I../common/plat/p9 \
${OBJ_RULE_DIR}/%.prf \
${OBJ_RULE_DIR}/%.prf.err.C \
+${OBJ_RULE_DIR}/%.prf.disp.C \
${OBJ_RULE_DIR}/%.prf.reg.C : %.rule ${PRDR_CMP_PATH}
${PRD_OUT_MAKE}
$(C1)cat $< | ${SRC_USR_DIR}/common/rule/prdrpp \
@@ -226,6 +231,7 @@ ${PRF_IMG_PATHS}: ${IMGDIR}/% : ${OBJ_RULE_DIR}/%
# Link all .prf.err.C and .prf.reg.C files from OBJ_RULE_DIR to OBJ_PLUG_DIR
${ERR_PLUGIN_PATHS} \
+${ERR_DISPLAY_PATHS} \
${REG_PLUGIN_PATHS}: ${OBJ_PLUG_DIR}/% : ${OBJ_RULE_DIR}/% | ${OBJ_PLUG_DIR}
${PRD_OUT_LINK}
$(C1)ln -sf ${OBJ_RULE_LINK_DIR}/$(notdir $^) $@
diff --git a/src/usr/errl/parser/genErrlParsers.pl b/src/usr/errl/parser/genErrlParsers.pl
index 0316db383..e1bf5b3eb 100755
--- a/src/usr/errl/parser/genErrlParsers.pl
+++ b/src/usr/errl/parser/genErrlParsers.pl
@@ -153,13 +153,10 @@ while (my $line = <COMP_ID_FILE>)
# Strip off any leading zeroes from the component value
$compValue =~ s/^0//g;
- # Do not add PRDF component ID
- if ($compId ne "PRDF_COMP_ID")
- {
- $compIdToValueHash{$compId} = $compValue;
- # Need the integer value for compId sorting purposes
- $compIdToHexValueHash{$compId} = hex $compValue;
- }
+
+ $compIdToValueHash{$compId} = $compValue;
+ # Need the integer value for compId sorting purposes
+ $compIdToHexValueHash{$compId} = hex $compValue;
}
}
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 )
{
diff --git a/src/usr/errldisplay/makefile b/src/usr/errldisplay/makefile
index c4561087d..57a208ce7 100644
--- a/src/usr/errldisplay/makefile
+++ b/src/usr/errldisplay/makefile
@@ -30,11 +30,18 @@ MODULE = errldisplay
OBJS += errldisplay.o
OBJS += errldisplaydata.o
+#PRDF Error Sigs
+include ${ROOTPATH}/src/usr/diag/prdf/common/rule/tables.mk
+OBJS += $(if $(CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY),$(prd_rule_disp_targets))
+
include ${ROOTPATH}/config.mk
# To find errldisplaydata.C - it is generated
# by ../errl/parser/genErrlParsers.pl
-vpath %.C ${GENDIR}
+vpath %.C ${GENDIR} ${GENDIR}/plugins/prdf/
+vpath %.C ${GENDIR} ${GENDIR}/plugins/prdf/rule
#To find hbfwErrDisplayPlatHwpErr add extra include paths
EXTRAINCDIR += ${GENDIR}/plugins
+EXTRAINCDIR += ${GENDIR}/plugins/prdf/
+EXTRAINCDIR += ${ROOTPATH}/src/usr/diag/prdf/plugins/
diff --git a/src/usr/makefile b/src/usr/makefile
index 96537fe87..64df5222e 100644
--- a/src/usr/makefile
+++ b/src/usr/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2010,2016
+# Contributors Listed Below - COPYRIGHT 2010,2017
# [+] Google Inc.
# [+] International Business Machines Corp.
#
@@ -69,4 +69,8 @@ SUBDIRS += diag.d
SUBDIRS += xz.d
SUBDIRS += $(if $(CONFIG_ENABLE_HDAT_IN_HOSTBOOT),hdat.d,)
+#errldisplay relies on some generated files from PRD.
+#Enforce that it goes after
+_BUILD/SUBDIR/CODE/errldisplay: _BUILD/SUBDIR/CODE/diag
+
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud