summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/procedures/hwp/ffdc/ffdc_includes.H33
-rw-r--r--src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.C47
-rw-r--r--src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.H57
-rw-r--r--src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.mk26
-rwxr-xr-xsrc/import/hwpf/fapi2/tools/parseErrorInfo.pl194
-rw-r--r--src/usr/diag/mdia/makefile1
-rw-r--r--src/usr/diag/mdia/test/makefile1
-rw-r--r--src/usr/diag/prdf/prdf_hb_only.mk1
-rwxr-xr-xsrc/usr/fapi2/fapi2.mk15
-rw-r--r--src/usr/fapi2/test/fapi2Test.mk1
-rw-r--r--src/usr/isteps/makefile1
-rw-r--r--src/usr/sbe/makefile1
12 files changed, 309 insertions, 69 deletions
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/ffdc_includes.H b/src/import/chips/p9/procedures/hwp/ffdc/ffdc_includes.H
new file mode 100644
index 000000000..ac7b1e92f
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/ffdc/ffdc_includes.H
@@ -0,0 +1,33 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/ffdc/ffdc_includes.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __FFDC_INCLUDES_H
+#define __FFDC_INCLUDES_H
+/// @file ffdc_includes.H
+///
+/// @brief main file used to export all include files for FFDC procedures
+///
+#include <p9_collect_some_ffdc.H>
+
+#endif
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.C b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.C
new file mode 100644
index 000000000..39ee1a42e
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.C
@@ -0,0 +1,47 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+///
+/// @file p9_collect_some_ffdc.C
+///
+
+#include <stdint.h>
+#include <fapi2.H>
+#include <p9_mc_scom_addresses.H>
+
+using fapi2::FAPI2_RC_FALSE;
+
+extern "C"
+{
+ fapi2::ReturnCode p9_collect_some_ffdc(std::vector<std::shared_ptr<fapi2::ErrorInfoFfdc>>& o_ffdc_data, uint32_t a,
+ uint8_t b)
+ {
+ FAPI_INF("parm1=%d and parm2=%d", a, b);
+ o_ffdc_data.push_back(std::shared_ptr<fapi2::ErrorInfoFfdc>(new fapi2::ErrorInfoFfdc( 0xdeadbeef, &a, sizeof(a))));
+ o_ffdc_data.push_back(std::shared_ptr<fapi2::ErrorInfoFfdc>(new fapi2::ErrorInfoFfdc( 0xcafebabe, &b, sizeof(b))));
+
+ return fapi2::ReturnCode();
+ }
+
+}
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.H b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.H
new file mode 100644
index 000000000..f36b62470
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.H
@@ -0,0 +1,57 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef _COLLECT_SOME_FFDC_H_
+#define _COLLECT_SOME_FFDC_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <fapi2.H>
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi2::ReturnCode (*p9_collect_some_ffdc_FP_t)(std::vector<std::shared_ptr<fapi2::ErrorInfoFfdc>>& o_ffdc_data,
+ uint32_t a, uint8_t b);
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+extern "C"
+{
+ fapi2::ReturnCode p9_collect_some_ffdc(std::vector<std::shared_ptr<fapi2::ErrorInfoFfdc>>& o_ffdc_data, uint32_t a,
+ uint8_t b);
+
+} // extern "C"
+
+#endif // _PROC_EXAMPLE_H_
diff --git a/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.mk b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.mk
new file mode 100644
index 000000000..992000f92
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.mk
@@ -0,0 +1,26 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/import/chips/p9/procedures/hwp/ffdc/p9_collect_some_ffdc.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2016
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+PROCEDURE=p9_collect_some_ffdc
+$(call BUILD_PROCEDURE)
diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
index 4385d8db7..dd1c64d84 100755
--- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
+++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
@@ -57,6 +57,8 @@ my $xml = new XML::Simple (KeyAttr=>[]);
use Data::Dumper;
use Getopt::Long;
+
+my @eiObjects = ();
my $target_ffdc_type = "fapi2::Target<T>";
my $buffer_ffdc_type = "fapi2::buffer";
my $variable_buffer_ffdc_type = "fapi2::variable_buffer";
@@ -68,9 +70,10 @@ my $mcast_type = "fapi2::mcast_t";
my %signatures = ("proc_extract_pore_halt_ffdc" => ["por_base_state",
"por_halt_type_t",
"por_ffdc_offset_t"],
- "hwpTestFfdc1" => [$target_ffdc_type],
+ "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
@@ -287,6 +290,7 @@ sub addFfdcMethod
$methods->{$key}{type} = $type;
delete $methods->{$key_ffdc} if ($type eq $target_ffdc_type);
+
my $method = "";
my $method_body = "";
@@ -302,7 +306,9 @@ sub addFfdcMethod
{
$method_body = " {$ffdc_uc.ptr() = &i_value; $ffdc_uc.size() =";
$method_body .= " fapi2::getErrorInfoFfdcSize(i_value); return *this;}\n\n";
- $methods->{$key}{member} = "$ffdc_type $ffdc_uc;\n ";
+ $methods->{$key}{member} = "$ffdc_type $ffdc_uc;";
+ $methods->{$objectNumber}{localvar} = "$ffdc_type $ffdc_uc = getFfdcData(FFDC_BUFFER[$objectNumber]);";
+ $methods->{$objectNumber}{assignment_string} = "l_obj.$ffdc_uc = $ffdc_uc;";
}
else
{
@@ -322,8 +328,9 @@ sub addFfdcMethod
$method = "\n template< typename T >\n";
$method .= " inline $class_name& set_$ffdc_uc(const fapi2::buffer<T>& $param)\n";
$method_body = " {$ffdc_uc.ptr() = &i_value(); $ffdc_uc.size() = i_value.template getLength<uint8_t>(); return *this;}\n\n";
-
- $methods->{$key}{member} = "$ffdc_type $ffdc_uc;\n ";
+ $methods->{$key}{member} = "$ffdc_type $ffdc_uc;";
+ $methods->{$objectNumber}{localvar} = "$buffer_ffdc_type $ffdc_uc = getFfdcData(FFDC_BUFFER[$objectNumber]);";
+ $methods->{$objectNumber}{assignment_string} = "l_obj.$ffdc_uc = $ffdc_uc;";
}
elsif ($type eq $variable_buffer_ffdc_type)
@@ -341,13 +348,33 @@ sub addFfdcMethod
$method .= " inline $class_name& set_$ffdc_uc(const $type& $param)\n";
$method_body .= " {$ffdc_uc.ptr() = &i_value; $ffdc_uc.size() = fapi2::getErrorInfoFfdcSize(i_value); return *this;}\n\n";
- $methods->{$key}{member} = "$ffdc_type $ffdc_uc;\n ";
+ $methods->{$key}{member} = "$ffdc_type $ffdc_uc;";
+ $methods->{$objectNumber}{localvar} = "$ffdc_type $ffdc_uc = getFfdcData(FFDC_BUFFER[$objectNumber]);";
+ $methods->{$objectNumber}{assignment_string} = "l_obj.$ffdc_uc=$ffdc_uc";
}
else
{
- print ("ffdc type $type is unknown\n");
- exit(1);
+ $method .= "\tinline $class_name& set_$ffdc_uc($type $param)\n";
+
+ if(!$arg_local_ffdc)
+ {
+ $method_body = " { $ffdc_uc = i_value; ";
+ $method_body .= " return *this;}\n\n";
+ $methods->{$key}{member} = "$type $ffdc_uc;";
+ $methods->{$objectNumber}{localvar} = "$type $ffdc_uc = getFfdcData(FFDC_BUFFER[$objectNumber]);";
+ $methods->{$objectNumber}{assignment_string} = "l_obj.$ffdc_uc = $ffdc_uc;";
+ }
+ else
+ {
+ # need to use the objectNumber here so when we decode the info at the hwsv/hb side we have a point of
+ # reference and they will be copied into/out of the sbe buffer in the correct order
+ $method_body .= "\t{\n\t\tfapi2::g_FfdcData.ffdcData[$objectNumber].data= convertType(i_value);\n";
+ $method_body .= "\t\tfapi2::g_FfdcData.ffdcData[$objectNumber].size =";
+ $method_body .=" fapi2::getErrorInfoFfdcSize(i_value);\n";
+ $method_body .= "\t\tfapi2::g_FfdcData.ffdcLength += sizeof(sbeFfdc_t);\n";
+ $method_body .= "\t\treturn *this;\n\t};\n\n";
+ }
}
$method .= ($arg_empty_ffdc eq undef) ? $method_body : " {return *this;}\n\n";
@@ -392,7 +419,9 @@ print EIFILE "#define FAPI2_HWPERRORINFO_H_\n\n";
print EIFILE "#include <target.H>\n";
print EIFILE "#include <plat_trace.H>\n";
print EIFILE "#include <hwp_return_codes.H>\n";
+print EIFILE "#include <hwp_executor.H>\n";
print EIFILE "#include <set_sbe_error.H>\n";
+
print EIFILE "/**\n";
print EIFILE " * \@brief Error Information macros and HwpFfdcId enumeration\n";
print EIFILE " *\/\n";
@@ -403,16 +432,16 @@ print ECFILE "// hwp_ffdc_classes.H\n";
print ECFILE "// This file is generated by the perl script parseErrorInfo.pl\n\n";
print ECFILE "#ifndef FAPI2_HWP_FFDC_CLASSES_H_\n";
print ECFILE "#define FAPI2_HWP_FFDC_CLASSES_H_\n\n";
-print ECFILE "#include <ffdc.H>\n";
+print ECFILE "#include <return_code.H>\n";
+print ECFILE "#include <fapi2_hwp_executor.H>\n";
+print ECFILE "#include <error_info.H>\n";
print ECFILE "#include <buffer.H>\n";
print ECFILE "#include <variable_buffer.H>\n" if ($arg_use_variable_buffers ne undef);
-print ECFILE "#include <error_info.H>\n";
-print ECFILE "#include <utils.H>\n";
print ECFILE "#include <hwp_error_info.H>\n";
print ECFILE "#if !defined(FAPI2_NO_FFDC) && !defined(MINIMUM_FFDC)\n";
-#print ECFILE "#include <collect_reg_ffdc.H>\n";
+print ECFILE "#include <ffdc_includes.H>\n";
+print ECFILE "//#include <collect_reg_ffdc.H>\n";
print ECFILE "#endif\n";
-#print ECFILE "#include <proc_extract_sbe_rc.H>\n\n";
print ECFILE "/**\n";
print ECFILE " * \@brief FFDC gathering classes\n";
print ECFILE " *\/\n";
@@ -491,11 +520,12 @@ print SBFILE "// must take a parameter for the generic chip ID in the error\n";
print SBFILE "// XML.\n\n";
print SBFILE "#ifndef FAPI2_SETSBEERROR_H_\n";
print SBFILE "#define FAPI2_SETSBEERROR_H_\n\n";
-print SBFILE "#define FAPI_SET_SBE_ERROR(RC, ERRVAL, FFDC_BUFFER)\\\n";
+print SBFILE "#define FAPI_SET_SBE_ERROR(RC,ERRVAL,FFDC_BUFFER)\\\n";
print SBFILE "{\\\n";
print SBFILE "switch (ERRVAL)\\\n";
print SBFILE "{\\\n";
+
#------------------------------------------------------------------------------
# For each XML file
#------------------------------------------------------------------------------
@@ -521,10 +551,13 @@ foreach my $argnum (0 .. $#ARGV)
#--------------------------------------------------------------------------
foreach my $err (@{$errors->{hwpError}})
{
- my $objectStr = "";
+ my $objectStr = undef;
# Hash of methods for the ffdc-gathering class
my %methods;
+ # Array of EI Objects
+ @eiObjects = ();
+
#----------------------------------------------------------------------
# Check that expected fields are present
#----------------------------------------------------------------------
@@ -558,42 +591,61 @@ foreach my $argnum (0 .. $#ARGV)
#----------------------------------------------------------------------
# Print the CALL_FUNCS_TO_COLLECT_FFDC macro to hwp_error_info.H
#----------------------------------------------------------------------
- print EIFILE "#define $err->{rc}_CALL_FUNCS_TO_COLLECT_FFDC(RC) ";
+ print EIFILE "#define $err->{rc}_CALL_FUNCS_TO_COLLECT_FFDC(RC)";
- # For now, this code is removed. It appears to work just fine but
- # will require more of the fapi2 infrastructure to be in place.
- # Because the ffdc collection classes create members with real types,
- # the declarations of the types need to be visible - and they're not
- # right now. When we get further along, we can enable this code.
+ my $collectFfdcStr = "";
$count = 0;
foreach my $collectFfdc (@{$err->{collectFfdc}})
{
if ($count == 0)
{
- print EIFILE "{ fapi2::ReturnCode l_tempRc; ";
+ #this rc wont be used, except to indicate the FFDC collection failed
+ $collectFfdcStr = "\tfapi2::ReturnCode l_rc; \\\n";
+ # each collect ffdc function needs to populate this so we can add it to i_rc;
+ $collectFfdcStr .= "\tstd::vector<std::shared_ptr<ErrorInfoFfdc>>ffdc; \\\n";
}
$count++;
- print EIFILE "FAPI_EXEC_HWP(l_tempRc, $collectFfdc, RC); ";
-
# collectFfdc is a string we're going to stuff into FAPI_EXEC_HWP
# but we need to create the arguments in the ffdc class. The first
- # element inthe collectFfdc string is the function to call.
+ # element in the collectFfdc string is the function to call.
my @elements = split /,/, $collectFfdc;
-# my @signature = @{$signatures{@elements[0]}};
-#
-# $TODO RTC:154303 for SBE errors we need to get the parameters from the FFDC_BUFFER passed
+ my @signature = @{$signatures{@elements[0]}};
+
+ # build up the function call here
+ @elements[0] =~ s/^\s+|\s+$//g;
+ $collectFfdc = "@elements[0]" .",ffdc";
for (my $i = 1; $i <= $#elements; $i++)
{
+ $collectFfdc .= ",";
+
+ # the parameters will be in the l_objects, unused, but need to be
+ # counted for the SBE implementation
+ my $parameter = "static_cast<void*>(&"."@elements[$i])";
+
+ # Add the parameter to the object list if it doesn't already exist
+ #
+ my $objNum = addEntryToArray(\@eiObjects, $parameter);
+
+ # add a set method for each parameter too..
@elements[$i] =~ s/^\s+|\s+$//g;
- addFfdcMethod(\%methods, @elements[$i], $err->{rc});
+ addFfdcMethod(\%methods, @elements[$i], $err->{rc}, @signature[$i-1],$objNum);
+
+ $collectFfdc .= "@elements[$i]"
+
}
- }
+ #reset the vector before calling the ffdc funciton - only needed if there are more than one
+ #collectFfdc calls
+ if($count > 1 )
+ {
+ $collectFfdcStr .= "\tffdc.clear(); \\\n";
+ }
+ $collectFfdcStr .= "\tFAPI_EXEC_HWP(l_rc, $collectFfdc); \\\n";
+ $collectFfdcStr .= "\tiv_rc.addErrorInfo(ffdc);";
+
+ print EIFILE "\\\n{ \\\n$collectFfdcStr \\\n}";
+ } #end collectFfdc tag
- if ($count > 0)
- {
- print EIFILE "}";
- }
print EIFILE "\n";
#----------------------------------------------------------------------
@@ -683,8 +735,6 @@ foreach my $argnum (0 .. $#ARGV)
#----------------------------------------------------------------------
print EIFILE "#define $err->{rc}_ADD_ERROR_INFO(RC) ";
- # Array of EI Objects
- my @eiObjects;
my $eiEntryStr = "";
my $eiObjectMap = ""; #object names to buffer address mapping
@@ -1160,6 +1210,8 @@ foreach my $argnum (0 .. $#ARGV)
# Add all objects to $eiObjectStr
my $objCount = 0;
+ # add ordinary types to eiObjectStr here
+
foreach my $eiObject (@eiObjects)
{
if ($objCount > 0)
@@ -1173,7 +1225,17 @@ foreach my $argnum (0 .. $#ARGV)
if ((exists $err->{sbeError}) )
{
- $objectStr .= "\t\tfapi2::ffdc_t $eiObject = getFfdcData(FFDC_BUFFER[$objCount]); \\\n";
+ if((exists $methods{$objCount}{object}))
+ {
+ $objectStr .= "\t\t$methods{$objCount}{object} \\\n";
+
+ }
+
+ if((exists $methods{$objCount}{localvar}))
+ {
+ $objectStr .= "\t\t$methods{$objCount}{localvar} \\\n";
+ $objectStr .= "\t\t$methods{$objCount}{assignment_string} \\\n";
+ }
}
}
else
@@ -1183,6 +1245,8 @@ foreach my $argnum (0 .. $#ARGV)
$objCount++;
}
+
+
$eiObjectStr .= "};";
@@ -1225,7 +1289,7 @@ foreach my $argnum (0 .. $#ARGV)
print ECFILE " $class_name(fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE, fapi2::ReturnCode& i_rc = fapi2::current_err):\n";
print ECFILE " iv_rc(i_rc),\n";
print ECFILE " iv_sev(i_sev)\n";
- print ECFILE " { FAPI_ERR(\"$err->{description}\"); }\n";
+ print ECFILE " { FAPI_ERR(\"$err->{description}\"); }\n\n";
}
else
{
@@ -1255,48 +1319,49 @@ foreach my $argnum (0 .. $#ARGV)
if(!$arg_local_ffdc)
{
# add a method to adjust the severity if desired
- print ECFILE " inline void setSev(const fapi2::errlSeverity_t i_sev)\n";
+ print ECFILE "\tinline void setSev(const fapi2::errlSeverity_t i_sev)\n";
if ($arg_empty_ffdc eq undef)
{
- print ECFILE " { iv_sev = i_sev; };\n\n";
+ print ECFILE "\t\t\t{ iv_sev = i_sev;};\n\n";
}
else
{
- print ECFILE " { static_cast<void>(i_sev); };\n\n";
+ print ECFILE "\t\t\t{ static_cast<void>(i_sev);};\n\n";
}
# add a method to read the severity if desired
- print ECFILE " inline fapi2::errlSeverity_t getSev() const\n";
+ print ECFILE "\tinline fapi2::errlSeverity_t getSev() const\n";
if ($arg_empty_ffdc eq undef)
{
- print ECFILE " { return iv_sev; };\n\n";
+ print ECFILE "\t\t\t{ return iv_sev; };\n\n";
}
else
{
- print ECFILE " { return fapi2::FAPI2_ERRL_SEV_UNDEFINED; };\n\n";
+ print ECFILE "\t\t\t{ return fapi2::FAPI2_ERRL_SEV_UNDEFINED; };\n\n";
}
}
if( $arg_local_ffdc eq undef )
{
+
# Stick the execute method at the end of the other methods. We allow
# passing in of the severity so that macros which call execute() can over-ride
# the default severity.
- print ECFILE " void execute(fapi2::errlSeverity_t" .
- " i_sev = fapi2::FAPI2_ERRL_SEV_UNDEFINED," .
+ print ECFILE "\tvoid execute(fapi2::errlSeverity_t " .
+ "i_sev = fapi2::FAPI2_ERRL_SEV_UNDEFINED," .
"bool commit = false )\n";
if ($arg_empty_ffdc eq undef )
{
- print ECFILE " {\n";
- print ECFILE " FAPI_SET_HWP_ERROR(iv_rc, $err->{rc});\n";
- print ECFILE " if( commit )\n";
- print ECFILE " {\n";
- print ECFILE " fapi2::logError(iv_rc, " .
+ print ECFILE "\t\t{\n";
+ print ECFILE "\t\t\tFAPI_SET_HWP_ERROR(iv_rc,$err->{rc});\n\n";
+ print ECFILE "\t\t\tif( commit )\n";
+ print ECFILE "\t\t\t{\n";
+ print ECFILE "\t\t\t\tfapi2::logError(iv_rc, " .
"(i_sev == fapi2::FAPI2_ERRL_SEV_UNDEFINED)" .
" ? iv_sev : i_sev);\n";
- print ECFILE " }\n";
- print ECFILE " }\n";
+ print ECFILE "\t\t\t}\n";
+ print ECFILE "\t\t}\n";
}
else
@@ -1310,14 +1375,18 @@ foreach my $argnum (0 .. $#ARGV)
# Instance variables
if ($arg_empty_ffdc eq undef)
{
- print ECFILE " public:\n ";
+ print ECFILE "\tpublic:\n";
foreach my $key (keys %methods)
{
- print ECFILE $methods{$key}{member};
+ if( !($methods{$key}{member} eq undef) )
+ {
+ print ECFILE "\t\t$methods{$key}{member}\n";
+ }
+
}
- print ECFILE "fapi2::ReturnCode& iv_rc;\n";
- print ECFILE " fapi2::errlSeverity_t iv_sev;\n";
+ print ECFILE "\t\tfapi2::ReturnCode& iv_rc;\n";
+ print ECFILE "\t\tfapi2::errlSeverity_t iv_sev;\n";
}
}
@@ -1337,9 +1406,15 @@ foreach my $argnum (0 .. $#ARGV)
if (exists $err->{sbeError})
{
print SBFILE "\tcase fapi2::$err->{rc}: \\\n";
- print SBFILE "\t{ \\\n$objectStr";
- print SBFILE "\t\tFAPI_SET_HWP_ERROR(RC, $err->{rc});\\\n";
- print SBFILE " break; \\\n\t} \\\n";
+ print SBFILE "\t{\\\n\t\t$class_name l_obj(";
+ print SBFILE "fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE,RC);\\\n";
+
+ if(!($objectStr eq undef ))
+ {
+ print SBFILE "$objectStr";
+ }
+ print SBFILE "\t\tl_obj.execute(); \\\n";
+ print SBFILE "\t\tbreak; \\\n\t} \\\n";
}
}
@@ -1391,7 +1466,6 @@ foreach my $argnum (0 .. $#ARGV)
print CRFILE " l_scomAddresses.push_back($scomRegister);\n";
print CRFILE " l_ffdcSize += sizeof(l_scomData);\n";
}
-=cut NEED_P9_REGISTERS
print CRFILE " break;\n";
}
diff --git a/src/usr/diag/mdia/makefile b/src/usr/diag/mdia/makefile
index c7f143dcc..b06304ff4 100644
--- a/src/usr/diag/mdia/makefile
+++ b/src/usr/diag/mdia/makefile
@@ -38,6 +38,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils
##########################################################
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib/mcbist
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/targeting/common
diff --git a/src/usr/diag/mdia/test/makefile b/src/usr/diag/mdia/test/makefile
index 07f804f01..c439400d5 100644
--- a/src/usr/diag/mdia/test/makefile
+++ b/src/usr/diag/mdia/test/makefile
@@ -43,6 +43,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib/mcbist
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/targeting/common
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc
OBJS += mdiafakesm.o
OBJS += mdiafakecm.o
diff --git a/src/usr/diag/prdf/prdf_hb_only.mk b/src/usr/diag/prdf/prdf_hb_only.mk
index 5355a1c8d..b0b9ddacb 100644
--- a/src/usr/diag/prdf/prdf_hb_only.mk
+++ b/src/usr/diag/prdf/prdf_hb_only.mk
@@ -154,6 +154,7 @@ prd_vpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/lib/utils/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/common/include/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/memory/
+prd_incpath += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/
prd_incpath += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
prd_obj_no_sim += mcbist.o
diff --git a/src/usr/fapi2/fapi2.mk b/src/usr/fapi2/fapi2.mk
index a94852a06..cede92727 100755
--- a/src/usr/fapi2/fapi2.mk
+++ b/src/usr/fapi2/fapi2.mk
@@ -37,6 +37,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
EXTRAINCDIR += $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/
+EXTRAINCDIR += $(ROOTPATH)/src/import/chips/p9/procedures/hwp/ffdc/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/accessors/
include ${ROOTPATH}/src/build/mkrules/verbose.rules.mk
@@ -66,6 +67,7 @@ include ${HWP_PATH}/hwp/accessors/p9_get_mem_vpd_keyword.mk
OBJS += error_info.o
OBJS += ffdc.o
OBJS += fapi2_utils.o
+OBJS += p9_collect_some_ffdc.o
#Generated Objects
OBJS += fapi2_attribute_service.o
@@ -103,17 +105,11 @@ FAPI2_PLAT_INCLUDE += $(addsuffix /common/include, \
#------------------------------------------------------------------------------
# The PLAT HWP RC and FFDC parser file generated from Error XML files
#------------------------------------------------------------------------------
-PLAT_HWP_ERR_PARSER_TARGET = hbfwPlatHwpErrParser.H
-PLAT_HWP_ERR_PARSER_FFDC_TARGET = hbfwPlatHwpErrParserFFDC.H
-
+PLAT_HWP_ERR_PARSER = platHwpErrParser.H
GENDIR_PLUGINS = $(ROOTPATH)/obj/genfiles/plugins
GENPLUGINTARGET = $(addprefix $(GENDIR_PLUGINS)/, $(1))
-GENFILES_PLUGINS = ${PLAT_HWP_ERR_PARSER_TARGET}
-GENFILES_PLUGINS += ${PLAT_HWP_ERR_PARSER_FFDC_TARGET}
-
-
-$(call GENPLUGINTARGET, ${PLAT_HWP_ERR_PARSER_TARGET}) \
-$(call GENPLUGINTARGET, ${PLAT_HWP_ERR_PARSER_FFDC_TARGET}) : \
+GENFILES_PLUGINS = ${PLAT_HWP_ERR_PARSER}
+$(call GENPLUGINTARGET, ${PLAT_HWP_ERR_PARSER}) : \
$(ROOTPATH)/src/usr/fapi2/platCreateHwpErrParser.pl ${FAPI2_ERROR_XML}
$< $(dir $@) ${FAPI2_ERROR_XML}
@@ -133,4 +129,5 @@ include $(ROOTPATH)/src/import/chips/p9/procedures/hwp/pm/p9_pm_get_poundv_bucke
VPATH += ${HWP_PATH}/hwp/accessors
VPATH += ${ROOTPATH}/src/import/hwpf/fapi2/src/
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/
+VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/
VPATH += ${GENPATH}
diff --git a/src/usr/fapi2/test/fapi2Test.mk b/src/usr/fapi2/test/fapi2Test.mk
index 1c0fd049a..189f64a8f 100644
--- a/src/usr/fapi2/test/fapi2Test.mk
+++ b/src/usr/fapi2/test/fapi2Test.mk
@@ -37,6 +37,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/accessors/
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/targeting/common/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/
# Procedures
OBJS += p9_sample_procedure.o
diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile
index 1a448a9c5..2d7f4b548 100644
--- a/src/usr/isteps/makefile
+++ b/src/usr/isteps/makefile
@@ -52,5 +52,6 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/initservice/istepdispatcher
EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/
include ${ROOTPATH}/config.mk
diff --git a/src/usr/sbe/makefile b/src/usr/sbe/makefile
index 878d46d94..c07fd9507 100644
--- a/src/usr/sbe/makefile
+++ b/src/usr/sbe/makefile
@@ -34,6 +34,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/lib/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/utils/stopreg/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/customize
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/xip
OpenPOWER on IntegriCloud