diff options
author | Bill Schwartz <whs@us.ibm.com> | 2014-03-10 20:05:03 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-03-20 15:29:01 -0500 |
commit | 7d87c86e14ad803bb295bc4e3e97e42cce20fd08 (patch) | |
tree | fc8be61bdf6d445b16f3991c5b67a54ef9dbb97c /src/usr/hwpf | |
parent | 6c6ededed27870f024c4e46fecfcdd2b477d30ee (diff) | |
download | talos-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')
-rw-r--r-- | src/usr/hwpf/fapi/fapiErrorInfo.C | 12 | ||||
-rwxr-xr-x | src/usr/hwpf/fapi/fapiParseErrorInfo.pl | 16 | ||||
-rw-r--r-- | src/usr/hwpf/fapi/fapiReturnCode.C | 22 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/fapiHwpErrorInfo.xml | 12 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/fapiTestHwpError.C | 10 |
5 files changed, 65 insertions, 7 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); +} + } diff --git a/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml b/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml index 4de66539f..79b367fac 100644 --- a/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml +++ b/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml @@ -20,7 +20,7 @@ <!-- Origin: 30 --> <!-- --> <!-- IBM_PROLOG_END_TAG --> -<!-- $Id: fapiHwpErrorInfo.xml,v 1.14 2013/10/31 19:49:04 dedahle Exp $ --> +<!-- $Id: fapiHwpErrorInfo.xml,v 1.15 2014/03/12 00:49:03 whs Exp $ --> <!-- XML file specifying Test HW Procedure generated errors. --> <hwpErrors> @@ -345,4 +345,14 @@ <ffdc>FFDC_ROW</ffdc> </hwpError> <!-- ************************************************************ --> + <hwpError> + <rc>RC_TEST_COLLECT_TRACE</rc> + <description>Test adding firmware traces</description> + <ffdc>FFDC_VALUE</ffdc> + <collectTrace>FSI</collectTrace> + <collectTrace>SCOM</collectTrace> + <collectTrace>SCAN</collectTrace> + <collectTrace>MBOX</collectTrace> + </hwpError> + <!-- ************************************************************ --> </hwpErrors> diff --git a/src/usr/hwpf/hwp/fapiTestHwpError.C b/src/usr/hwpf/hwp/fapiTestHwpError.C index e5df32461..93cf17851 100644 --- a/src/usr/hwpf/hwp/fapiTestHwpError.C +++ b/src/usr/hwpf/hwp/fapiTestHwpError.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -38,6 +38,7 @@ * mjjones 10/17/2011 Moved AnalyzeError to new file * rjknight 09/28/2013 Added callout test for MBA * dimm callout support + * whs 03/11/2014 Add FW traces to error logs * * * HWP_IGNORE_VERSION_CHECK @@ -58,6 +59,13 @@ fapi::ReturnCode hwpTestError(const fapi::Target & i_procTarget, fapi::ReturnCode l_rc; + // Test ability for FAPI to request FW traces added to error log + FAPI_ERR("hwpTestError: Generating RC_TEST_COLLECT_TRACE"); + uint32_t FFDC_VALUE = 0xBEF2; + FAPI_SET_HWP_ERROR(l_rc, RC_TEST_COLLECT_TRACE); + // Log the error + fapiLogError(l_rc, fapi::FAPI_ERRL_SEV_PREDICTIVE, true); + // Local data that needs to be captured as FFDC uint32_t l_ffdc = 0x12345678; ecmdDataBufferBase l_buf(65); |