summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/fapi
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2014-03-10 20:05:03 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-20 15:29:01 -0500
commit7d87c86e14ad803bb295bc4e3e97e42cce20fd08 (patch)
treefc8be61bdf6d445b16f3991c5b67a54ef9dbb97c /src/usr/hwpf/fapi
parent6c6ededed27870f024c4e46fecfcdd2b477d30ee (diff)
downloadtalos-hostboot-7d87c86e14ad803bb295bc4e3e97e42cce20fd08.tar.gz
talos-hostboot-7d87c86e14ad803bb295bc4e3e97e42cce20fd08.zip
Ability for FAPI to request FW traces added to error log
Trace buffer IDs are requested through <collectTrace>TRACE_ID</collectTrace> on the FAPI RC. Trace buffer IDs are 'generic' to provide flexibility for the platform to map to specific traces. The colllected trace is limited to a maximum size via a constant. FSP common FAPI files and platform specific code will be updated after initial host boot review. Change-Id: Iabb2ce584cfd76225f84a0617562dbd6d504c70f RTC: 98649 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9464 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/fapi')
-rw-r--r--src/usr/hwpf/fapi/fapiErrorInfo.C12
-rwxr-xr-xsrc/usr/hwpf/fapi/fapiParseErrorInfo.pl16
-rw-r--r--src/usr/hwpf/fapi/fapiReturnCode.C22
3 files changed, 45 insertions, 5 deletions
diff --git a/src/usr/hwpf/fapi/fapiErrorInfo.C b/src/usr/hwpf/fapi/fapiErrorInfo.C
index b72534012..30dd3f066 100644
--- a/src/usr/hwpf/fapi/fapiErrorInfo.C
+++ b/src/usr/hwpf/fapi/fapiErrorInfo.C
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiErrorInfo.C,v 1.11 2013/11/11 19:33:45 mjjones Exp $
+// $Id: fapiErrorInfo.C,v 1.12 2014/03/12 00:48:05 whs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.C,v $
/**
@@ -47,6 +47,7 @@
* mjjones 08/26/2013 Support HW Callouts
* rjknight 09/24/2013 Support dimm callouts
* based on mba parent target
+ * whs 03/11/2014 Add FW traces to error logs
*/
#include <fapiErrorInfo.H>
@@ -262,6 +263,15 @@ ErrorInfoChildrenCDG::ErrorInfoChildrenCDG(
}
//******************************************************************************
+// ErrorInfoCollectTrace Constructor
+//******************************************************************************
+ErrorInfoCollectTrace::ErrorInfoCollectTrace(
+ const CollectTraces::CollectTrace i_traceId)
+: iv_eiTraceId(i_traceId)
+{
+}
+
+//******************************************************************************
// ErrorInfoChildrenCDG new Operator Overload
//******************************************************************************
#ifdef FAPI_CUSTOM_MALLOC
diff --git a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
index 294c2f708..b544251b2 100755
--- a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
+++ b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
@@ -6,7 +6,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2013
+# COPYRIGHT International Business Machines Corp. 2011,2014
#
# p1
#
@@ -21,7 +21,7 @@
# Origin: 30
#
# IBM_PROLOG_END_TAG
-# $Id: fapiParseErrorInfo.pl,v 1.25 2013/10/31 21:34:01 dedahle Exp $
+# $Id: fapiParseErrorInfo.pl,v 1.26 2014/03/12 00:48:41 whs Exp $
# Purpose: This perl script will parse HWP Error XML files and create required
# FAPI code.
#
@@ -63,6 +63,7 @@
# DIMM(s) related to MBA
# dedahle 10/15/13 Support register FFDC collection based on
# present children
+# whs 03/11/14 Add FW traces to error logs
#
# End Change Log *****************************************************
#
@@ -356,7 +357,7 @@ foreach my $argnum (1 .. $#ARGV)
my $errors = $xml->XMLin($infile, ForceArray =>
['hwpError', 'collectFfdc', 'ffdc', 'callout', 'deconfigure', 'gard',
'registerFfdc', 'collectRegisterFfdc', 'cfamRegister', 'scomRegister',
- 'id']);
+ 'id','collectTrace']);
# Uncomment to get debug output of all errors
#print "\nFile: ", $infile, "\n", Dumper($errors), "\n";
@@ -505,6 +506,15 @@ foreach my $argnum (1 .. $#ARGV)
my %cdgTargetHash; # Records the callout/deconfigure/gards for Targets
my %cdgChildHash; # Records the callout/deconfigure/gards for Children
+ # collect firmware trace
+ foreach my $collectTrace (@{$err->{collectTrace}})
+ {
+ # Add an EI entry to eiEntryStr
+ $eiEntryStr .= " l_entries[$eiEntryCount].iv_type = fapi::ReturnCode::EI_TYPE_COLLECT_TRACE; \\\n";
+ $eiEntryStr .= " l_entries[$eiEntryCount].collect_trace.iv_eieTraceId = fapi::CollectTraces::$collectTrace; \\\n";
+ $eiEntryCount++;
+ }
+
# Local FFDC
foreach my $ffdc (@{$err->{ffdc}})
{
diff --git a/src/usr/hwpf/fapi/fapiReturnCode.C b/src/usr/hwpf/fapi/fapiReturnCode.C
index a40f02b9f..3165af44b 100644
--- a/src/usr/hwpf/fapi/fapiReturnCode.C
+++ b/src/usr/hwpf/fapi/fapiReturnCode.C
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiReturnCode.C,v 1.18 2013/11/11 19:33:34 mjjones Exp $
+// $Id: fapiReturnCode.C,v 1.19 2014/03/12 00:48:21 whs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.C,v $
/**
@@ -56,6 +56,7 @@
* mjjones 05/20/2013 Support Bus Callouts
* mjjones 06/24/2013 Support Children CDGs
* mjjones 08/26/2013 Support HW Callouts
+ * whs 03/11/2014 Add FW traces to error logs
*/
#include <fapiReturnCode.H>
@@ -385,6 +386,13 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects,
addEIChildrenCdg(*l_pParent, l_childType, l_callout, l_deconf,
l_gard, l_pri, l_childPort, l_childNumber );
}
+ else if (l_type == EI_TYPE_COLLECT_TRACE)
+ {
+ CollectTraces::CollectTrace l_traceId =
+ static_cast<CollectTraces::CollectTrace>
+ (i_pEntries[i].collect_trace.iv_eieTraceId);
+ addEICollectTrace(l_traceId);
+ }
else
{
FAPI_ERR("addErrorInfo: Unrecognized EI type: %d", l_type);
@@ -556,4 +564,16 @@ void ReturnCode::addEIChildrenCdg(
iv_childrenCDGs.push_back(l_pCdg);
}
+//******************************************************************************
+// addEICollectTrace function
+//******************************************************************************
+void ReturnCode::addEICollectTrace(
+ const CollectTraces::CollectTrace i_traceId)
+{
+ // Create an ErrorInfoCollectTrace object and add it to Error Information
+ ErrorInfoCollectTrace * l_pCT = new ErrorInfoCollectTrace(i_traceId);
+ getCreateReturnCodeDataRef().getCreateErrorInfo().
+ iv_traces.push_back(l_pCT);
+}
+
}
OpenPOWER on IntegriCloud