summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/hwpf')
-rw-r--r--src/import/hwpf/fapi2/include/error_info.H8
-rw-r--r--src/import/hwpf/fapi2/include/error_info_defs.H23
-rw-r--r--src/import/hwpf/fapi2/src/error_info.C15
-rwxr-xr-xsrc/import/hwpf/fapi2/tools/parseErrorInfo.pl12
4 files changed, 52 insertions, 6 deletions
diff --git a/src/import/hwpf/fapi2/include/error_info.H b/src/import/hwpf/fapi2/include/error_info.H
index c6717a3bb..e67e376e0 100644
--- a/src/import/hwpf/fapi2/include/error_info.H
+++ b/src/import/hwpf/fapi2/include/error_info.H
@@ -311,12 +311,14 @@ struct ErrorInfoCDG
/// @param[in] i_deconfigure True if Target should be deconfigured
/// @param[in] i_gard True if Target should be GARDed
/// @param[in] i_priority The priority of any callout
+ /// @param[in] i_gardType Type of GARD
///
ErrorInfoCDG(const Target<TARGET_TYPE_ALL>& i_target,
const bool i_callout,
const bool i_deconfigure,
const bool i_gard,
- const CalloutPriorities::CalloutPriority i_priority);
+ const CalloutPriorities::CalloutPriority i_priority,
+ const GardTypes::GardType i_gardType);
#ifdef FAPI_CUSTOM_MALLOC
///
@@ -348,6 +350,9 @@ struct ErrorInfoCDG
// GARD Information
bool iv_gard;
+
+ // GARD Type
+ GardTypes::GardType iv_gardType;
};
///
@@ -598,6 +603,7 @@ struct ErrorInfoEntryTargetCDG
uint8_t iv_deconfigure;
uint8_t iv_gard;
uint8_t iv_calloutPriority;
+ uint8_t iv_gardType;
void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
const void* const* i_object) const;
};
diff --git a/src/import/hwpf/fapi2/include/error_info_defs.H b/src/import/hwpf/fapi2/include/error_info_defs.H
index 3f8fc9de6..bed1add8e 100644
--- a/src/import/hwpf/fapi2/include/error_info_defs.H
+++ b/src/import/hwpf/fapi2/include/error_info_defs.H
@@ -278,6 +278,29 @@ enum CollectTrace
};
}
+///
+/// @enum gardType
+///
+/// This enumeration defines the possible gard types
+/// NOTE:This gardType is same as the gard types defined in HWAS
+/// so they should always be kept in sync.
+///
+namespace GardTypes
+{
+enum GardType
+{
+ GARD_NULL = 0x00,
+ GARD_User_Manual = 0xD2, //Manual Guard.
+ GARD_Unrecoverable = 0xE2, //TODO:RTC-76814
+ GARD_Fatal = 0xE3, //IPL Failures, and others.
+ GARD_Predictive = 0xE6, //Policy flag to disable.
+ GARD_Power = 0xE9, //Needed since EID is NOT passed in.
+ GARD_PHYP = 0xEA, //Needed since EID is NOT passed in.
+ GARD_Reconfig = 0xEB, //Force deconfig on reconfig loop
+ GARD_Void = 0xFF,
+};
+}
+
// @brief convert the processor relative sbe target instance into a fapi pos
//
// @param[in] i_targType - type of target from SBE FFDC buffer
diff --git a/src/import/hwpf/fapi2/src/error_info.C b/src/import/hwpf/fapi2/src/error_info.C
index a3ee3c8c6..861393eb5 100644
--- a/src/import/hwpf/fapi2/src/error_info.C
+++ b/src/import/hwpf/fapi2/src/error_info.C
@@ -118,18 +118,21 @@ ErrorInfoBusCallout::ErrorInfoBusCallout(
/// @param[in] i_deconfigure True if Target should be deconfigured
/// @param[in] i_gard True if Target should be GARDed
/// @param[in] i_priority The priority of any callout
+/// @param[in] i_gardType Type of GARD
///
ErrorInfoCDG::ErrorInfoCDG(
const Target<TARGET_TYPE_ALL>& i_target,
const bool i_callout,
const bool i_deconfigure,
const bool i_gard,
- const CalloutPriorities::CalloutPriority i_priority):
+ const CalloutPriorities::CalloutPriority i_priority,
+ const GardTypes::GardType i_gardType):
iv_target(i_target),
iv_callout(i_callout),
iv_calloutPriority(i_priority),
iv_deconfigure(i_deconfigure),
- iv_gard(i_gard)
+ iv_gard(i_gard),
+ iv_gardType(i_gardType)
{}
///
@@ -336,13 +339,15 @@ void ErrorInfoEntryTargetCDG::addErrorInfo(
iv_deconfigure,
iv_gard,
static_cast<CalloutPriorities::CalloutPriority>
- (iv_calloutPriority)
+ (iv_calloutPriority),
+ static_cast<GardTypes::GardType>(iv_gardType)
);
- FAPI_DBG("addErrorInfo: Adding target 0x%lx cdg (%d:%d:%d), pri: %d",
+ FAPI_INF("addErrorInfo: Adding target 0x%lx cdg (%d:%d:%d), pri: %d, gtyp: %d",
ei->iv_target.get(),
ei->iv_callout, ei->iv_deconfigure,
- ei->iv_gard, ei->iv_calloutPriority);
+ ei->iv_gard, ei->iv_calloutPriority,
+ ei->iv_gardType);
// Add the ErrorInfo
i_info->iv_CDGs.push_back(std::shared_ptr<ErrorInfoCDG>(ei));
diff --git a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
index 782a5a38a..75c3fe2fd 100755
--- a/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
+++ b/src/import/hwpf/fapi2/tools/parseErrorInfo.pl
@@ -1267,6 +1267,10 @@ foreach my $argnum ( 0 .. $#ARGV )
# Add the Target to cdgTargetHash to be processed with any
# callout and deconfigure requests
$cdgTargetHash{ $gard->{target} }{gard} = 1;
+ if ( exists $gard->{gardType} )
+ {
+ $cdgTargetHash{ $gard->{target} }{gardType} = $gard->{gardType};
+ }
$elementsFound++;
}
if ( exists $gard->{childTargets} )
@@ -1324,6 +1328,7 @@ foreach my $argnum ( 0 .. $#ARGV )
my $priority = 'NONE';
my $deconf = 0;
my $gard = 0;
+ my $gardType = 'GARD_Fatal';
if ( exists $cdgTargetHash{$cdg}->{callout} )
{
@@ -1340,6 +1345,11 @@ foreach my $argnum ( 0 .. $#ARGV )
if ( exists $cdgTargetHash{$cdg}->{gard} )
{
$gard = 1;
+
+ if ( exists $cdgTargetHash{$cdg}->{gardType} )
+ {
+ $gardType = $cdgTargetHash{$cdg}->{gardType};
+ }
}
# Add the Target to the objectlist if it doesn't already exist
@@ -1356,6 +1366,8 @@ foreach my $argnum ( 0 .. $#ARGV )
$eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_gard = $gard; \\\n";
$eiEntryStr .=
" l_entries[$eiEntryCount].target_cdg.iv_calloutPriority = fapi2::CalloutPriorities::$priority; \\\n";
+ $eiEntryStr .=
+ " l_entries[$eiEntryCount].target_cdg.iv_gardType = fapi2::GardTypes::$gardType; \\\n";
$eiEntryCount++;
}
OpenPOWER on IntegriCloud