Skip to content

Commit 063271d

Browse files
skumar8jdcrowell77
authored andcommitted
Parsing of POZ FFDC target for platform.
Change-Id: I2bc16e2315688b7a8f90c78d2f2bb6a6d7ed010f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/160118 Tested-by: Jenkins Server <[email protected]> Tested-by: FSP CI Jenkins <[email protected]> Reviewed-by: Rajees P P <[email protected]> Tested-by: HWSV CI <[email protected]> Tested-by: Hostboot CI <[email protected]> Tested-by: PPE CI <[email protected]> Reviewed-by: Srikantha Meesala <[email protected]> Reviewed-by: James Sponaugle <[email protected]> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/160123 Tested-by: Jenkins OP Build CI <[email protected]> Tested-by: Jenkins Combined Simics CI <[email protected]> Reviewed-by: Daniel M Crowell <[email protected]>
1 parent 45144e6 commit 063271d

File tree

1 file changed

+56
-18
lines changed

1 file changed

+56
-18
lines changed

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

+56-18
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,31 @@
4040
#endif
4141
namespace fapi2
4242
{
43+
44+
// POZ SBE will convert its plat target to the structure, sbe_target_info
45+
// before streaming to HB/BMC/FSP as part of HWP FFDC. Platfrom will try
46+
// to create the target based on this strucuture to guard, callout etc.
47+
48+
union sbe_target_info
49+
{
50+
uint64_t value;
51+
struct
52+
{
53+
uint64_t logtargetType: 8; // used for target type
54+
uint64_t : 40; // for future use
55+
union
56+
{
57+
uint64_t instanceID: 16;
58+
struct
59+
{
60+
uint64_t mcast_type: 3;
61+
uint64_t mcast_group: 3;
62+
uint64_t : 10;
63+
} __attribute__((packed));
64+
} __attribute__((packed));
65+
} __attribute__((packed));
66+
};
67+
4368
// For HW callout - Clock position undefined to 0xFF(default)
4469
#define CLOCK_POS_UNDEF 0xFF
4570
#define AVSBUS_UNDEF 0xFF
@@ -358,15 +383,22 @@ inline fapi2::ffdc_t getFfdcData(sbeFfdc_t& i_sbeFfdc,
358383

359384
if(l_ffdc.size() == EI_FFDC_SIZE_TARGET)
360385
{
361-
#ifdef FAPI2_ENABLE_PLATFORM_GET_TARGET
362386

387+
#ifndef FAPI2_ENABLE_PLATFORM_GET_TARGET
388+
// Circumvent warning: unused parameter 'i_sbeChip_instance' [-Wunused-parameter]
389+
static_cast<void>(i_sbeChip_instance);
390+
static_cast<void>(i_sbeChipTargetType);
391+
#else
363392
uint64_t targetData = i_sbeFfdc.data;
393+
// get a fapi target for the passed in chip instance
394+
fapi2::Target<TARGET_TYPE_ANY_POZ_CHIP> l_sbeChip;
364395

365396
// For P10, target data will be in format
366397
// 0:47 = target type
367398
// 48:63 = instance
368399
if (i_sbeChipTargetType == TARGET_TYPE_PROC_CHIP)
369400
{
401+
l_sbeChip = getTarget<TARGET_TYPE_PROC_CHIP>(i_sbeChip_instance);
370402
fapi2::TargetType type = static_cast<fapi2::TargetType>(targetData >> 16);
371403

372404
// sbe returns the target instance based on processor scope,
@@ -392,30 +424,36 @@ inline fapi2::ffdc_t getFfdcData(sbeFfdc_t& i_sbeFfdc,
392424
}
393425
}
394426
}
395-
// For Odyssey, target data will be in format:
396-
// 0:7 = log target type
397-
// 8:47 = reserved
398-
// 48:63 = instance
427+
// For Odyssey, target data will be in format of sbe_target_info, defined above.
399428
else
400429
{
401-
// Pull log target type and instance out of the target data.
402-
LogTargetType l_log_type = static_cast<fapi2::LogTargetType>(targetData >> 56);
403-
uint16_t instance = static_cast<uint16_t>(targetData & 0xFFFF);
404-
// Convert log target type to TargetType
405-
TargetType l_type = logToTargetType(l_log_type);
430+
sbe_target_info poztargetData = { .value = targetData };
406431

407-
uint16_t fapi_pos = convertSbeTargInstanceToFapiPos(l_type,
408-
instance,
409-
i_sbeChipTargetType,
410-
i_sbeChip_instance);
411-
412-
if( fapi_pos == INVALID_FAPI_POS )
432+
if(poztargetData.logtargetType != LOG_TARGET_TYPE_MULTICAST)
413433
{
414-
invalid_data = true;
434+
// Convert log target type to TargetType
435+
TargetType l_type = logToTargetType(static_cast<fapi2::LogTargetType>(poztargetData.logtargetType));
436+
437+
uint16_t fapi_pos = convertSbeTargInstanceToFapiPos(l_type,
438+
poztargetData.instanceID,
439+
i_sbeChipTargetType,
440+
i_sbeChip_instance);
441+
442+
if( fapi_pos == INVALID_FAPI_POS )
443+
{
444+
invalid_data = true;
445+
}
446+
else
447+
{
448+
l_ffdc.ptr() = static_cast<void*>(getTarget<TARGET_TYPE_ALL>(l_type, fapi_pos));
449+
}
415450
}
416451
else
417452
{
418-
l_ffdc.ptr() = static_cast<void*>(getTarget<TARGET_TYPE_ALL>(l_type, fapi_pos));
453+
// TARGET TYPE MULTICAST
454+
//TODO : getTarget has to be enhanced to create the MULTICAST target
455+
// from the multicast group and multicast ID.
456+
invalid_data = true;
419457
}
420458

421459
}

0 commit comments

Comments
 (0)