From 5dcf85e218314925e56cc133eeaec1c70ca687db Mon Sep 17 00:00:00 2001 From: "Richard J. Knight" Date: Thu, 8 Sep 2016 21:43:41 -0500 Subject: Update parser handling of collectFfdc error xml tags -Removed requirement for adding function signature to parser -Changed ffdc function argument types to fapi2::ffdc_t for all parms, type information is lost in ffdc class and fifo transfer from the sbe. Change-Id: If0f39a41ea6c1eb05bb6d1ae193c28c3dc77068f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29473 Tested-by: PPE CI Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Christian R. Geddes Reviewed-by: Daniel M. Crowell Reviewed-by: Sachin Gupta Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29815 Reviewed-by: Hostboot Team Tested-by: FSP CI Jenkins --- src/import/hwpf/fapi2/tools/parseErrorInfo.pl | 36 +++++++++++---------------- 1 file changed, 14 insertions(+), 22 deletions(-) (limited to 'src/import/hwpf/fapi2/tools') diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl index 1237dbe4e..d9061aa0a 100755 --- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl @@ -32,7 +32,7 @@ # *HWP FW Owner: Thi Tran # *HWP Team: N/A # *HWP Level: 1 -# *HWP Consumed by: HB +# *HWP Consumed by: HB/SBE/FSP # # Usage: # parseErrorInfo.pl ... @@ -65,17 +65,6 @@ my $variable_buffer_ffdc_type = "fapi2::variable_buffer"; my $ffdc_type = "fapi2::ffdc_t"; my $mcast_type = "fapi2::mcast_t"; -# We want to keep the signatures for the ffdc gathering hwp so that -# we can create members of the proper types for the ffdc classes. -my %signatures = ("proc_extract_pore_halt_ffdc" => ["por_base_state", - "por_halt_type_t", - "por_ffdc_offset_t"], - "proc_example" => ["uint32_t","uint8_t"], - "proc_extract_pore_base_ffdc" => ["por_base_state", "por_sbe_base_state"], - "proc_tp_collect_dbg_data" => [$target_ffdc_type], - "p9_collect_some_ffdc" => ["uint32_t","uint8_t"], - ); - # There are some names used in the XML files which exist in either # c++ keywords (case, for example) or macros (DOMAIN). The one's which # cause problems and need to be changed are here. @@ -433,7 +422,6 @@ print EIFILE "#include \n"; print EIFILE "#include \n"; print EIFILE "#include \n"; print EIFILE "#include \n"; - print EIFILE "/**\n"; print EIFILE " * \@brief Error Information macros and HwpFfdcId enumeration\n"; print EIFILE " *\/\n"; @@ -645,9 +633,7 @@ foreach my $argnum (0 .. $#ARGV) if ($count == 0) { #this rc wont be used, except to indicate the FFDC collection failed - $collectFfdcStr = " fapi2::ReturnCode l_rc; \\\n"; - # each collect ffdc function needs to populate this so we can add it to i_rc; - $collectFfdcStr .= " std::vector>ffdc; \\\n"; + $collectFfdcStr = "\tfapi2::ReturnCode l_rc; \\\n"; } $count++; @@ -655,11 +641,11 @@ foreach my $argnum (0 .. $#ARGV) # but we need to create the arguments in the ffdc class. The first # element in the collectFfdc string is the function to call. my @elements = split /,/, $collectFfdc; - my @signature = @{$signatures{@elements[0]}}; +# my @signature = @{$signatures{@elements[0]}}; # build up the function call here @elements[0] =~ s/^\s+|\s+$//g; - $collectFfdc = "@elements[0]" .",ffdc"; + $collectFfdc = "@elements[0]"; for (my $i = 1; $i <= $#elements; $i++) { $collectFfdc .= ","; @@ -674,16 +660,22 @@ foreach my $argnum (0 .. $#ARGV) # add a set method for each parameter too.. @elements[$i] =~ s/^\s+|\s+$//g; - addFfdcMethod(\%methods, @elements[$i], $err->{rc}, @signature[$i-1],$objNum); + addFfdcMethod(\%methods, @elements[$i], $err->{rc}, $ffdc_type ,$objNum); $collectFfdc .= "@elements[$i]" } - $collectFfdcStr .= " FAPI_EXEC_HWP(l_rc, $collectFfdc); \\\n"; + if( $#elements ) + { + $collectFfdc .= ","; + } + $collectFfdc .= "RC"; + + $collectFfdcStr .= "\tFAPI_EXEC_HWP(l_rc, $collectFfdc); \\\n"; + + print EIFILE "\\\n{ \\\n$collectFfdcStr \\\n}"; - print EIFILE "\\\n{ \\\n$collectFfdcStr"; - print EIFILE " RC.addErrorInfo(ffdc); \\\n}"; } #end collectFfdc tag print EIFILE "\n"; -- cgit v1.2.3