Skip to content

Commit

Permalink
Fapi_Infra:Add new member to structure ErrorInfoCDG
Browse files Browse the repository at this point in the history
Enabling addition of new member - gardType to the structure
to pass on the type of gard when target gets garded.

Change-Id: I4c14f8bab585bfbee71b43ee4353b9b243bf7469
CQ: SW462950
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78076
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Manish K. Chowdhary <manichow@in.ibm.com>
Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78093
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
sumitk56 authored and dcrowell77 committed Aug 16, 2019
1 parent 7b8bfcc commit f1074af
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/import/hwpf/fapi2/include/error_info.H
Expand Up @@ -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
///
Expand Down Expand Up @@ -348,6 +350,9 @@ struct ErrorInfoCDG

// GARD Information
bool iv_gard;

// GARD Type
GardTypes::GardType iv_gardType;
};

///
Expand Down Expand Up @@ -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;
};
Expand Down
23 changes: 23 additions & 0 deletions src/import/hwpf/fapi2/include/error_info_defs.H
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions src/import/hwpf/fapi2/src/error_info.C
Expand Up @@ -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)
{}

///
Expand Down Expand Up @@ -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));
Expand Down
12 changes: 12 additions & 0 deletions src/import/hwpf/fapi2/tools/parseErrorInfo.pl
Expand Up @@ -1267,6 +1267,10 @@ sub addFfdcMethod
# 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} )
Expand Down Expand Up @@ -1324,6 +1328,7 @@ sub addFfdcMethod
my $priority = 'NONE';
my $deconf = 0;
my $gard = 0;
my $gardType = 'GARD_Fatal';

if ( exists $cdgTargetHash{$cdg}->{callout} )
{
Expand All @@ -1340,6 +1345,11 @@ sub addFfdcMethod
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
Expand All @@ -1356,6 +1366,8 @@ sub addFfdcMethod
$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++;
}

Expand Down

0 comments on commit f1074af

Please sign in to comment.