From a92b4603d7a0e642c0e8801e264434b41a9d1426 Mon Sep 17 00:00:00 2001 From: spashabk-in Date: Thu, 22 Jun 2017 07:27:05 -0500 Subject: Adding a static method to get scom failure address Added a static method 'SBE_SCOM_FAILURE::get_address' to fetch scom failure address from SBE HWP ffdc data blob Change-Id: Iec5fc6c5eb8e1ad4dbb51805b8b6d4b2d7e5ecbd Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42275 Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Santosh S. Puranik Reviewed-by: Sachin Gupta Reviewed-by: Prachi Gupta Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42281 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Dean Sanner --- src/import/hwpf/fapi2/tools/parseErrorInfo.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/import/hwpf') diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl index ffdb4dbb0..fb6f17548 100755 --- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl @@ -64,6 +64,7 @@ my $buffer_ffdc_type = "fapi2::buffer"; my $variable_buffer_ffdc_type = "fapi2::variable_buffer"; my $ffdc_type = "fapi2::ffdc_t"; my $mcast_type = "fapi2::mcast_t"; +my $scom_addr_type = "uint64_t"; my $ffdc_count = 0; # There are some names used in the XML files which exist in either @@ -372,6 +373,14 @@ sub addFfdcMethod $methods->{$objectNumber}{localvar} = "$ffdc_type $ffdc_uc = getFfdcData(FFDC_BUFFER[$objectNumber]);"; $methods->{$objectNumber}{assignment_string} = "l_obj.$ffdc_uc=$ffdc_uc;"; } + elsif ( $type eq $scom_addr_type ) + { + if ( $arg_local_ffdc eq undef ) + { + $method = "\n static $type $ffdc_uc(const sbeFfdc_t *ffdc)\n"; + $method_body = " {\n return ffdc[$objectNumber].data;\n }\n\n"; + } + } else { $method .= " inline $class_name& set_$ffdc_uc($type $param)\n"; @@ -910,6 +919,9 @@ foreach my $argnum ( 0 .. $#ARGV ) $eiEntryStr .= "\tl_entries[$eiEntryCount].ffdc.iv_ffdcObjIndex = $objNum; \\\n"; $eiEntryStr .= "\tl_entries[$eiEntryCount].ffdc.iv_ffdcId = fapi2::$ffdcName; \\\n"; $eiEntryStr .= "\tl_entries[$eiEntryCount].ffdc.iv_ffdcSize = 8; \\\n"; + + # Add a static method to get address from ffdc blob + addFfdcMethod( \%methods, "get_address", $err->{rc}, $scom_addr_type, $eiEntryCount ); $eiEntryCount++; # Set the FFDC ID value in a global hash. The name is _pib_error -- cgit v1.2.1