summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsachin gupta <sgupta2m@in.ibm.com>2013-07-15 03:05:21 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-08-23 16:17:34 -0500
commit6c82992a3ea6bb0acef08050f5dd110376ca3ac4 (patch)
treeca400125c0c0ed9f236b69e1ea7f7d093b3d1b57 /src
parent13c1d30ad8dad508635fa3faaa3c4e9e8b37f2dc (diff)
downloadtalos-hostboot-6c82992a3ea6bb0acef08050f5dd110376ca3ac4.tar.gz
talos-hostboot-6c82992a3ea6bb0acef08050f5dd110376ca3ac4.zip
PRD: Add error log parser for hostboot
Change-Id: I401ae1810ec21cd161eee389d4d71063841ba1e3 CQ: SW215983 CMVC-Prereq: 885671 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5399 Tested-by: Jenkins Server Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5904
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C2
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h2
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h33
-rw-r--r--src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C2
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/rule/prdrCompile.C60
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h11
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl10
-rw-r--r--src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C32
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C2
-rw-r--r--src/usr/diag/prdf/common/plugins/plugins.mk74
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfCalloutsData.H (renamed from src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H)2
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfCenLogParse.C271
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfCenLogParse.H87
-rwxr-xr-xsrc/usr/diag/prdf/common/plugins/prdfDramRepairUsrData.H (renamed from src/usr/diag/prdf/common/framework/service/prdfDramRepairUsrData.H)7
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfGardType.H63
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfLogParse_common.C793
-rwxr-xr-xsrc/usr/diag/prdf/common/plugins/prdfLogParse_common.H67
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMruData.H)2
-rw-r--r--[-rwxr-xr-x]src/usr/diag/prdf/common/plugins/prdfPfa5Data.h (renamed from src/usr/diag/prdf/common/framework/service/prdfPfa5Data.h)5
-rwxr-xr-xsrc/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.C48
-rwxr-xr-xsrc/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.H174
-rwxr-xr-xsrc/usr/diag/prdf/common/prdfMain_common.C4
-rwxr-xr-xsrc/usr/diag/prdf/framework/rule/makefile188
-rwxr-xr-xsrc/usr/diag/prdf/makefile1
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C2
-rw-r--r--src/usr/diag/prdf/plugins/makefile37
-rw-r--r--src/usr/diag/prdf/plugins/prdfLogParse.C44
-rwxr-xr-xsrc/usr/diag/prdf/test/makefile1
28 files changed, 1857 insertions, 167 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C
index 4ce761867..10d0de2e2 100755
--- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C
+++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C
@@ -251,7 +251,7 @@ Resolution & ResolutionFactory::GetDumpResolution(
}
#endif
-Resolution & ResolutionFactory::GetGardResolution(GardResolution::ErrorType et)
+Resolution & ResolutionFactory::GetGardResolution(GardAction::ErrorType et)
{
return iv_gardResolutionFW.get(GardResolution(et));
}
diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h
index 980b9dbbc..8d883ccba 100755
--- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h
+++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h
@@ -240,7 +240,7 @@ public:
* @return reference to a resolution
* @post only one instance of this object with this param will exist
*/
- Resolution & GetGardResolution( GardResolution::ErrorType i_gardErrorType );
+ Resolution & GetGardResolution( GardAction::ErrorType i_gardErrorType );
// dg06a - end
diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h b/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h
index 05750444b..f10b7fb39 100755
--- a/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h
+++ b/src/usr/diag/prdf/common/framework/resolution/xspprdGardResolution.h
@@ -40,6 +40,7 @@
//--------------------------------------------------------------------
#include <iipResolution.h>
+#include <prdfGardType.H>
namespace PRDF
{
@@ -55,38 +56,12 @@ class GardResolution : public Resolution
{
public:
- enum ErrorType
- {
- // No Gard is possible
- NoGard = 0,
- // Recovered error at threshold
- Predictive = 1,
- // Checkstop, failing resources can be removed to prevent future occurances
- Fatal = 2,
- // This is NoGard unless attn type is CheckStop, then it is Fatal (Func)
- CheckStopOnlyGard = 3,
- //This is to allow Deferred Deconfig, with No Garding
- DeconfigNoGard = 4
- };
-
- inline static const char* ToString( uint32_t i_type )
- {
- switch (i_type)
- {
- case NoGard: return "NoGard";
- case Predictive: return "Predictive";
- case Fatal: return "Fatal";
- case CheckStopOnlyGard: return "CheckStopOnlyGard";
- case DeconfigNoGard: return "DeconfigNoGard";
- default: return "Undefined";
- }
- }
-
/**
* @brief Constructor
* @param[in] i_et error type
*/
- GardResolution( ErrorType i_et = NoGard ) : xErrorType( i_et )
+ GardResolution( GardAction::ErrorType i_et = GardAction::NoGard )
+ : xErrorType( i_et )
{ }
/*
@@ -117,7 +92,7 @@ public:
private: // functions
private: // Data
- ErrorType xErrorType;
+ GardAction::ErrorType xErrorType;
};
diff --git a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C
index bc2758c3d..73db21a52 100644
--- a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C
+++ b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C
@@ -889,7 +889,7 @@ Resolution * RuleMetaData::createResolution( Prdr::Expr * i_action,
case Prdr::ACT_GARD: // GARD
l_rc = &i_data.cv_reslFactory.GetGardResolution(
- (GardResolution::ErrorType) i_action->cv_value[0].i);
+ (GardAction::ErrorType) i_action->cv_value[0].i);
break;
case Prdr::ACT_ANALY: // ANALYZE
diff --git a/src/usr/diag/prdf/common/framework/rule/prdrCompile.C b/src/usr/diag/prdf/common/framework/rule/prdrCompile.C
index 52ec28ad5..68bb2e881 100755
--- a/src/usr/diag/prdf/common/framework/rule/prdrCompile.C
+++ b/src/usr/diag/prdf/common/framework/rule/prdrCompile.C
@@ -94,15 +94,17 @@ int main(int argc, char ** argv)
exit(-1);
}
-#ifndef __HOSTBOOT_MODULE
-
std::ofstream l_htmlFile((std::string(argv[1]) + ".html").c_str());
std::ofstream l_errFile((std::string(argv[1]) + ".err.C").c_str());
std::ofstream l_regFile((std::string(argv[1]) + ".reg.C").c_str());
+#ifndef __HOSTBOOT_MODULE
// Get Backing build or sandbox name.
std::string l_backingBuild(getenv("SANDBOXBASE"));
l_backingBuild = l_backingBuild.substr(l_backingBuild.find_last_of('/')+1);
+#else
+ std::string l_backingBuild("HOSTBOOT");
+#endif
// setup HTML headers.
l_htmlFile << "<HTML><HEAD><STYLE type=\"text/css\">" << std::endl;
@@ -117,15 +119,13 @@ int main(int argc, char ** argv)
l_htmlFile << "</STYLE>" << std::endl;
// setup error signature file.
- l_errFile << "#include <prdrErrlPluginSupt.H>" << std::endl;
+ l_errFile << "#include <prdrErrlPluginsSupt.H>" << std::endl;
l_errFile << "PRDR_ERROR_SIGNATURE_TABLE_START ";
// setup register id file.
- l_regFile << "#include <prdrErrlPluginSupt.H>" << std::endl;
+ l_regFile << "#include <prdrErrlPluginsSupt.H>" << std::endl;
l_regFile << "PRDR_REGISTER_ID_TABLE_START ";
-#endif
-
yyline = 1; // current line is 1.
g_currentChip = NULL; // initialize current chip.
@@ -141,9 +141,7 @@ int main(int argc, char ** argv)
if (NULL != g_currentChip)
{
g_currentChip->output(l_prfFile);
-#ifndef __HOSTBOOT_MODULE
g_currentChip->outputRegisterFile(l_regFile);
-#endif
//g_currentChip->print();
}
else
@@ -152,8 +150,6 @@ int main(int argc, char ** argv)
exit(1);
}
-#ifndef __HOSTBOOT_MODULE
-
l_htmlFile << "<TITLE> PRD Table: "
<< g_currentChip->cv_name->substr(1,
g_currentChip->cv_name->length()-2)
@@ -161,8 +157,6 @@ int main(int argc, char ** argv)
<< std::endl;
l_htmlFile << "</HEAD><BODY>" << std::endl;
-#endif
-
// output rules.
l_size = htons((uint16_t)g_rules.size());
PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile);
@@ -173,12 +167,10 @@ int main(int argc, char ** argv)
(*i).second->output(l_prfFile);
};
-#ifndef __HOSTBOOT_MODULE
// set error register HOM_TYPE
l_errFile << "( 0x" << std::hex << g_currentChip->cv_targetType << ", 0x"
<< std::hex << g_currentChip->cv_signatureOffset
<< " )" << std::endl;
-#endif
// output bit groups
uint32_t l_pos = 0;
@@ -194,29 +186,21 @@ int main(int argc, char ** argv)
l_size = htons((uint16_t)prdrGetRefId(&g_attentionStartGroup["UNIT_CS"])); // @jl02
PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile); // @jl02
-#ifndef __HOSTBOOT_MODULE
-
l_htmlFile << "<H2> Register Groups </H2>" << std::endl;
l_htmlFile << "Generated from " << l_backingBuild << "<BR>" << std::endl;
-#endif
-
for (std::map<std::string, Group *>::iterator i = g_groups.begin();
i != g_groups.end();
i++, l_pos++)
{
(*i).second->output(l_prfFile);
-#ifndef __HOSTBOOT_MODULE
(*i).second->generateDoxygen(l_htmlFile, (*i).first, l_errFile);
-#endif
}
// output action classes.
l_size = htons((uint16_t)g_actionclasses.size());
PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile);
-#ifndef __HOSTBOOT_MODULE
-
l_htmlFile << "<H2> Actions </H2>" << std::endl;
l_htmlFile << "Generated from " << l_backingBuild << "<BR>" << std::endl;
l_htmlFile << "<TABLE>" << std::endl;
@@ -224,31 +208,22 @@ int main(int argc, char ** argv)
<< "<TH> Description </TH> "
<< "<TH> Actions </TH></TR>" << std::endl;
-#endif
-
for (std::map<std::string, Group *>::iterator i =
g_actionclasses.begin();
i != g_actionclasses.end();
i++)
{
(*i).second->output(l_prfFile);
-#ifndef __HOSTBOOT_MODULE
(*i).second->generateDoxygen(l_htmlFile, (*i).first);
-#endif
}
-#ifndef __HOSTBOOT_MODULE
l_htmlFile << "</TABLE>" << std::endl;
-#endif
fclose(l_prfFile);
-#ifndef __HOSTBOOT_MODULE
l_htmlFile << "</HTML>";
l_htmlFile.close();
-#endif
-#ifndef __HOSTBOOT_MODULE
// Add chip's extra signatures.
l_errFile << "//---- Extra Signatures ----" << std::endl;
for (std::list<ExtraSignature>::iterator i
@@ -262,14 +237,11 @@ int main(int argc, char ** argv)
<< *(i->iv_desc) << ")" << std::endl;
}
-
-
l_errFile << "PRDR_ERROR_SIGNATURE_TABLE_END" << std::endl;
l_errFile.close();
l_regFile << "PRDR_REGISTER_ID_TABLE_END" << std::endl;
l_regFile.close();
-#endif
return (g_hadError ? -1 : 0);
};
@@ -501,24 +473,24 @@ uint32_t prdrActionArgMap(const std::string & i_arg)
#include <iipServiceDataCollector.h>
// Initialize Gard values.
- GardResolution::ErrorType errType = GardResolution::NoGard;
- string tmpStr = string(GardResolution::ToString(errType));
+ GardAction::ErrorType errType = GardAction::NoGard;
+ string tmpStr = string(GardAction::ToString(errType));
g_ActionArgMap[tmpStr] = errType;
- errType = GardResolution::Predictive;
- tmpStr = string(GardResolution::ToString(errType));
+ errType = GardAction::Predictive;
+ tmpStr = string(GardAction::ToString(errType));
g_ActionArgMap[tmpStr] = errType;
- errType = GardResolution::Fatal;
- tmpStr = string(GardResolution::ToString(errType));
+ errType = GardAction::Fatal;
+ tmpStr = string(GardAction::ToString(errType));
g_ActionArgMap[tmpStr] = errType;
- errType = GardResolution::CheckStopOnlyGard;
- tmpStr = string(GardResolution::ToString(errType));
+ errType = GardAction::CheckStopOnlyGard;
+ tmpStr = string(GardAction::ToString(errType));
g_ActionArgMap[tmpStr] = errType;
- errType = GardResolution::DeconfigNoGard;
- tmpStr = string(GardResolution::ToString(errType));
+ errType = GardAction::DeconfigNoGard;
+ tmpStr = string(GardAction::ToString(errType));
g_ActionArgMap[tmpStr] = errType;
#ifdef __HOSTBOOT_MODULE
diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h
index debf5e7ee..0b5e73fbd 100755
--- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h
+++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h
@@ -583,26 +583,26 @@ public:
/**
Set ErrorType for Gard
<ul>
- <br><b>Parameter </b> GardResolution::ErrorType
+ <br><b>Parameter </b> GardAction::ErrorType
<br><b>Returns: </b> None.
<br><b>Requirements:</b> None
<br><b>Promises </b> QueryRepeatGard() == et
<br><b>Notes: </b>
</ul><br>
*/
- void Gard(GardResolution::ErrorType et) { errorType = et; }
+ void Gard(GardAction::ErrorType et) { errorType = et; }
/**
Query for RepeatGard ErrorType
<ul>
<br><b>Paramters </b> None.
- <br><b>Returns: </b> GardResolution::ErrorType
+ <br><b>Returns: </b> GardAction::ErrorType
<br><b>Requirements:</b> SetAttentionType()
<br><b>Promises </b> ErrorType set by Gard or NoGard
<br><b>Notes: </b>
</ul><br>
*/
- GardResolution::ErrorType QueryGard(void);
+ GardAction::ErrorType QueryGard(void);
/**
Set Error type as Special Uncorrectable Error SUE
@@ -794,8 +794,7 @@ private: // Data
uint8_t hitCount;
uint8_t threshold;
TARGETING::TargetHandle_t startingPoint;
-// dg12d BIT_STRING_BUFFER_CLASS rbsVpd;
- GardResolution::ErrorType errorType;
+ GardAction::ErrorType errorType;
Timer ivCurrentEventTime;
TARGETING::TargetHandle_t ivpDumpRequestChipHandle;
ATTENTION_TYPE causeAttentionType; // MCK,REC,SPCL
diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl
index 0a65d537a..282ea1eb4 100755
--- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl
+++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.inl
@@ -38,7 +38,7 @@ ServiceDataCollector::ServiceDataCollector() :
hitCount(0),
threshold(0),
startingPoint(NULL),
- errorType(GardResolution::NoGard),
+ errorType(GardAction::NoGard),
ivpDumpRequestChipHandle(NULL),
causeAttentionType(INVALID_ATTENTION_TYPE),
ivpThermalChipHandle(NULL)
@@ -55,10 +55,10 @@ void ServiceDataCollector::SetAttentionType( ATTENTION_TYPE attention )
if(attention == MACHINE_CHECK)
{
flags |= SERVICE_CALL;
- errorType = GardResolution::Fatal;
+ errorType = GardAction::Fatal;
} else
{
- errorType = GardResolution::Predictive;
+ errorType = GardAction::Predictive;
}
}
@@ -97,13 +97,13 @@ inline void ServiceDataCollector::SetTerminate(void)
// ---------------------------------------------------------------
inline
-GardResolution::ErrorType ServiceDataCollector::QueryGard(void)
+GardAction::ErrorType ServiceDataCollector::QueryGard(void)
{
if (IsServiceCall())
{
return errorType;
}
- return GardResolution::NoGard;
+ return GardAction::NoGard;
}
// dg12a -moved here from *.C --------------------------------------
diff --git a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
index eea40bbb1..8718ab7c2 100644
--- a/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfRasServices_common.C
@@ -259,7 +259,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
//Use this SDC unless determined in Check Stop processing to use a Latent, UE, or SUE saved SDC
sdc = i_sdc;
- GardResolution::ErrorType prdGardErrType;
+ GardAction::ErrorType prdGardErrType;
HWSV::hwsvGardEnum gardState; // defined in src/hwsv/server/hwsvTypes.H
HWAS::GARD_ErrorType gardErrType = HWAS::GARD_NULL;
HWAS::DeconfigEnum deconfigState = HWAS::NO_DECONFIG;
@@ -467,17 +467,17 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
prdGardErrType = sdc.QueryGard();
switch (prdGardErrType)
{
- case GardResolution::NoGard:
+ case GardAction::NoGard:
gardState = HWSV::HWSV_NO_GARD;
gardErrType = HWAS::GARD_NULL;
break;
- case GardResolution::Predictive:
+ case GardAction::Predictive:
gardErrType = HWAS::GARD_Predictive;
break;
- case GardResolution::Fatal:
+ case GardAction::Fatal:
gardErrType = HWAS::GARD_Func;
break;
- case GardResolution::CheckStopOnlyGard:
+ case GardAction::CheckStopOnlyGard:
if (MACHINE_CHECK == i_attnType)
{
gardErrType = HWAS::GARD_Func;
@@ -488,7 +488,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
gardErrType = HWAS::GARD_NULL;
}
break;
- case GardResolution::DeconfigNoGard:
+ case GardAction::DeconfigNoGard:
gardState = HWSV::HWSV_NO_GARD;
gardErrType = HWAS::GARD_NULL;
break;
@@ -503,15 +503,15 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
{
// gardErrType is GARD_Func, set in latent/UE/SUE processing for Check Stop.
// If NoGard was specified in this switched sdc, then keep the NoGard
- if ( sdc.QueryGard() == GardResolution::NoGard )
+ if ( sdc.QueryGard() == GardAction::NoGard )
{
gardState = HWSV::HWSV_NO_GARD;
gardErrType = HWAS::GARD_NULL;
- prdGardErrType = GardResolution::NoGard;
+ prdGardErrType = GardAction::NoGard;
}
else
{
- prdGardErrType = GardResolution::Fatal;
+ prdGardErrType = GardAction::Fatal;
}
}
@@ -612,7 +612,7 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType,
// Deferred Deconfig should be used throughout all of Hostboot (both
// checkForIplAttns() and MDIA).
if ( (HWSV::HWSV_NO_GARD != gardState ||
- GardResolution::DeconfigNoGard == prdGardErrType ) )
+ GardAction::DeconfigNoGard == prdGardErrType ) )
{
deferDeconfig = true;
deconfigState = HWAS::DECONFIG;
@@ -1167,18 +1167,18 @@ will also be removed. Need to confirm if this code is required anymore.
PRDF_DTRAC( "PRDTRACE: Unknown Priority Value" );
}
- GardResolution::ErrorType et = sdc.QueryGard();
+ GardAction::ErrorType et = sdc.QueryGard();
switch ( et )
{
- case GardResolution::NoGard:
+ case GardAction::NoGard:
PRDF_DTRAC( "PRDTRACE: NoGard" ); break;
- case GardResolution::Predictive:
+ case GardAction::Predictive:
PRDF_DTRAC( "PRDTRACE: Predictive" ); break;
- case GardResolution::Fatal:
+ case GardAction::Fatal:
PRDF_DTRAC( "PRDTRACE: Fatal" ); break;
- case GardResolution::CheckStopOnlyGard:
+ case GardAction::CheckStopOnlyGard:
PRDF_DTRAC( "PRDTRACE: CheckStopOnlyGard" ); break;
- case GardResolution::DeconfigNoGard:
+ case GardAction::DeconfigNoGard:
PRDF_DTRAC( "PRDTRACE: DeconfigNoGard" );
}
}
diff --git a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C
index 625e6aa15..f22424cfa 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C
@@ -344,7 +344,7 @@ ServiceDataCollector & ServiceDataCollector::operator=(
hitCount = buffer_get8(i_flatdata);
threshold = buffer_get8(i_flatdata);
startingPoint = buffer_getTarget(i_flatdata);
- errorType = (GardResolution::ErrorType)buffer_get32(i_flatdata);
+ errorType = (GardAction::ErrorType)buffer_get32(i_flatdata);
ivDumpRequestContent = (hwTableContent) buffer_get32(i_flatdata); //@ecdf
ivpDumpRequestChipHandle = buffer_getTarget(i_flatdata);
diff --git a/src/usr/diag/prdf/common/plugins/plugins.mk b/src/usr/diag/prdf/common/plugins/plugins.mk
new file mode 100644
index 000000000..a3be46892
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/plugins.mk
@@ -0,0 +1,74 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/diag/prdf/common/plugins/plugins.mk $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2004,2013
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+# This is FSP specific .mk file as error log parser will
+# be compiled in FSP enviornment.
+# This file only defines the rules for errl plugin libraries.
+
+PLUGIN_NAME = lib${BASE_LIB_NAME}
+RULE_LIBRARY_NAME = ${BASE_LIB_NAME}-rule
+PRDR_ERRL_LIB = lib${RULE_LIBRARY_NAME}
+
+LIBRARY_OFILES += \
+ prdfLogParse.o \
+ prdfLogParse_common.o \
+ prdfCenLogParse.o \
+ prdrErrlPluginsSupt.o
+
+LIBFLAGS = -Efips/lib
+
+#------------------------------------------------------------------
+# Stuff for rule-based errl plugin support.
+#------------------------------------------------------------------
+
+${PRDR_ERRL_LIB}.a_OFILES = ${PRDR_ERRL_PLUGINS_OFILES}
+LIBRARIES EXPLIBS += ${PRDR_ERRL_LIB}.a
+
+${PRDR_ERRL_PLUGINS} :
+ echo "Dummy makefile line"
+OBJECTS += ${PRDR_ERRL_PLUGINS}
+
+
+#------------------------------------------------------------------
+# End stuff for rule-based errl plugin support.
+#------------------------------------------------------------------
+
+.if ($(CONTEXT)=="x86.nfp" || $(CONTEXT)=="x86")
+
+NOAUTODEPS =
+LIBRARIES += ${PLUGIN_NAME}.a
+EXPLIBS += ${PLUGIN_NAME}.a
+${PLUGIN_NAME}.a_OFILES = ${LIBRARY_OFILES}
+
+.else
+
+BUILD_SHARED_OBJECTS =
+SHARED_LIBRARIES = ${PLUGIN_NAME}.so
+${PLUGIN_NAME}.so_SHLDFLAGS = ${EMPTY_LIBS} -Wl,-soname,${.TARGET} -ldl -L.. -Wl,--whole-archive -l${RULE_LIBRARY_NAME} -Wl,--no-whole-archive
+${PLUGIN_NAME}.so_OFILES = ${LIBRARY_OFILES}
+${PLUGIN_NAME}.so_EXTRA_LIBS = libbase.so
+
+.endif
+
+.include <${RULES_MK}>
+
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H b/src/usr/diag/prdf/common/plugins/prdfCalloutsData.H
index f85f6eb3d..47556503c 100644
--- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H
+++ b/src/usr/diag/prdf/common/plugins/prdfCalloutsData.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H $ */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfCalloutsData.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
diff --git a/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C b/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
new file mode 100644
index 000000000..1d42d5def
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
@@ -0,0 +1,271 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfCenLogParse.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/** @file prdfCenLogParse.C
+ * @brief Error log parsing code specific to the memory subsystem.
+ */
+
+#include <prdfCenLogParse.H>
+
+#include <errlusrparser.H>
+#include <cstring>
+#include <utilmem.H>
+
+#include <prdfDramRepairUsrData.H>
+#include <prdfMemoryMruData.H>
+
+namespace PRDF
+{
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+namespace HOSTBOOT
+#else
+namespace FSP
+#endif
+{
+//------------------------------------------------------------------------------
+// Constants/structs/enums
+//------------------------------------------------------------------------------
+
+enum
+{
+ // This is defined in a file we can't include into the error log parser.
+ DIMM_DQ_RANK_BITMAP_SIZE = 10,
+
+ // Used for the several functions that parse bad DQ bitmaps.
+ BITMAP_RANK_SIZE = sizeof(uint8_t),
+ BITMAP_DATA_SIZE = PORT_SLCT_PER_MBA * DIMM_DQ_RANK_BITMAP_SIZE,
+ BITMAP_ENTRY_SIZE = BITMAP_RANK_SIZE + BITMAP_DATA_SIZE,
+
+ PARSER_HEADER_SIZE = 25,
+ PARSER_DATA_SIZE = 50,
+};
+
+//------------------------------------------------------------------------------
+// Helper functions
+//------------------------------------------------------------------------------
+
+// Displays symbol value. If symbol is not valid, will display '--' in output.
+void getDramRepairSymbolStr( uint8_t i_value, char * o_str, uint32_t i_strSize )
+{
+ if ( SYMBOLS_PER_RANK <= i_value )
+ {
+ snprintf( o_str, i_strSize, "--" );
+ }
+ else
+ {
+ snprintf( o_str, i_strSize, "%2u", i_value );
+ }
+}
+
+// Gets the string representation for a single bad DQ bitmap entry.
+void getBadDqBitmapEntry( uint8_t * i_buffer, char * o_str )
+{
+ UtilMem membuf( i_buffer, BITMAP_ENTRY_SIZE );
+
+ uint8_t rank; membuf >> rank;
+ snprintf( o_str, PARSER_DATA_SIZE, "R:%1d", rank );
+
+ for ( int32_t p = 0; p < PORT_SLCT_PER_MBA; p++ )
+ {
+ char temp[PARSER_DATA_SIZE];
+
+ strcat( o_str, " " );
+
+ for ( int32_t b = 0; b < DIMM_DQ_RANK_BITMAP_SIZE; b++ )
+ {
+ uint8_t byte; membuf >> byte;
+ snprintf( temp, PARSER_DATA_SIZE, "%02x", byte );
+ strcat( o_str, temp );
+ }
+ }
+}
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+bool parseMemMruData( ErrlUsrParser & i_parser, uint32_t i_memMru )
+{
+ bool o_rc = true;
+
+ MemoryMruData::MemMruMeld mm; mm.u = i_memMru;
+
+ uint8_t nodePos = mm.s.nodePos;
+ uint8_t cenPos = (mm.s.procPos << 3) | mm.s.cenPos;
+ uint8_t mbaPos = mm.s.mbaPos;
+
+ char header[PARSER_HEADER_SIZE];
+ snprintf( header, PARSER_HEADER_SIZE, " mba(n%dp%dc%d)%s Rank: %d",
+ nodePos, cenPos, mbaPos, (cenPos < 10) ? " " : "",
+ mm.s.rank );
+
+ char data[PARSER_DATA_SIZE];
+
+ switch ( mm.s.symbol )
+ {
+ case MemoryMruData::CALLOUT_RANK:
+ snprintf( data, PARSER_DATA_SIZE, "Special: CALLOUT_RANK" );
+ break;
+ case MemoryMruData::CALLOUT_RANK_AND_MBA:
+ snprintf( data, PARSER_DATA_SIZE, "Special: CALLOUT_RANK_AND_MBA" );
+ break;
+ case MemoryMruData::CALLOUT_ALL_MEM:
+ snprintf( data, PARSER_DATA_SIZE, "Special: CALLOUT_ALL_MEM" );
+ break;
+ default:
+ // TODO: RTC 67358 Symbol, Pins, and Spared will be replaced with
+ // the DRAM Site Location and Wiring Type.
+ snprintf( data, PARSER_DATA_SIZE, "Symbol: %d Pins: %d Spared: %s",
+ mm.s.symbol, mm.s.pins,
+ (1 == mm.s.dramSpared) ? "true" : "false" );
+ }
+
+ // Ouptut should look like:
+ // | mba(n0p0c0) Rank: 0 : Special: CALLOUT_RANK |
+ // | mba(n7p63c1) Rank: 7 : Symbol: 71 Pins: 3 Spared: false |
+
+ i_parser.PrintString( header, data );
+
+ return o_rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parseDramRepairsData( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ bool rc = true;
+
+ if ( NULL != i_buffer )
+ {
+ UtilMem l_membuf( i_buffer, i_buflen );
+
+ DramRepairMbaData mbaData;
+ l_membuf >> mbaData;
+
+ uint8_t rankCount = mbaData.header.rankCount;
+
+ i_parser.PrintNumber( " DRAM_REPAIRS_DATA", "0x%02x", rankCount );
+
+ // Iterate over all ranks
+ for ( uint8_t rankIdx = 0; rankIdx < rankCount; rankIdx++ )
+ {
+ char data[64];
+ char temp[64];
+ char symbolStr[10];
+
+ DramRepairRankData rankEntry = mbaData.rankDataList[rankIdx];
+ snprintf(temp, 64, "Rank: %d", rankEntry.rank);
+ snprintf(data, 64, temp);
+
+ getDramRepairSymbolStr(rankEntry.chipMark, symbolStr, 10);
+ snprintf(temp, 64, "%s CM: %s", data, symbolStr);
+ snprintf(data, 64, temp);
+
+ getDramRepairSymbolStr(rankEntry.symbolMark, symbolStr, 10);
+ snprintf(temp, 64, "%s SM: %s", data, symbolStr);
+ snprintf(data, 64, temp);
+
+ // Display DRAM spare information for non-ISDIMMs
+ if ( !mbaData.header.isIsDimm )
+ {
+ getDramRepairSymbolStr(rankEntry.port0Spare, symbolStr, 10);
+ snprintf(temp, 64, "%s Sp0: %s", data, symbolStr);
+ snprintf(data, 64, temp);
+
+ getDramRepairSymbolStr(rankEntry.port1Spare, symbolStr, 10);
+ snprintf(temp, 64, "%s Sp1: %s", data, symbolStr);
+ snprintf(data, 64, temp);
+
+ // Display ECC spare information for X4 DRAMs
+ if ( mbaData.header.isX4Dram )
+ {
+ getDramRepairSymbolStr( rankEntry.eccSpare, symbolStr, 10 );
+ snprintf(temp, 64, "%s EccSp: %s", data, symbolStr);
+ snprintf(data, 64, temp);
+ }
+ }
+
+ i_parser.PrintString( "", data );
+ }
+ }
+ else
+ {
+ rc = false;
+ }
+
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parseDramRepairsVpd( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ bool rc = true;
+
+ if ( NULL == i_buffer ) return false; // Something failed in parser.
+
+ const uint32_t entries = i_buflen / BITMAP_ENTRY_SIZE;
+
+ i_parser.PrintNumber( " DRAM_REPAIRS_VPD", "0x%02x", entries );
+
+ for ( uint32_t i = 0; i < entries; i++ )
+ {
+ char data[PARSER_DATA_SIZE];
+ getBadDqBitmapEntry( &i_buffer[i*BITMAP_ENTRY_SIZE], data );
+
+ i_parser.PrintString( "", data );
+ }
+
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parseBadDqBitmap( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ bool rc = true;
+
+ if ( NULL == i_buffer ) return false; // Something failed in parser.
+
+ if ( BITMAP_ENTRY_SIZE > i_buflen ) // Data is expected to be one entry.
+ {
+ i_parser.PrintString( " BAD_DQ_BITMAP", "" );
+ i_parser.PrintHexDump(i_buffer, i_buflen);
+ }
+ else
+ {
+ char data[PARSER_DATA_SIZE];
+ getBadDqBitmapEntry( i_buffer, data );
+
+ i_parser.PrintString( " BAD_DQ_BITMAP", data );
+ }
+
+ return rc;
+}
+
+} // namespace FSP/HOSTBBOT
+} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/common/plugins/prdfCenLogParse.H b/src/usr/diag/prdf/common/plugins/prdfCenLogParse.H
new file mode 100644
index 000000000..d1a7e5f6e
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdfCenLogParse.H
@@ -0,0 +1,87 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfCenLogParse.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/** @file prdfCenLogParse.C
+ * @brief Error log parsing code specific to the memory subsystem.
+ */
+
+#ifndef __prdfCenLogParse_H
+#define __prdfCenLogParse_H
+
+#include <stdint.h>
+
+class ErrlUsrParser;
+
+namespace PRDF
+{
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+namespace HOSTBOOT
+#else
+namespace FSP
+#endif
+{
+
+/**
+ * @brief Parses MemoryMru data.
+ * @note Since this will be used in several different sections, this function
+ * simply parses the data. It does not print header information (i.e.
+ * "MemoryMru") or print out the uint32_t value of the MemoryMru. It is
+ * up to the caller to add that data.
+ * @param i_parser The error log parser.
+ * @param i_memMru The MemoryMru data.
+ */
+bool parseMemMruData( ErrlUsrParser & i_parser, uint32_t i_memMru );
+
+/**
+ * @brief Parses DRAM Repairs data (actual chip/symbol marks and DRAM repairs in
+ * hardware).
+ * @param i_buffer The data buffer.
+ * @param i_buflen The buffer length.
+ * @param i_parser The error log parser.
+ */
+bool parseDramRepairsData( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
+/**
+ * @brief Parses DRAM Repairs VPD (data in bad DQ bitmap attributes).
+ * @param i_buffer The data buffer.
+ * @param i_buflen The buffer length.
+ * @param i_parser The error log parser.
+ */
+bool parseDramRepairsVpd( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
+/**
+ * @brief Parses Bad DQ Bitmap data (Used in IPL UE isolation).
+ * @param i_buffer The data buffer.
+ * @param i_buflen The buffer length.
+ * @param i_parser The error log parser.
+ */
+bool parseBadDqBitmap( uint8_t * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
+} // namespace FSP/HOSTBBOT
+} // end namespace PRDF
+
+#endif // __prdfCenLogParse_H
+
diff --git a/src/usr/diag/prdf/common/framework/service/prdfDramRepairUsrData.H b/src/usr/diag/prdf/common/plugins/prdfDramRepairUsrData.H
index 616f8257c..741e2cc14 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfDramRepairUsrData.H
+++ b/src/usr/diag/prdf/common/plugins/prdfDramRepairUsrData.H
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/common/framework/service/prdfDramRepairUsrData.H $ */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfDramRepairUsrData.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* COPYRIGHT International Business Machines Corp. 2013 */
/* */
/* p1 */
/* */
@@ -28,11 +28,10 @@
* @brief ffdc data from dram repairs
*/
-#include <prdf_types.h>
+#include <stdint.h>
#include <utilstream.H>
#include <prdfCenConst.H>
#include <vector>
-#include <iipconst.h>
namespace PRDF
{
diff --git a/src/usr/diag/prdf/common/plugins/prdfGardType.H b/src/usr/diag/prdf/common/plugins/prdfGardType.H
new file mode 100644
index 000000000..e4f3bc784
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdfGardType.H
@@ -0,0 +1,63 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfGardType.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2001,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef prdfGardType_H
+#define prdfGardType_H
+
+namespace PRDF
+{
+namespace GardAction
+{
+ enum ErrorType
+ {
+ // No Gard is possible
+ NoGard = 0,
+ // Recovered error at threshold
+ Predictive = 1,
+ // Checkstop, failing resources can be removed to prevent future occurances
+ Fatal = 2,
+ // This is NoGard unless attn type is CheckStop, then it is Fatal (Func)
+ CheckStopOnlyGard = 3,
+ //This is to allow Deferred Deconfig, with No Garding
+ DeconfigNoGard = 4
+ };
+
+ inline const char* ToString( uint32_t i_type )
+ {
+ switch (i_type)
+ {
+ case NoGard: return "NoGard";
+ case Predictive: return "Predictive";
+ case Fatal: return "Fatal";
+ case CheckStopOnlyGard: return "CheckStopOnlyGard";
+ case DeconfigNoGard: return "DeconfigNoGard";
+ default: return "Undefined";
+ }
+ }
+
+} // end namespace GardAction
+
+} // end namespace PRDF
+
+#endif /* prdfGardType_H */
+
diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C
new file mode 100644
index 000000000..545a33eb2
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C
@@ -0,0 +1,793 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfLogParse_common.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/** @file prdfLogParse.C
+ * @brief
+ */
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <prdfLogParse_common.H>
+
+#include <prdf_service_codes.H>
+#include <prdfPfa5Data.h>
+#include <prdrErrlPluginsSupt.H>
+#include <UtilHash.H>
+#include <utilmem.H>
+
+#include <prdfCalloutsData.H> // For MruType enum
+
+#include <srcisrc.H>
+
+#include <errlplugins.H>
+#include <errlusrparser.H>
+
+#ifdef CONTEXT_x86_nfp
+
+// FIXME: RTC: 51689 will address this issue.
+// Need support for attributeenums.H in x86.nfp.
+#include "../../../../export/ppc/fips/include/attributeenums.H"
+
+#else
+
+#include <attributeenums.H> // For TARGETING::TYPE enum
+
+#endif
+
+#include <prdfCenLogParse.H>
+
+//------------------------------------------------------------------------------
+// Data structures
+//------------------------------------------------------------------------------
+
+namespace PRDF
+{
+
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+namespace HOSTBOOT
+#else
+namespace FSP
+#endif
+{
+
+#define PRDF_COMPRESSBUFFER_UNCOMPRESS_FUNCTIONS
+#include <prdfCompressBuffer.H>
+#include <prdfGardType.H>
+
+// Default tables for undefined Chips
+ErrorCodeDescription g_defaultErrorCodes[] =
+{
+ {0xFFFFFFFF, "Undefined error code" }, //this must be first
+ {0x0000DD00, "Assert failed in PRD"},
+ {0x0000DD01, "Invalid attention type passed to PRD"},
+ {0x0000DD02, "No active error bits found"},
+ {0x0000DD03, "Chip connection lookup failure"},
+ {0x0000DD05, "Internal PRD code"},
+ {0x0000DD09, "Fail to access attention data from registry"},
+ {0x0000DD11, "SRC Access failure"},
+ {0x0000DD12, "HWSV Access failure"},
+ {0x0000DD20, "Config error - no domains in system"},
+ {0x0000DD21, "No active attentions found"},
+ {0x0000DD23, "Unknown chip raised attention"},
+ {0x0000DD24, "PRD Model is not built"},
+ {0x0000DD27, "PrdRbsCallback failure"},
+ {0x0000DD28, "PrdStartScrub failure"},
+ {0x0000DD29, "PrdResoreRbs failure"},
+ {0x0000DD81, "Multiple bits on in Error Register"},
+ {0x0000DD90, "Scan comm access from Error Register failed"},
+ {0x0000DD91, "Scan comm access from Error Register failed due to"
+ " Power Fault"},
+ {0x0000DDFF, "Special return code indicating Not to reset or"
+ " mask FIR bits"},
+ {0x00ED0000, "PLL error"},
+ {0,NULL} // this must exist and must be last
+};
+
+//------------------------------------------------------------------------------
+// Forward references
+//------------------------------------------------------------------------------
+
+// SST Specific parser
+bool parseCaptureData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser, errlver_t ver );
+
+bool parsePfaData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
+bool parseAVPData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
+bool parseHdatAVPData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser );
+
+//##############################################################################
+//##
+//## Utility Functions
+//##
+//##############################################################################
+
+/** @fn getTargetInfo
+ * @brief Given a chip ID this function will return it's target type and chip
+ * name.
+ * @param i_chipId the given chip's HUID
+ * @param o_targetType the returned target type
+ * @param o_chipName the returned entity path
+ * @param i_sizeOfChipName size of the number of bytes in o_chipName
+ */
+void getTargetInfo( HUID i_chipId, TARGETING::TYPE & o_targetType,
+ char * o_chipName, uint32_t i_sz_chipName )
+{
+ using namespace TARGETING;
+
+ // FIXME: RTC: 51689 will address this issue.
+ // This is a hack until we can get targeting support in x86.
+
+ o_targetType = static_cast<TYPE>((i_chipId >> 16) & 0xff);
+
+ /* HUID format (32 bits):
+ *
+ * SSSSNNNNTTTTTTTTiiiiiiiiiiiiiiii
+ * S=System
+ * N=Node Number
+ * T=Target Type (matches TYPE attribute)
+ * i=Instance/Sequence number of target, relative to node
+ */
+
+ uint8_t l_node = (i_chipId >> 24) & 0xf;
+ uint16_t l_chip = i_chipId & 0xffff;
+ uint16_t l_chiplet = l_chip;
+
+ static const uint8_t MAX_EX_PER_PROC = 16;
+ static const uint8_t MAX_MCS_PER_PROC = 8;
+ static const uint8_t MAX_MBA_PER_MEMBUF = 2;
+
+ switch ( o_targetType )
+ {
+ case TYPE_MEMBUF:
+ snprintf( o_chipName, i_sz_chipName, "mb(n%dp%d)",
+ l_node, l_chip );
+ break;
+ case TYPE_PROC:
+ snprintf( o_chipName, i_sz_chipName, "pu(n%dp%d)",
+ l_node, l_chip );
+ break;
+ case TYPE_EX:
+ l_chip = l_chip / MAX_EX_PER_PROC;
+ l_chiplet = l_chiplet % MAX_EX_PER_PROC;
+ snprintf( o_chipName, i_sz_chipName, "ex(n%dp%dc%d)",
+ l_node, l_chip, l_chiplet );
+ break;
+ case TYPE_MCS:
+ l_chip = l_chip / MAX_MCS_PER_PROC;
+ l_chiplet = l_chiplet % MAX_MCS_PER_PROC;
+ snprintf( o_chipName, i_sz_chipName, "mcs(n%dp%dc%d)",
+ l_node, l_chip, l_chiplet );
+ break;
+ case TYPE_MBA:
+ l_chip = l_chip / MAX_MBA_PER_MEMBUF;
+ l_chiplet = l_chiplet % MAX_MBA_PER_MEMBUF;
+ snprintf( o_chipName, i_sz_chipName, "mba(n%dp%dc%d)",
+ l_node, l_chip, l_chiplet );
+ break;
+ default:
+ snprintf( o_chipName, i_sz_chipName, "????" );
+ }
+}
+
+//------------------------------------------------------------------------------
+
+void printUnknown( ErrlUsrParser & i_parser, errlver_t i_ver,
+ errlsubsec_t i_sst )
+{
+ i_parser.PrintHeading("Unknown data type");
+ i_parser.PrintNumber( "Data Version", "0x%08X", i_ver );
+ i_parser.PrintNumber( "Data Type", "0x%08X", i_sst );
+}
+
+//------------------------------------------------------------------------------
+
+bool parseCaptureData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser, errlver_t i_ver )
+{
+ bool rc = true;
+
+ uint32_t byteIndex = 0; // Capture Data buffer index in bytes
+
+ uint8_t * l_uncompBuffer = new uint8_t[CaptureDataSize];
+ size_t l_uncompBufSize = CaptureDataSize;
+ CaptureDataClass * l_capData;
+ memset( l_uncompBuffer, 0xFF,CaptureDataSize);
+
+ if ( 2 <= i_ver ) // version 2 and above are compressed.
+ {
+ PrdfCompressBuffer::uncompressBuffer( ((uint8_t *) i_buffer),
+ ((size_t) i_buflen),
+ l_uncompBuffer,
+ l_uncompBufSize );
+ //fix up the buffer length now that uncompressed
+ i_buflen = l_uncompBufSize;
+ l_capData = (CaptureDataClass *) l_uncompBuffer;
+ }
+ else // version 1 is uncompressed.
+ {
+ l_capData = (CaptureDataClass *) i_buffer;
+ }
+
+ // Fix endianness on size field.
+ l_capData->PfaCaptureDataSize = ntohl(l_capData->PfaCaptureDataSize);
+ if( l_capData->PfaCaptureDataSize < i_buflen )
+ {
+ i_buflen = l_capData->PfaCaptureDataSize;
+ }
+
+ i_parser.PrintBlank();
+ i_parser.PrintHeading("PRD Capture Data");
+ i_parser.PrintBlank();
+
+ char sigHeaderString[72], sigDataString[100];
+ UtilMem lCapDataBS( l_capData->CaptureData,
+ l_capData->PfaCaptureDataSize * 8 ); // pw06
+
+ do
+ {
+ // NOTE: See prdfCaptureData.C for capture data format.
+
+ // Get the next chip ID if it exists in the buffer
+ uint32_t l_chipId;
+ if ( i_buflen < (byteIndex + sizeof(l_chipId)) ) break;
+ lCapDataBS >> l_chipId;
+ byteIndex += sizeof(l_chipId);
+
+ // Check for an invalid chip ID, reached end of input (0xFFFFFFFF).
+ if (l_chipId == 0xFFFFFFFF ) break;
+
+ // Get the number of signatures for this chip
+ uint32_t chipSigCount;
+ if ( i_buflen < (byteIndex + sizeof(chipSigCount)) ) break;
+ lCapDataBS >> chipSigCount;
+
+ byteIndex += sizeof(chipSigCount);
+
+ // Get the Target type and chip name.
+ TARGETING::TYPE l_targetType = TARGETING::TYPE_NA;
+ char chipName[42], temp[42];
+ getTargetInfo(l_chipId, l_targetType, &temp[0], 42 );
+ snprintf( chipName, 42, "%s (0x%08x)", temp, l_chipId );
+ // Print out the chip ID.
+ i_parser.PrintString( chipName,
+ "*********************************************" );
+
+ // Iterate through all of the chip's signatures
+ for ( uint8_t j = 0; j < chipSigCount; j++ )
+ {
+ // Get register ID and data length from register header.
+ uint16_t sigId;
+ uint16_t sigDataSize;
+ if (i_buflen < (byteIndex + sizeof(sigId) + sizeof(sigDataSize)))
+ break;
+ lCapDataBS >> sigId >> sigDataSize;
+ byteIndex+= sizeof(sigId) + sizeof(sigDataSize);
+
+ // Get the signature description and address from register ID table
+ // if it exists.
+ const char * sigDescription =
+ GetRegisterIdTable()[l_targetType][sigId].name.c_str();
+ uint64_t sigAddress =
+ GetRegisterIdTable()[l_targetType][sigId].addr;
+ snprintf( sigHeaderString, 72, " %s", sigDescription );
+
+ // Get the register data
+ uint8_t sigData[sigDataSize];
+ size_t sz_uint8 = sizeof(uint8_t);
+ for ( uint32_t k = 0; k < sigDataSize; k++ )
+ {
+ if ( i_buflen < (byteIndex + sz_uint8) ) break;
+ lCapDataBS >> sigData[k];
+ byteIndex += sz_uint8;
+ }
+
+ // Add cases here if special data parsing is needed.
+ if ( 0 == sigDataSize )
+ {
+ i_parser.PrintString( sigHeaderString, "No Data Found" );
+ }
+ else if ( Util::hashString("DRAM_REPAIRS_DATA") == sigId )
+ {
+ parseDramRepairsData( sigData, sigDataSize, i_parser );
+ }
+ else if ( Util::hashString("DRAM_REPAIRS_VPD") == sigId )
+ {
+ parseDramRepairsVpd( sigData, sigDataSize, i_parser );
+ }
+ else if ( Util::hashString("BAD_DQ_BITMAP") == sigId )
+ {
+ parseBadDqBitmap( sigData, sigDataSize, i_parser );
+ }
+ else if ( (0 != sigDataSize) && (sizeof(uint64_t) >= sigDataSize) )
+ {
+ // Print one reg/line if the data size <= 8 bytes
+ const size_t sz_unit32 = sizeof(uint32_t);
+
+ uint32_t tmpData1 = 0;
+ size_t sz_tmpData1 = ( (sigDataSize > sz_unit32)
+ ? sz_unit32 : sigDataSize );
+ memcpy( &tmpData1, &sigData[0], sz_tmpData1 );
+
+ uint32_t tmpData2 = 0;
+ if ( sigDataSize > sz_unit32 )
+ {
+ size_t sz_tmpData2 = sigDataSize - sz_unit32;
+ memcpy( &tmpData2, &sigData[sz_unit32], sz_tmpData2 );
+ }
+
+ snprintf( sigDataString, 100, "(0x%016llX) 0x%08x 0x%08x",
+ sigAddress, htonl(tmpData1), htonl(tmpData2) );
+
+ i_parser.PrintString( sigHeaderString, sigDataString );
+ }
+ // Dump out the hex data
+ else
+ {
+ i_parser.PrintString( sigHeaderString, "" );
+ i_parser.PrintHexDump( sigData, sigDataSize );
+ }
+ }
+
+ } while (true);
+
+ if ( 2 <= i_ver ) // version 2 and above are compressed.
+ {
+ i_parser.PrintBlank();
+ i_parser.PrintHeading("Uncompressed Capture Buffer");
+ i_parser.PrintBlank();
+ i_parser.PrintHexDump( l_uncompBuffer, l_uncompBufSize );
+ }
+
+ i_parser.PrintBlank();
+ i_parser.PrintHeading("Compressed Capture Buffer");
+ // NOTE: The compressed buffer is added by the ERRL component.
+
+ delete [] l_uncompBuffer;
+
+ rc = false;
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parsePfaData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ bool rc = true;
+
+ i_parser.PrintBlank();
+
+ if ( NULL != i_buffer )
+ {
+ // Get the PFA data struct.
+ PfaData pfa;
+ UtilMem l_membuf( i_buffer, i_buflen );
+ l_membuf >> pfa;
+
+ char tmp[50];
+ const char * tmpStr = "";
+
+ i_parser.PrintNumber("Service Action Counter", "0x%02X",
+ pfa.serviceActionCounter);
+
+ // PRD Service Data Collector Flags
+ i_parser.PrintString( "SDC Flags", "" );
+ i_parser.PrintBool(" DUMP", pfa.DUMP );
+ i_parser.PrintBool(" UERE", pfa.UERE );
+ i_parser.PrintBool(" SUE", pfa.SUE );
+ i_parser.PrintBool(" AT_THRESHOLD", pfa.AT_THRESHOLD );
+ i_parser.PrintBool(" DEGRADED", pfa.DEGRADED );
+ i_parser.PrintBool(" SERVICE_CALL", pfa.SERVICE_CALL );
+ i_parser.PrintBool(" TRACKIT", pfa.TRACKIT );
+ i_parser.PrintBool(" TERMINATE", pfa.TERMINATE );
+ i_parser.PrintBool(" LOGIT", pfa.LOGIT );
+ i_parser.PrintBool(" FLOODING", pfa.FLOODING );
+ i_parser.PrintBool(" Thermal Event", pfa.THERMAL_EVENT );
+ i_parser.PrintBool(" Unit CS", pfa.UNIT_CHECKSTOP );
+ i_parser.PrintBool(" Using Sync'd Saved Sdc", pfa.USING_SAVED_SDC );
+ i_parser.PrintBool(" Last Core Termination", pfa.LAST_CORE_TERMINATE);
+ i_parser.PrintBool(" Deferred Deconfig", pfa.DEFER_DECONFIG );
+ i_parser.PrintBool(" CM Mode", pfa.CM_MODE );
+
+ // Attention types
+ i_parser.PrintNumber("Primary ATTN type", "0x%02X", pfa.priAttnType);
+ i_parser.PrintNumber("Secondary ATTN type", "0x%02X", pfa.secAttnType);
+
+ // Thresholding
+ snprintf( tmp, 50, "%d of %d", pfa.errorCount, pfa.threshold );
+ i_parser.PrintString( "Error Count", tmp );
+
+ // Dump info
+ i_parser.PrintNumber("DUMP Content", "0x%08x", pfa.msDumpInfo.content);
+ i_parser.PrintNumber("DUMP HUID", "0x%08x", pfa.msDumpInfo.id);
+
+ // Error log actions and severity
+ i_parser.PrintNumber( "ERRL Actions", "0x%04x", pfa.errlActions );
+
+ tmpStr = "Undefined";
+ switch ( pfa.errlSeverity )
+ {
+ case ERRL_SEV_INFORMATIONAL: tmpStr = "INFORMATIONAL"; break;
+ case ERRL_SEV_RECOVERED: tmpStr = "RECOVERED"; break;
+ case ERRL_SEV_PREDICTIVE: tmpStr = "PREDICTIVE"; break;
+ case ERRL_SEV_UNRECOVERABLE: tmpStr = "UNRECOVERABLE"; break;
+ }
+ snprintf( tmp, 50, "ERRL_SEV_%s (0x%x) ", tmpStr, pfa.errlSeverity );
+ i_parser.PrintString( "ERRL Severity", tmp );
+
+ // GARD info
+ // Need to use PRDF namespace as we have included prdfGardType.H
+ // in nested PRDF namespace
+ tmpStr = PRDF::GardAction::ToString( pfa.prdGardErrType );
+ snprintf( tmp, 50, "%s (0x%X) ", tmpStr, pfa.prdGardErrType );
+ i_parser.PrintString( "PRD GARD Error Type", tmp );
+ i_parser.PrintNumber( "HWAS GARD State", "0x%02X", pfa.hwasGardState );
+
+ // MRU callouts
+ if ( 0 < pfa.mruListCount )
+ {
+ i_parser.PrintNumber("PRD MRU List", "%d", pfa.mruListCount);
+
+ for ( uint32_t i = 0; i < pfa.mruListCount; ++i )
+ {
+ char header[25];
+ char data[50];
+
+ tmpStr = "Unknown Priority";
+ switch ( pfa.mruList[i].priority )
+ {
+ case SRCI_PRIORITY_LOW: tmpStr = "LOW"; break;
+ case SRCI_PRIORITY_MEDC: tmpStr = "MED_C"; break;
+ case SRCI_PRIORITY_MEDB: tmpStr = "MED_B"; break;
+ case SRCI_PRIORITY_MEDA: tmpStr = "MED_A"; break;
+ case SRCI_PRIORITY_MED: tmpStr = "MED"; break;
+ case SRCI_PRIORITY_HIGH: tmpStr = "HIGH"; break;
+ }
+ snprintf( header, 25, " #%d %s", i+1, tmpStr );
+
+ snprintf( data, 50, "0x%08x ", pfa.mruList[i].callout );
+
+ switch ( pfa.mruList[i].type )
+ {
+ case PRDcalloutData::TYPE_MEMMRU:
+ strcat( data, "(MemoryMru)" );
+ i_parser.PrintString( header, data );
+ parseMemMruData( i_parser, pfa.mruList[i].callout );
+ break;
+
+ case PRDcalloutData::TYPE_SYMFRU:
+ strcat( data, "(SymbolicFru)" );
+ i_parser.PrintString( header, data );
+ break;
+
+ case PRDcalloutData::TYPE_TARGET:
+ strcat( data, "(HUID)" );
+ i_parser.PrintString( header, data );
+ break;
+
+ default:
+ i_parser.PrintString( header, "(Unknown/Invalid)" );
+
+ }
+ }
+ }
+
+ // HCDB info
+ if ( 0 < pfa.hcdbListCount )
+ {
+ i_parser.PrintNumber( "HCDB List", "%d", pfa.hcdbListCount );
+
+ for ( uint32_t i = 0; i < pfa.hcdbListCount; ++i )
+ {
+ i_parser.PrintNumber( " HUID", "0x%08x",
+ pfa.hcdbList[i].hcdbId );
+ i_parser.PrintNumber( " Component Type", "0x%04x",
+ pfa.hcdbList[i].compType );
+ i_parser.PrintNumber( " Component Sub Type", "0x%04x",
+ pfa.hcdbList[i].compSubType );
+ }
+ }
+
+ // Multi-signatures
+ if ( 0 < pfa.sigListCount )
+ {
+ i_parser.PrintNumber( "Multi-Signature List", "%d",
+ pfa.sigListCount );
+
+ TARGETING::TYPE trgtType = TARGETING::TYPE_NA;
+ for ( uint32_t i = 0; i < pfa.sigListCount; ++i )
+ {
+ char tmp1[256], tmp2[256];
+
+ getTargetInfo( pfa.sigList[i].chipId, trgtType, &tmp1[0], 256 );
+
+ uint32_t sig = pfa.sigList[i].signature;
+ snprintf( tmp2, 256, "%s %s", tmp1,
+ (GetErrorSigTable()[trgtType][sig]).c_str() );
+
+ i_parser.PrintString( "", tmp2 );
+ }
+ }
+ }
+
+ if ( true != rc )
+ {
+ i_parser.PrintBlank();
+ i_parser.PrintString( " ERROR",
+ "Unable to parse PFA data" );
+ }
+
+ // Set return code to false, so that the hex data is dumped out, for now.
+ rc = false;
+
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parseAVPData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ bool rc = true;
+
+ if (i_buffer)
+ {
+ //To get endianness correct
+ uint32_t l_avpTCNumber;
+ UtilMem l_membuf1(i_buffer,i_buflen);
+ l_membuf1 >> l_avpTCNumber;
+
+ i_parser.PrintHeading("");
+ i_parser.PrintHeading("PRD AVP Test Case Data");
+
+ i_parser.PrintNumber("AVP Test Case Number", "0x%08x", l_avpTCNumber);
+ }
+
+ // Set return code to false, so that the hex data is dumped out, for now.
+ rc = false;
+
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parseHdatAVPData( void * i_buffer, uint32_t i_buflen,
+ ErrlUsrParser & i_parser )
+{
+ bool rc = true;
+ char l_buffer[29];
+
+ if (i_buffer)
+ {
+ uint32_t l_avpTCInfo;
+ uint8_t l_avpTCInfoByte;
+
+ i_parser.PrintHeading("");
+ i_parser.PrintHeading("PRD HDAT AVP Test Case Data");
+
+ memcpy(l_buffer, i_buffer, 29);
+ memcpy(&l_avpTCInfo, l_buffer, 4);
+ i_parser.PrintNumber("AVP Test Case Number", "0x%08x", l_avpTCInfo);
+ memcpy(&l_avpTCInfo, &l_buffer[4], 4);
+ i_parser.PrintNumber("AVP Test List Entry", "0x%08x", l_avpTCInfo);
+ memcpy(&l_avpTCInfoByte, &l_buffer[8], 1);
+ i_parser.PrintNumber("AVP Test Corner", "0x%02x", l_avpTCInfoByte);
+ l_buffer[28] = '\0';
+ i_parser.PrintString("AVP Description", &l_buffer[9]);
+ }
+
+ // Set return code to false, so that the hex data is dumped out, for now.
+ rc = false;
+
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool parseMemMru( void * i_buffer, uint32_t i_buflen, ErrlUsrParser & i_parser )
+{
+ bool o_rc = true;
+
+ uint32_t memMru;
+ size_t sz_memMru = sizeof( memMru );
+
+ i_parser.PrintBlank();
+
+ if ( i_buflen != sz_memMru )
+ {
+ i_parser.PrintString( " ERROR",
+ "Unable to parse MRU data" );
+ i_parser.PrintBlank();
+ i_parser.PrintHexDump( i_buffer, i_buflen );
+ }
+ else
+ {
+ UtilMem membuf( i_buffer, i_buflen );
+ membuf >> memMru;
+
+ char header[72];
+ snprintf( header, 72, "MemoryMru (0x%08x)", memMru );
+ i_parser.PrintHeading( header );
+
+ o_rc = parseMemMruData( i_parser, memMru );
+ }
+
+ return o_rc;
+}
+
+//##############################################################################
+//##
+//## Error Log Plugins
+//##
+//##############################################################################
+
+bool logDataParse( ErrlUsrParser & i_parser, void * i_buffer,
+ uint32_t i_buflen, errlver_t i_ver,
+ errlsubsec_t i_sst )
+{
+ bool rc = false;
+ switch ( i_sst )
+ {
+ case ErrlSectPFA5_1: // Assume version 1 now
+ rc = parsePfaData(i_buffer, i_buflen, i_parser);
+ break;
+
+ case ErrlCapData_1: // Assume version 1 for now
+ rc = parseCaptureData(i_buffer, i_buflen, i_parser, i_ver);
+ break;
+
+ case ErrlAVPData_1:
+ rc = parseAVPData(i_buffer, i_buflen, i_parser);
+ break;
+
+ case ErrlAVPData_2:
+ rc = parseHdatAVPData(i_buffer, i_buflen, i_parser);
+ break;
+
+ case ErrlMruData_1:
+ rc = parseMemMru( i_buffer, i_buflen, i_parser );
+ break;
+
+ default:
+ printUnknown( i_parser, i_ver, i_sst );
+ i_parser.PrintHexDump(i_buffer, i_buflen);
+ }
+
+ return rc;
+}
+
+//------------------------------------------------------------------------------
+
+bool srcDataParse( ErrlUsrParser & i_parser, const SrciSrc & i_src )
+{
+ bool rc = true;
+ const uint32_t MAX_DESC_LEN = 256;
+ uint32_t l_wc = 0;
+ const uint32_t *l_hexData = i_src.getHexData( l_wc );
+ char l_tmpstr[72];
+ const uint32_t l_chipId = l_hexData[l_wc-4];
+ const uint32_t l_signature = l_hexData[l_wc-2];
+ //ErrorCodeDescription* l_chipTable = NULL;
+
+ bool codeFailure = false;
+ const char * srcErrType = "PRD Error of some sort.";
+ const char * srcErrClass = "Unknown error reported by PRD.";
+
+ if ( PRDF_CODE_FAIL <= i_src.reasonCode() )
+ {
+ codeFailure = true;
+ srcErrType = "PRD Internal Firmware Software Fault";
+ srcErrClass = "Error condition within PRD code";
+ }
+ else
+ {
+ srcErrType = "PRD Detected Hardware Indication";
+ switch ( i_src.reasonCode() )
+ {
+ case PRDF_THERMAL_FAIL:
+ srcErrClass = "Thermal Error Condition";
+ break;
+ case PRDF_DETECTED_FAIL_HARDWARE:
+ srcErrClass = "Hardware Error Detected";
+ break;
+ case PRDF_DETECTED_FAIL_HARDWARE_PROBABLE:
+ srcErrClass = "Hardware Error Detected, small probability of "
+ "software cause";
+ break;
+ case PRDF_DETECTED_FAIL_SOFTWARE_PROBABLE:
+ srcErrClass = "Software likely caused a hardware error "
+ "condition, smaller possibility of a hardware "
+ "cause.";
+ break;
+ case PRDF_DETECTED_FAIL_SOFTWARE:
+ srcErrClass = "Software caused hardware error condition "
+ "detected";
+ break;
+ default:
+ srcErrClass = "Unknown error classification";
+ break;
+ }
+ }
+
+ i_parser.PrintNumber("ModuleId","0x%02X",i_src.moduleId());
+ i_parser.PrintNumber("Reason Code","0x%04X",i_src.reasonCode());
+ i_parser.PrintNumber("Code Location","0x%04X",l_hexData[l_wc-3]);
+ i_parser.PrintBlank();
+ i_parser.PrintString("PRD SRC Type", srcErrType);
+ i_parser.PrintString("PRD SRC Class", srcErrClass);
+ i_parser.PrintBlank();
+
+ if (!codeFailure)
+ {
+
+ snprintf(l_tmpstr, 72, "0x%08X 0x%08X",l_chipId,l_signature );
+ i_parser.PrintString("PRD Signature",l_tmpstr);
+
+ // Get the target type and chip name.
+ TARGETING::TYPE l_targetType = TARGETING::TYPE_NA;
+ char chipName[42];
+ getTargetInfo( l_chipId, l_targetType, &chipName[0], 42 );
+
+ std::string l_descString = GetErrorSigTable()[l_targetType][l_signature];
+ const char * l_description = NULL;
+
+ if (std::string() == l_descString)
+ {
+ for( uint32_t l_idx = 1;
+ g_defaultErrorCodes[l_idx].description != NULL; ++l_idx)
+ {
+ if (l_signature == g_defaultErrorCodes[l_idx].signature)
+ {
+ l_description = g_defaultErrorCodes[l_idx].description;
+ break;
+ }
+ }
+ if (l_description == NULL)
+ {
+ l_description = g_defaultErrorCodes[0].description;
+ }
+ }
+ else
+ {
+ l_description = l_descString.c_str();
+ }
+
+ char l_tmp[MAX_DESC_LEN]; //@jl00 changed this from 100 to const 256.
+ //Changed sprintf to snprintf to stop buffer overruns with long desc.
+ snprintf(l_tmp, MAX_DESC_LEN , "%s %s", chipName, l_description);
+ i_parser.PrintString("Signature Description", l_tmp);
+ }
+
+ return rc;
+}
+
+} //end namespace HOSTBOOT/FSP
+} // end namespace PRDF
+
diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.H b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.H
new file mode 100755
index 000000000..286280efd
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.H
@@ -0,0 +1,67 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfLogParse_common.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef prdfLogParse_common_H
+#define prdfLogParse_common_H
+
+/** @file prdfLogParse_common.H
+ * @brief
+ */
+
+#include <srcisrc.H>
+#include <errlplugins.H>
+#include <errlusrparser.H>
+#include <stdint.h>
+
+namespace PRDF
+{
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+namespace HOSTBOOT
+#else
+namespace FSP
+#endif
+{
+ struct ErrorCodeDescription
+ {
+ uint32_t signature;
+ const char * description;
+ };
+
+ struct RegisterName
+ {
+ uint16_t id;
+ const char * registername;
+ uint32_t address;
+ };
+
+/* SRC data parser */
+bool srcDataParse( ErrlUsrParser & i_parser, const SrciSrc & i_src );
+
+/* Usr data section parser */
+bool logDataParse( ErrlUsrParser & i_parser, void * i_buffer,
+ uint32_t i_buflen, errlver_t i_ver,
+ errlsubsec_t i_sst );
+} // namespace FSP/HOSTBBOT
+} // end namespace PRDF
+
+#endif // prdfLogParse_common_H
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMruData.H b/src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H
index a60e764ca..49dc16dd6 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMruData.H
+++ b/src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfMemoryMruData.H $ */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfMemoryMruData.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPfa5Data.h b/src/usr/diag/prdf/common/plugins/prdfPfa5Data.h
index 2407abd4f..b0264d190 100755..100644
--- a/src/usr/diag/prdf/common/framework/service/prdfPfa5Data.h
+++ b/src/usr/diag/prdf/common/plugins/prdfPfa5Data.h
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/common/framework/service/prdfPfa5Data.h $ */
+/* $Source: src/usr/diag/prdf/common/plugins/prdfPfa5Data.h $ */
/* */
/* IBM CONFIDENTIAL */
/* */
@@ -24,12 +24,13 @@
#if !defined(prdfPfa5Data_h)
#define prdfPfa5Data_h
/**
- @file prdfPfa4Data.h
+ @file prdfPfa5Data.h
@brief Version 5 format of the Pfa Data
*/
#include <iipconst.h>
#include <utilstream.H>
+#include <string.h>
namespace PRDF
{
diff --git a/src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.C b/src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.C
new file mode 100755
index 000000000..76fd8d7ed
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.C
@@ -0,0 +1,48 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2005,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#include <prdrErrlPluginsSupt.H>
+
+namespace PRDF
+{
+
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+namespace HOSTBOOT
+#else
+namespace FSP
+#endif
+{
+PrdrRegIdTable & GetRegisterIdTable()
+{
+ static PrdrRegIdTable l_idTable = PrdrRegIdTable();
+ return l_idTable;
+}
+
+PrdrErrSigTable & GetErrorSigTable()
+{
+ static PrdrErrSigTable l_sigTable = PrdrErrSigTable();
+ return l_sigTable;
+}
+
+} // namespace FSP/HOSTBBOT
+} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.H b/src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.H
new file mode 100755
index 000000000..4b9bf048d
--- /dev/null
+++ b/src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.H
@@ -0,0 +1,174 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/common/plugins/prdrErrlPluginsSupt.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2005,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#ifndef __PRDRERRLPLUGINSUPT_H
+#define __PRDRERRLPLUGINSUPT_H
+
+#define __PRDR_PLUGIN_HOMTYPE 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)
+
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+#define PRDF_ERRL_PLAT_NS namespace HOSTBOOT
+#else
+#define PRDF_ERRL_PLAT_NS namespace FSP
+#endif
+
+#ifndef PRDR_ERROR_SIGNATURE_TABLE_START
+ #define PRDR_ERROR_SIGNATURE_TABLE_START( homtype, offset) \
+ namespace PRDF \
+ {\
+ PRDF_ERRL_PLAT_NS \
+ { \
+ 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_HOMTYPE l_homtype = homtype; \
+ __table_struct * l_tablePtr = cv_table; \
+ while (NULL != l_tablePtr->name) \
+ { \
+ GetErrorSigTable()[l_homtype][l_tablePtr->signature] = \
+ "(" + std::string(l_tablePtr->name) + ") " + \
+ std::string(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
+
+#ifndef PRDR_REGISTER_ID_TABLE_START
+ #define PRDR_REGISTER_ID_TABLE_START( homtype, offset) \
+ namespace PRDF \
+ { \
+ PRDF_ERRL_PLAT_NS \
+ { \
+ class __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, homtype, offset)\
+ { \
+ public: \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, \
+ homtype, offset)(); \
+ private: \
+ struct __table_struct \
+ { \
+ uint32_t id; \
+ const char * name; \
+ const char * brief; \
+ uint64_t address; \
+ }; \
+ static __table_struct cv_table[]; \
+ }; \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, homtype, offset) \
+ __PRDR_PLUGIN_MAKENAME(g_PrdrPlugin_RegTable_Reg_, homtype, offset);\
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, homtype, offset)::\
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, homtype, offset)() \
+ { \
+ __PRDR_PLUGIN_HOMTYPE l_homtype = homtype; \
+ __table_struct * l_tablePtr = cv_table; \
+ while (NULL != l_tablePtr->name) \
+ { \
+ GetRegisterIdTable()[l_homtype][l_tablePtr->id].name = \
+ std::string(l_tablePtr->name); \
+ GetRegisterIdTable()[l_homtype][l_tablePtr->id].addr = \
+ l_tablePtr->address; \
+ l_tablePtr++; \
+ } \
+ } \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, homtype, offset):: \
+ __table_struct \
+ __PRDR_PLUGIN_MAKENAME(PrdrPlugin_RegTable_Reg_, homtype, offset):: \
+ cv_table[] = \
+ {
+
+ #define PRDR_REGISTER_ID( id , name, brief, address ) \
+ { id , #name , brief, address } ,
+
+ #define PRDR_REGISTER_ID_TABLE_END \
+ { 0, NULL, NULL, 0 } \
+ }; \
+ } \
+ } // end namespace PRDF
+#endif
+
+#include <map>
+#include <string>
+#include <stdint.h>
+
+namespace PRDF
+{
+#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
+namespace HOSTBOOT
+#else
+namespace FSP
+#endif
+{
+
+typedef std::map<__PRDR_PLUGIN_IDTYPE, std::string> PrdrErrSigEntries;
+typedef std::map<__PRDR_PLUGIN_HOMTYPE, PrdrErrSigEntries> PrdrErrSigTable;
+
+struct RegIdStruct
+{
+ std::string name;
+ uint64_t addr;
+};
+
+typedef std::map<__PRDR_PLUGIN_IDTYPE, RegIdStruct> PrdrRegIdEntries;
+typedef std::map<__PRDR_PLUGIN_HOMTYPE, PrdrRegIdEntries> PrdrRegIdTable;
+
+PrdrRegIdTable & GetRegisterIdTable();
+PrdrErrSigTable & GetErrorSigTable();
+
+} // namespace FSP/HOSTBBOT
+} // end namespace PRDF
+
+#endif
diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C
index 2a3b8480a..48fc3f45a 100755
--- a/src/usr/diag/prdf/common/prdfMain_common.C
+++ b/src/usr/diag/prdf/common/prdfMain_common.C
@@ -245,7 +245,7 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType,
serviceData.SetServiceCall();
// mk438901 a We don't want to gard unless we have a good
// return code
- serviceData.Gard(GardResolution::NoGard);
+ serviceData.Gard(GardAction::NoGard);
}
}
}
@@ -260,7 +260,7 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_attentionType,
g_prd_errlHndl = NULL;
// pw 597903 -- Don't GARD if we got a global error.
- serviceData.Gard(GardResolution::NoGard);
+ serviceData.Gard(GardAction::NoGard);
}
g_prd_errlHndl = serviceGenerator.GenerateSrcPfa( i_attentionType,
diff --git a/src/usr/diag/prdf/framework/rule/makefile b/src/usr/diag/prdf/framework/rule/makefile
index 1db208551..774e3979d 100755
--- a/src/usr/diag/prdf/framework/rule/makefile
+++ b/src/usr/diag/prdf/framework/rule/makefile
@@ -21,17 +21,29 @@
#
# IBM_PROLOG_END_TAG
+# Relative path to root from this makefile
ROOTPATH = ../../../../../..
-RULEOBJDIR = ${ROOTPATH}/obj/modules/prdf/rule
+# Relative path to root from OBJ_RULE
+OBJ_PLUG_LINK_PATH = ../../../..
-PRD_USR_PATH = ${ROOTPATH}/src/usr/diag/prdf
+OBJ_RULE = obj/modules/prdf/rule
+OBJ_PLUG = obj/genfiles/plugins/prdf
+SRC_USR = src/usr/diag/prdf
+SRC_INC = src/include/usr/diag/prdf
-VPATH = ${PRD_USR_PATH}/common/framework/rule
+OBJ_RULE_DIR = ${ROOTPATH}/${OBJ_RULE}
+OBJ_PLUG_DIR = ${ROOTPATH}/${OBJ_PLUG}
+SRC_USR_DIR = ${ROOTPATH}/${SRC_USR}
+
+OBJ_RULE_LINK_DIR = ${OBJ_PLUG_LINK_PATH}/${OBJ_RULE}
+
+VPATH = ${SRC_USR_DIR}/common/framework/rule
#------------------------------------------------------------------------------
# Generated files
#------------------------------------------------------------------------------
+
PRDR_CMP = prdrCompile
PRDR_CMP_o = ${PRDR_CMP}.o
PRDR_CMP_C = ${PRDR_CMP}.C
@@ -45,51 +57,99 @@ PRDR_CMP_FLEX = ${PRDR_CMP}.lex
PRDR_CMP_FLEX_o = ${PRDR_CMP_FLEX}.o
PRDR_CMP_FLEX_C = ${PRDR_CMP_FLEX}.C
-PRDR_CMP_PATH = ${RULEOBJDIR}/${PRDR_CMP}
-PRDR_CMP_o_PATH = ${RULEOBJDIR}/${PRDR_CMP_o}
+PRDR_CMP_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP}
+PRDR_CMP_o_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_o}
-PRDR_CMP_YACC_o_PATH = ${RULEOBJDIR}/${PRDR_CMP_YACC_o}
-PRDR_CMP_YACC_C_PATH = ${RULEOBJDIR}/${PRDR_CMP_YACC_C}
-PRDR_CMP_YACC_H_PATH = ${RULEOBJDIR}/${PRDR_CMP_YACC_H}
+PRDR_CMP_YACC_o_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_YACC_o}
+PRDR_CMP_YACC_C_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_YACC_C}
+PRDR_CMP_YACC_H_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_YACC_H}
-PRDR_CMP_FLEX_o_PATH = ${RULEOBJDIR}/${PRDR_CMP_FLEX_o}
-PRDR_CMP_FLEX_C_PATH = ${RULEOBJDIR}/${PRDR_CMP_FLEX_C}
+PRDR_CMP_FLEX_o_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_FLEX_o}
+PRDR_CMP_FLEX_C_PATH = ${OBJ_RULE_DIR}/${PRDR_CMP_FLEX_C}
include ../../common/prd_ruletable.mk # for PRDR_RULE_TABLE_TARGETS
+ERR_PLUGIN_TARGETS = ${PRDR_RULE_TABLE_FILES:.rule=.prf.err.C}
+REG_PLUGIN_TARGETS = ${PRDR_RULE_TABLE_FILES:.rule=.prf.reg.C}
+HTML_PLUGIN_TARGETS = ${PRDR_RULE_TABLE_FILES:.rule=.prf.html}
+
+PRF_IMG_PATHS = $(addprefix ${IMGDIR}/, ${PRDR_RULE_TABLE_TARGETS})
+ERR_PLUGIN_PATHS = $(addprefix ${OBJ_PLUG_DIR}/, ${ERR_PLUGIN_TARGETS})
+REG_PLUGIN_PATHS = $(addprefix ${OBJ_PLUG_DIR}/, ${REG_PLUGIN_TARGETS})
+
#-------------------------------------------------------------------------------
-# code_pass
+# Files linked to the error log plugins directory
#-------------------------------------------------------------------------------
-# Build the .prf image files
-EXTRA_PARTS = $(addprefix ${IMGDIR}/, ${PRDR_RULE_TABLE_TARGETS})
+# Entire directories to link.
+SOURCE_PLUGIN_DIRS = \
+ ${SRC_USR}/common/plugins \
+ ${SRC_USR}/plugins
+
+# Individual source files to link.
+SOURCE_PLUGIN_FILES = \
+ ${SRC_USR}/common/framework/rule/tables.mk \
+ ${SRC_USR}/common/util/UtilHash.H \
+ ${SRC_USR}/common/plat/pegasus/prdfCenConst.H \
+ ${SRC_USR}/common/iipconst.h \
+ ${SRC_USR}/common/prdf_types.h \
+ ${SRC_INC}/common/prdf_service_codes.H \
+ $(foreach d, ${SOURCE_PLUGIN_DIRS}, \
+ $(addprefix $(d)/, $(notdir $(wildcard ${ROOTPATH}/$(d)/*))))
+
+LINK_PLUGIN_FILES = \
+ $(addprefix ${OBJ_PLUG_DIR}/,$(notdir ${SOURCE_PLUGIN_FILES}))
-# Clean up the auto generate source files
-CLEAN_TARGETS += ${PRDR_CMP_PATH} \
- ${PRDR_CMP_o_PATH} \
- ${PRDR_CMP_YACC_o_PATH} \
- ${PRDR_CMP_YACC_C_PATH} \
- ${PRDR_CMP_YACC_H_PATH} \
- ${PRDR_CMP_FLEX_o_PATH} \
- ${PRDR_CMP_FLEX_C_PATH} \
- $(addprefix ${RULEOBJDIR}/, ${PRDR_RULE_TABLE_TARGETS})
+#-------------------------------------------------------------------------------
+# CODE_PASS
+#-------------------------------------------------------------------------------
+
+CODE_PASS_BODY += \
+ ${PRF_IMG_PATHS} ${ERR_PLUGIN_PATHS} ${REG_PLUGIN_PATHS} \
+ ${LINK_PLUGIN_FILES}
+
+CLEAN_TARGETS += \
+ ${PRDR_CMP_PATH} ${PRDR_CMP_o_PATH} \
+ ${PRDR_CMP_YACC_o_PATH} ${PRDR_CMP_YACC_C_PATH} \
+ ${PRDR_CMP_YACC_H_PATH} ${PRDR_CMP_FLEX_o_PATH} ${PRDR_CMP_FLEX_C_PATH} \
+ $(addprefix ${OBJ_RULE_DIR}/, ${PRDR_RULE_TABLE_TARGETS}) \
+ $(addprefix ${OBJ_RULE_DIR}/, ${ERR_PLUGIN_TARGETS}) \
+ $(addprefix ${OBJ_RULE_DIR}/, ${REG_PLUGIN_TARGETS}) \
+ $(addprefix ${OBJ_RULE_DIR}/, ${HTML_PLUGIN_TARGETS}) \
+ ${PRF_IMG_PATHS} ${ERR_PLUGIN_PATHS} ${REG_PLUGIN_PATHS} \
+ ${LINK_PLUGIN_FILES}
# NOTE: All rules defined in this makefile must be done after this line
# otherwise the default rule 'all' will not be called.
include ${ROOTPATH}/config.mk
+# Special recipes to make the output less chatty
+PRD_OUT_MAKE = $(C2) " MAKE $(notdir $@)"
+PRD_OUT_LINK = $(C2) " LINK $(notdir $@)"
+
+#-------------------------------------------------------------------------------
+# Rules for directories that may not exist.
+#-------------------------------------------------------------------------------
+
+${OBJ_RULE_DIR}:
+ $(C1)mkdir -p ${OBJ_RULE_DIR}
+
+${OBJ_PLUG_DIR}:
+ $(C1)mkdir -p ${OBJ_PLUG_DIR}
+
#-------------------------------------------------------------------------------
# Build the flex/yacc source code
#-------------------------------------------------------------------------------
-${PRDR_CMP_YACC_C_PATH} ${PRDR_CMP_YACC_H_PATH}: ${PRDR_CMP_YACC}
- mkdir -p ${RULEOBJDIR}
- bison -d -o ${PRDR_CMP_YACC_C_PATH} $^
+${PRDR_CMP_YACC_C_PATH} \
+${PRDR_CMP_YACC_H_PATH}: ${PRDR_CMP_YACC} | ${OBJ_RULE_DIR}
+ ${PRD_OUT_MAKE}
+ $(C1)bison -d -o ${PRDR_CMP_YACC_C_PATH} $^
PRDR_CMP_FLEX: ; # Discard implicit rule for %.lex <- %.lex.C
-${PRDR_CMP_FLEX_C_PATH}: ${PRDR_CMP_FLEX}
- mkdir -p ${RULEOBJDIR}
- flex -o$@ $^
+${PRDR_CMP_FLEX_C_PATH}: ${PRDR_CMP_FLEX} | ${OBJ_RULE_DIR}
+ ${PRD_OUT_MAKE}
+ $(C1)flex -o$@ $^
#------------------------------------------------------------------------------
# Build the PRD rule compiler
@@ -98,47 +158,71 @@ ${PRDR_CMP_FLEX_C_PATH}: ${PRDR_CMP_FLEX}
USERDEFINES = -D__HOSTBOOT_MODULE -O3 -pipe
${PRDR_CMP_YACC_o_PATH}: ${PRDR_CMP_YACC_C_PATH} ${PRDR_CMP_YACC_H_PATH}
- $(CCACHE) $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \
- -I ${PRD_USR_PATH}/common/framework/rule \
- -I ${PRD_USR_PATH}/common/util -I ${RULEOBJDIR} \
+ ${PRD_OUT_MAKE}
+ $(C1)$(CCACHE) $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \
+ -I ${SRC_USR_DIR}/common/framework/rule \
+ -I ${SRC_USR_DIR}/common/util -I ${OBJ_RULE_DIR} \
-o $@
${PRDR_CMP_FLEX_o_PATH}: ${PRDR_CMP_FLEX_C_PATH} ${PRDR_CMP_YACC_H_PATH}
- $(CCACHE) $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \
- -I ${PRD_USR_PATH}/common/framework/rule \
- -I ${PRD_USR_PATH}/common/util -I ${RULEOBJDIR} \
+ ${PRD_OUT_MAKE}
+ $(C1)$(CCACHE) $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \
+ -I ${SRC_USR_DIR}/common/framework/rule \
+ -I ${SRC_USR_DIR}/common/util -I ${OBJ_RULE_DIR} \
-o $@
-${PRDR_CMP_o_PATH}: ${PRDR_CMP_C}
- mkdir -p ${RULEOBJDIR}
- $(CCACHE) $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \
- -I ${PRD_USR_PATH}/common/framework/rule \
- -I ${PRD_USR_PATH}/common \
- -I ${PRD_USR_PATH}/common/util \
- -I ${GENDIR} -I ${RULEOBJDIR} \
- -I ${PRD_USR_PATH}/common/framework/resolution \
- -I ${PRD_USR_PATH}/common/framework/service \
+${PRDR_CMP_o_PATH}: ${PRDR_CMP_C} | ${OBJ_RULE_DIR}
+ ${PRD_OUT_MAKE}
+ $(C1)$(CCACHE) $(HOST_PREFIX)g++ -c $(USERDEFINES) $< \
+ -I ${SRC_USR_DIR}/common/framework/rule \
+ -I ${SRC_USR_DIR}/common \
+ -I ${SRC_USR_DIR}/common/plugins \
+ -I ${SRC_USR_DIR}/common/util \
+ -I ${GENDIR} -I ${OBJ_RULE_DIR} \
+ -I ${SRC_USR_DIR}/common/framework/resolution \
+ -I ${SRC_USR_DIR}/common/framework/service \
-o $@
${PRDR_CMP_PATH}: ${PRDR_CMP_YACC_o_PATH} ${PRDR_CMP_FLEX_o_PATH} \
${PRDR_CMP_o_PATH}
- $(HOST_PREFIX)g++ $(USERDEFINES) \
+ ${PRD_OUT_MAKE}
+ $(C1)$(HOST_PREFIX)g++ $(USERDEFINES) \
${PRDR_CMP_YACC_o_PATH} ${PRDR_CMP_FLEX_o_PATH} ${PRDR_CMP_o_PATH} \
-o $@
#------------------------------------------------------------------------------
-# Build the .prf files
+# Build the *.prf, *.err.C, and *.reg.C files
#------------------------------------------------------------------------------
vpath %.rule ../../common/plat/pegasus
PRDRPP_SEARCHDIRS = -I../../common/plat/pegasus
-# Build .prf files from .rule files and store them in ${RULEOBJDIR}
-${RULEOBJDIR}/%.prf : %.rule ${PRDR_CMP_PATH}
- cat $< | ${PRD_USR_PATH}/common/framework/rule/prdrpp ${PRDRPP_SEARCHDIRS} \
- | $(HOST_PREFIX)jail ${PRDR_CMP_PATH} $@
+${OBJ_RULE_DIR}/%.prf \
+${OBJ_RULE_DIR}/%.prf.err.C \
+${OBJ_RULE_DIR}/%.prf.reg.C : %.rule ${PRDR_CMP_PATH}
+ ${PRD_OUT_MAKE}
+ $(C1)cat $< | ${SRC_USR_DIR}/common/framework/rule/prdrpp \
+ ${PRDRPP_SEARCHDIRS} | $(HOST_PREFIX)jail ${PRDR_CMP_PATH} $@
+
+# Copy all .prf files from ${OBJ_RULE_DIR} to ${IMGDIR}
+${PRF_IMG_PATHS}: ${IMGDIR}/% : ${OBJ_RULE_DIR}/%
+ $(C1)cp -f $^ $@
+
+#------------------------------------------------------------------------------
+# Link the necessary files to the plugins directory
+#------------------------------------------------------------------------------
-# Copy all .prf files from ${RULEOBJDIR} to ${IMGDIR}
-${EXTRA_PARTS}: ${IMGDIR}/% : ${RULEOBJDIR}/%
- cp -f $^ $@
+# Link all .prf.err.C and .prf.reg.C files from OBJ_RULE_DIR to OBJ_PLUG_DIR
+${ERR_PLUGIN_PATHS} \
+${REG_PLUGIN_PATHS}: ${OBJ_PLUG_DIR}/% : ${OBJ_RULE_DIR}/% | ${OBJ_PLUG_DIR}
+ ${PRD_OUT_LINK}
+ $(C1)ln -sf ${OBJ_RULE_LINK_DIR}/$(notdir $^) $@
+
+# Link all individual header file needed to compile plugin code.
+define LINK_RULE
+${OBJ_PLUG_DIR}/$(notdir $(1)): $(ROOTPATH)/$(1)
+ $(C2) " LINK $$(notdir $$@)"
+ $(C1)ln -sf ${OBJ_PLUG_LINK_PATH}/$(1) $$@
+endef
+$(foreach file,${SOURCE_PLUGIN_FILES}, $(eval $(call LINK_RULE,$(file))))
diff --git a/src/usr/diag/prdf/makefile b/src/usr/diag/prdf/makefile
index c43c92f17..35f3d7180 100755
--- a/src/usr/diag/prdf/makefile
+++ b/src/usr/diag/prdf/makefile
@@ -66,6 +66,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf/common
EXTRAINCDIR += ${PRD_USR_PATH}
EXTRAINCDIR += ${PRD_USR_PATH}/common
+EXTRAINCDIR += ${PRD_USR_PATH}/common/plugins
EXTRAINCDIR += ${PRD_USR_PATH}/common/util
EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/service
EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/register
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
index 1632d8b96..3f9e54d94 100644
--- a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
+++ b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
@@ -63,7 +63,7 @@ int32_t PllPostAnalysis( ExtensibleChip * i_cenChip,
{
// Check to make sure we are at threshold and have something garded.
if ( !i_sc.service_data->IsAtThreshold() ||
- (GardResolution::NoGard == i_sc.service_data->QueryGard()) )
+ (GardAction::NoGard == i_sc.service_data->QueryGard()) )
{
break; // nothing to do
}
diff --git a/src/usr/diag/prdf/plugins/makefile b/src/usr/diag/prdf/plugins/makefile
new file mode 100644
index 000000000..955eeca17
--- /dev/null
+++ b/src/usr/diag/prdf/plugins/makefile
@@ -0,0 +1,37 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/diag/prdf/plugins/makefile $
+#
+# IBM CONFIDENTIAL
+#
+# COPYRIGHT International Business Machines Corp. 2004,2013
+#
+# p1
+#
+# Object Code Only (OCO) source materials
+# Licensed Internal Code Source Materials
+# IBM HostBoot Licensed Internal Code
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# Origin: 30
+#
+# IBM_PROLOG_END_TAG
+
+
+INCFLAGS += -I. -I.. \
+
+CFLAGS += -D PRDF_HOSTBOOT_ERRL_PLUGIN
+
+# This variable will be used in plugins.mk to generate
+# library names.
+BASE_LIB_NAME = B-E500
+
+.include "tables.mk"
+.include "plugins.mk"
+
+.include <${RULES_MK}>
+
diff --git a/src/usr/diag/prdf/plugins/prdfLogParse.C b/src/usr/diag/prdf/plugins/prdfLogParse.C
new file mode 100644
index 000000000..3662e196f
--- /dev/null
+++ b/src/usr/diag/prdf/plugins/prdfLogParse.C
@@ -0,0 +1,44 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/plugins/prdfLogParse.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2003,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/** @file prdfLogParse.C
+ * @brief Hostboot error log plugin parser
+ */
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <prdfLogParse_common.H>
+
+//------------------------------------------------------------------------------
+
+// Parser plugins
+
+static errl::SrcPlugin g_SrcPlugin( PRDF_COMP_ID,
+ PRDF::HOSTBOOT::srcDataParse,
+ ERRL_CID_HOSTBOOT);
+static errl::DataPlugin g_DataPlugin( PRDF_COMP_ID,
+ PRDF::HOSTBOOT::logDataParse,
+ ERRL_CID_HOSTBOOT);
+
diff --git a/src/usr/diag/prdf/test/makefile b/src/usr/diag/prdf/test/makefile
index 787549339..6ce8b66a2 100755
--- a/src/usr/diag/prdf/test/makefile
+++ b/src/usr/diag/prdf/test/makefile
@@ -34,6 +34,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/diag/prdf/common
EXTRAINCDIR += ${PRD_USR_PATH}
EXTRAINCDIR += ${PRD_USR_PATH}/common
+EXTRAINCDIR += ${PRD_USR_PATH}/common/plugins
EXTRAINCDIR += ${PRD_USR_PATH}/common/util
EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/service
EXTRAINCDIR += ${PRD_USR_PATH}/common/framework/register
OpenPOWER on IntegriCloud