Skip to content

Commit f1074af

Browse files
sumitk56dcrowell77
authored andcommitted
Fapi_Infra:Add new member to structure ErrorInfoCDG
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>
1 parent 7b8bfcc commit f1074af

4 files changed

Lines changed: 52 additions & 6 deletions

File tree

src/import/hwpf/fapi2/include/error_info.H

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,14 @@ struct ErrorInfoCDG
311311
/// @param[in] i_deconfigure True if Target should be deconfigured
312312
/// @param[in] i_gard True if Target should be GARDed
313313
/// @param[in] i_priority The priority of any callout
314+
/// @param[in] i_gardType Type of GARD
314315
///
315316
ErrorInfoCDG(const Target<TARGET_TYPE_ALL>& i_target,
316317
const bool i_callout,
317318
const bool i_deconfigure,
318319
const bool i_gard,
319-
const CalloutPriorities::CalloutPriority i_priority);
320+
const CalloutPriorities::CalloutPriority i_priority,
321+
const GardTypes::GardType i_gardType);
320322

321323
#ifdef FAPI_CUSTOM_MALLOC
322324
///
@@ -348,6 +350,9 @@ struct ErrorInfoCDG
348350

349351
// GARD Information
350352
bool iv_gard;
353+
354+
// GARD Type
355+
GardTypes::GardType iv_gardType;
351356
};
352357

353358
///
@@ -598,6 +603,7 @@ struct ErrorInfoEntryTargetCDG
598603
uint8_t iv_deconfigure;
599604
uint8_t iv_gard;
600605
uint8_t iv_calloutPriority;
606+
uint8_t iv_gardType;
601607
void addErrorInfo(std::shared_ptr<ErrorInfo> i_info,
602608
const void* const* i_object) const;
603609
};

src/import/hwpf/fapi2/include/error_info_defs.H

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,29 @@ enum CollectTrace
278278
};
279279
}
280280

281+
///
282+
/// @enum gardType
283+
///
284+
/// This enumeration defines the possible gard types
285+
/// NOTE:This gardType is same as the gard types defined in HWAS
286+
/// so they should always be kept in sync.
287+
///
288+
namespace GardTypes
289+
{
290+
enum GardType
291+
{
292+
GARD_NULL = 0x00,
293+
GARD_User_Manual = 0xD2, //Manual Guard.
294+
GARD_Unrecoverable = 0xE2, //TODO:RTC-76814
295+
GARD_Fatal = 0xE3, //IPL Failures, and others.
296+
GARD_Predictive = 0xE6, //Policy flag to disable.
297+
GARD_Power = 0xE9, //Needed since EID is NOT passed in.
298+
GARD_PHYP = 0xEA, //Needed since EID is NOT passed in.
299+
GARD_Reconfig = 0xEB, //Force deconfig on reconfig loop
300+
GARD_Void = 0xFF,
301+
};
302+
}
303+
281304
// @brief convert the processor relative sbe target instance into a fapi pos
282305
//
283306
// @param[in] i_targType - type of target from SBE FFDC buffer

src/import/hwpf/fapi2/src/error_info.C

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,21 @@ ErrorInfoBusCallout::ErrorInfoBusCallout(
118118
/// @param[in] i_deconfigure True if Target should be deconfigured
119119
/// @param[in] i_gard True if Target should be GARDed
120120
/// @param[in] i_priority The priority of any callout
121+
/// @param[in] i_gardType Type of GARD
121122
///
122123
ErrorInfoCDG::ErrorInfoCDG(
123124
const Target<TARGET_TYPE_ALL>& i_target,
124125
const bool i_callout,
125126
const bool i_deconfigure,
126127
const bool i_gard,
127-
const CalloutPriorities::CalloutPriority i_priority):
128+
const CalloutPriorities::CalloutPriority i_priority,
129+
const GardTypes::GardType i_gardType):
128130
iv_target(i_target),
129131
iv_callout(i_callout),
130132
iv_calloutPriority(i_priority),
131133
iv_deconfigure(i_deconfigure),
132-
iv_gard(i_gard)
134+
iv_gard(i_gard),
135+
iv_gardType(i_gardType)
133136
{}
134137

135138
///
@@ -336,13 +339,15 @@ void ErrorInfoEntryTargetCDG::addErrorInfo(
336339
iv_deconfigure,
337340
iv_gard,
338341
static_cast<CalloutPriorities::CalloutPriority>
339-
(iv_calloutPriority)
342+
(iv_calloutPriority),
343+
static_cast<GardTypes::GardType>(iv_gardType)
340344
);
341345

342-
FAPI_DBG("addErrorInfo: Adding target 0x%lx cdg (%d:%d:%d), pri: %d",
346+
FAPI_INF("addErrorInfo: Adding target 0x%lx cdg (%d:%d:%d), pri: %d, gtyp: %d",
343347
ei->iv_target.get(),
344348
ei->iv_callout, ei->iv_deconfigure,
345-
ei->iv_gard, ei->iv_calloutPriority);
349+
ei->iv_gard, ei->iv_calloutPriority,
350+
ei->iv_gardType);
346351

347352
// Add the ErrorInfo
348353
i_info->iv_CDGs.push_back(std::shared_ptr<ErrorInfoCDG>(ei));

src/import/hwpf/fapi2/tools/parseErrorInfo.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,10 @@ sub addFfdcMethod
12671267
# Add the Target to cdgTargetHash to be processed with any
12681268
# callout and deconfigure requests
12691269
$cdgTargetHash{ $gard->{target} }{gard} = 1;
1270+
if ( exists $gard->{gardType} )
1271+
{
1272+
$cdgTargetHash{ $gard->{target} }{gardType} = $gard->{gardType};
1273+
}
12701274
$elementsFound++;
12711275
}
12721276
if ( exists $gard->{childTargets} )
@@ -1324,6 +1328,7 @@ sub addFfdcMethod
13241328
my $priority = 'NONE';
13251329
my $deconf = 0;
13261330
my $gard = 0;
1331+
my $gardType = 'GARD_Fatal';
13271332

13281333
if ( exists $cdgTargetHash{$cdg}->{callout} )
13291334
{
@@ -1340,6 +1345,11 @@ sub addFfdcMethod
13401345
if ( exists $cdgTargetHash{$cdg}->{gard} )
13411346
{
13421347
$gard = 1;
1348+
1349+
if ( exists $cdgTargetHash{$cdg}->{gardType} )
1350+
{
1351+
$gardType = $cdgTargetHash{$cdg}->{gardType};
1352+
}
13431353
}
13441354

13451355
# Add the Target to the objectlist if it doesn't already exist
@@ -1356,6 +1366,8 @@ sub addFfdcMethod
13561366
$eiEntryStr .= " l_entries[$eiEntryCount].target_cdg.iv_gard = $gard; \\\n";
13571367
$eiEntryStr .=
13581368
" l_entries[$eiEntryCount].target_cdg.iv_calloutPriority = fapi2::CalloutPriorities::$priority; \\\n";
1369+
$eiEntryStr .=
1370+
" l_entries[$eiEntryCount].target_cdg.iv_gardType = fapi2::GardTypes::$gardType; \\\n";
13591371
$eiEntryCount++;
13601372
}
13611373

0 commit comments

Comments
 (0)