summaryrefslogtreecommitdiffstats
path: root/hwpf
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2015-11-26 09:50:39 -0600
committerGregory S. Still <stillgs@us.ibm.com>2015-12-07 12:26:22 -0600
commitf55221ba25ce801088973feb959635f7d77640c9 (patch)
tree3af636cc0e6ee2fa2821303dfe4cf04276d54fea /hwpf
parent6c83004785b99fa088369ee7835e913fe9403ccb (diff)
downloadtalos-sbe-f55221ba25ce801088973feb959635f7d77640c9.tar.gz
talos-sbe-f55221ba25ce801088973feb959635f7d77640c9.zip
Support PERV attributes also for EQ and CORE targets
-- CHIP_UNIT_POS==chiplet number for all pervasive chiplets -- Split erstwhile PERV targets into two NEST groups + MCS targets Change-Id: I034bc9f09e1afcd8c204f00a2b8ae5489d81a47a Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22344 Tested-by: Jenkins Server Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'hwpf')
-rw-r--r--hwpf/include/plat/plat_target_parms.H34
-rw-r--r--hwpf/include/plat/target.H2
-rw-r--r--hwpf/src/fapi2PlatAttributeService.C40
-rw-r--r--hwpf/src/plat/target.C76
4 files changed, 82 insertions, 70 deletions
diff --git a/hwpf/include/plat/plat_target_parms.H b/hwpf/include/plat/plat_target_parms.H
index eee8e9fe..72a00d48 100644
--- a/hwpf/include/plat/plat_target_parms.H
+++ b/hwpf/include/plat/plat_target_parms.H
@@ -36,13 +36,23 @@
CONST_UINT32_T(CHIP_TARGET_OFFSET, 0);
CONST_UINT32_T(CHIP_TARGET_COUNT , 1);
-// Pervasive Targets (note; these include the MCS targets as well)
-CONST_UINT32_T(PERV_TARGET_OFFSET, CHIP_TARGET_OFFSET + CHIP_TARGET_COUNT);
-CONST_UINT32_T(PERV_CHIPLET_OFFSET, 0x1);
-CONST_UINT32_T(PERV_TARGET_COUNT, 15);
+// Nest targets - Group 1
+CONST_UINT32_T(NEST_GROUP1_TARGET_OFFSET, CHIP_TARGET_OFFSET + CHIP_TARGET_COUNT);
+CONST_UINT32_T(NEST_GROUP1_CHIPLET_OFFSET, 0x1);
+CONST_UINT32_T(NEST_GROUP1_TARGET_COUNT, 6);
+
+// MCS targets
+CONST_UINT32_T(MCS_TARGET_OFFSET, NEST_GROUP1_TARGET_OFFSET + NEST_GROUP1_TARGET_COUNT);
+CONST_UINT32_T(MCS_CHIPLET_OFFSET, 0x7);
+CONST_UINT32_T(MCS_TARGET_COUNT, 2);
+
+// Nest targets - Group 2
+CONST_UINT32_T(NEST_GROUP2_TARGET_OFFSET, MCS_TARGET_OFFSET + MCS_TARGET_COUNT);
+CONST_UINT32_T(NEST_GROUP2_TARGET_COUNT, 7);
+CONST_UINT32_T(NEST_GROUP2_CHIPLET_OFFSET, 0x9);
// Cache Targets
-CONST_UINT32_T(EQ_TARGET_OFFSET, PERV_TARGET_OFFSET + PERV_TARGET_COUNT);
+CONST_UINT32_T(EQ_TARGET_OFFSET, NEST_GROUP2_TARGET_OFFSET + NEST_GROUP2_TARGET_COUNT);
CONST_UINT32_T(EQ_CHIPLET_OFFSET, 0x10);
CONST_UINT32_T(EQ_TARGET_COUNT, 6);
@@ -51,12 +61,7 @@ CONST_UINT32_T(CORE_TARGET_OFFSET, EQ_TARGET_OFFSET + EQ_TARGET_COUNT);
CONST_UINT32_T(CORE_CHIPLET_OFFSET, 0x20);
CONST_UINT32_T(CORE_TARGET_COUNT, 24);
-// MCS Targets (note: these are phyically Pervasive targets)
-CONST_UINT32_T(MCS_TARGET_OFFSET, CORE_TARGET_OFFSET + CORE_TARGET_COUNT);
-CONST_UINT32_T(MCS_CHIPLET_OFFSET, 0x7);
-CONST_UINT32_T(MCS_TARGET_COUNT, 2);
-
-CONST_UINT32_T(EX_TARGET_OFFSET, MCS_TARGET_OFFSET + MCS_TARGET_COUNT);
+CONST_UINT32_T(EX_TARGET_OFFSET, CORE_TARGET_OFFSET + CORE_TARGET_COUNT);
CONST_UINT32_T(EX_CHIPLET_OFFSET, 0x10);
CONST_UINT32_T(EX_TARGET_COUNT, 12);
@@ -67,12 +72,13 @@ CONST_UINT32_T(MCAST_TARGET_OFFSET, SYSTEM_TARGET_OFFSET + SYSTEM_TARGET_COUNT);
CONST_UINT32_T(MCAST_CHIPLET_OFFSET, 4);
CONST_UINT32_T(MCAST_TARGET_COUNT, 3); // PPE only needs multicast groups 4-6
+// Total number of pervasive targets (Both NEST groups + EQs + COREs +MCSs)
+CONST_UINT32_T(PERV_TARGET_COUNT, NEST_GROUP1_TARGET_COUNT + NEST_GROUP2_TARGET_COUNT +
+ MCS_TARGET_COUNT + EQ_TARGET_COUNT + CORE_TARGET_COUNT);
+
// Total Target Count
CONST_UINT32_T(TARGET_COUNT, CHIP_TARGET_COUNT +
PERV_TARGET_COUNT +
- EQ_TARGET_COUNT +
- CORE_TARGET_COUNT +
- MCS_TARGET_COUNT +
EX_TARGET_COUNT +
SYSTEM_TARGET_COUNT +
MCAST_TARGET_COUNT);
diff --git a/hwpf/include/plat/target.H b/hwpf/include/plat/target.H
index 12b6b566..2f1ec73d 100644
--- a/hwpf/include/plat/target.H
+++ b/hwpf/include/plat/target.H
@@ -69,7 +69,7 @@ namespace fapi2
if(K & TARGET_TYPE_PERV)
{
- this->iv_handle.fields.chiplet_num = Value;
+ this->iv_handle.fields.chiplet_num = Value + NEST_GROUP1_CHIPLET_OFFSET;
this->iv_handle.fields.type = TARGET_TYPE_PERV;
this->iv_handle.fields.type_target_num = Value;
}
diff --git a/hwpf/src/fapi2PlatAttributeService.C b/hwpf/src/fapi2PlatAttributeService.C
index 2fd8ac83..f9a13dd0 100644
--- a/hwpf/src/fapi2PlatAttributeService.C
+++ b/hwpf/src/fapi2PlatAttributeService.C
@@ -8,6 +8,28 @@
namespace fapi2 {
+uint32_t getPervAttrIndex(const fapi2::Target<TARGET_TYPE_PERV> &i_target)
+{
+ uint32_t l_index = i_target.getTargetNumber();
+ if(TARGET_TYPE_EQ & i_target.getTargetType())
+ {
+ l_index += (EQ_TARGET_OFFSET);
+ }
+ else if(TARGET_TYPE_CORE & i_target.getTargetType())
+ {
+ l_index += (CORE_TARGET_OFFSET);
+ }
+ else if(TARGET_TYPE_MCS & i_target.getTargetType())
+ {
+ l_index += (MCS_TARGET_OFFSET);
+ }
+ else
+ {
+ l_index += (NEST_GROUP1_TARGET_OFFSET);
+ }
+ return (l_index - NEST_GROUP1_TARGET_OFFSET);
+}
+
template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, uint8_t, fapi2::ATTR_BACKUP_SEEPROM_SELECT> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
{
*o_pvalue = object->fapi2attr::ProcChipAttributes_t::ATTR_BACKUP_SEEPROM_SELECT;
@@ -15,8 +37,7 @@ template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttribute
template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint8_t, fapi2::ATTR_CHIP_UNIT_POS> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint8_t* o_pvalue )
{
- uint32_t index = i_ptarget.getTargetNumber();
- *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_CHIP_UNIT_POS[index];
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_CHIP_UNIT_POS[getPervAttrIndex(i_ptarget)];
}
template<> void __get<fapi2::TARGET_TYPE_CORE, fapi2attr::CoreAttributes_t, uint32_t, fapi2::ATTR_CORE_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_ptarget, const fapi2attr::CoreAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
@@ -68,8 +89,7 @@ template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttribute
template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
{
- uint32_t index = i_ptarget.getTargetNumber();
- *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_GPTR_RING[index];
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_GPTR_RING[getPervAttrIndex(i_ptarget)];
}
template<> void __get<fapi2::TARGET_TYPE_EX, fapi2attr::EXAttributes_t, uint32_t, fapi2::ATTR_L2_GPTR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ptarget, const fapi2attr::EXAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
@@ -345,14 +365,12 @@ template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttribute
template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_PLL_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
{
- uint32_t index = i_ptarget.getTargetNumber();
- *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_PLL_RING[index];
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_PLL_RING[getPervAttrIndex(i_ptarget)];
}
template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_REPR_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
{
- uint32_t index = i_ptarget.getTargetNumber();
- *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_REPR_RING[index];
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_REPR_RING[getPervAttrIndex(i_ptarget)];
}
template<> void __get<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttributes_t, int32_t, fapi2::ATTR_SCRATCH_INT32_1> ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_ptarget, const fapi2attr::ProcChipAttributes_t* object, const fapi2::AttributeId attrid, int32_t* o_pvalue )
@@ -427,8 +445,7 @@ template<> void __set<fapi2::TARGET_TYPE_PROC_CHIP, fapi2attr::ProcChipAttribute
template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_PERV_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
{
- uint32_t index = i_ptarget.getTargetNumber();
- *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_SCRATCH_UINT32_PERV_ARRAY[index];
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_SCRATCH_UINT32_PERV_ARRAY[getPervAttrIndex(i_ptarget)];
}
template<> void __set<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_SCRATCH_UINT32_PERV_ARRAY> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, const uint32_t& i_pvalue )
@@ -479,8 +496,7 @@ template<> void __get<fapi2::TARGET_TYPE_SYSTEM, fapi2attr::SystemAttributes_t,
template<> void __get<fapi2::TARGET_TYPE_PERV, fapi2attr::PervAttributes_t, uint32_t, fapi2::ATTR_TIME_RING> ( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_ptarget, const fapi2attr::PervAttributes_t* object, const fapi2::AttributeId attrid, uint32_t* o_pvalue )
{
- uint32_t index = i_ptarget.getTargetNumber();
- *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_TIME_RING[index];
+ *o_pvalue = object->fapi2attr::PervAttributes_t::ATTR_TIME_RING[getPervAttrIndex(i_ptarget)];
}
} // namespace fapi2
diff --git a/hwpf/src/plat/target.C b/hwpf/src/plat/target.C
index 378bf14e..846fab64 100644
--- a/hwpf/src/plat/target.C
+++ b/hwpf/src/plat/target.C
@@ -315,103 +315,93 @@ fapi_try_exit:
for (uint32_t i = 0; i < TARGET_COUNT; ++i)
{
G_vec_targets.push_back((fapi2::plat_target_handle_t)0x0);
- FAPI_DBG("Nulling G_vec_targets[%u] hi value=0x%08X",
- i, (uint32_t)(G_vec_targets.at(i)>>32));
-
}
- FAPI_DBG("Vector size: %u", G_vec_targets.size());
/*
* Chip Target is the first one
*/
- FAPI_DBG("Chip Target info: CHIP_TARGET_OFFSET %u CHIP_TARGET_COUNT %u ",
- CHIP_TARGET_OFFSET,CHIP_TARGET_COUNT);
-
l_beginning_offset = CHIP_TARGET_OFFSET;
fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> chip_target((fapi2::plat_target_handle_t)0);
G_vec_targets.at(l_beginning_offset) = revle64((fapi2::plat_target_handle_t)(chip_target.get()));
/*
- * Pervasive Targets
+ * Nest Targets - group 1
*/
- FAPI_DBG("Pervasive Target info: PERV_TARGET_OFFSET %u PERV_TARGET_COUNT %u",
- PERV_TARGET_OFFSET, PERV_TARGET_COUNT);
-
- l_beginning_offset = PERV_TARGET_OFFSET;
- for (uint32_t i = 0; i < PERV_TARGET_COUNT; ++i)
+ l_beginning_offset = NEST_GROUP1_TARGET_OFFSET;
+ for (uint32_t i = 0; i < NEST_GROUP1_TARGET_COUNT; ++i)
{
- fapi2::Target<fapi2::TARGET_TYPE_PERV> target_name((fapi2::plat_target_handle_t)i+1);
- FAPI_DBG("target_name i = %d hi word = 0x%08X", i+1, (uint32_t)(target_name.get()>>32));
+ fapi2::Target<fapi2::TARGET_TYPE_PERV> target_name((fapi2::plat_target_handle_t)i);
// Determine if the chiplet is present and, thus, functional
// via partial good attributes
FAPI_TRY(plat_TargetPresent(chip_target, target_name, b_present));
G_vec_targets.at(l_beginning_offset+i) = revle64((fapi2::plat_target_handle_t)(target_name.get()));
- FAPI_DBG("G offset = %d", l_beginning_offset+i);
}
/*
- * Cache (EQ) Targets
+ * Memory Controller Synchronous (MCS) Targets
*/
- FAPI_DBG("EQ Target info: EQ_TARGET_OFFSET %u EQ_TARGET_COUNT %u",
- EQ_TARGET_OFFSET, EQ_TARGET_COUNT);
- l_beginning_offset = EQ_TARGET_OFFSET;
- for (uint32_t i = 0; i < EQ_TARGET_COUNT; ++i)
+
+ l_beginning_offset = MCS_TARGET_OFFSET;
+ for (uint32_t i = 0; i < MCS_TARGET_COUNT; ++i)
{
- fapi2::Target<fapi2::TARGET_TYPE_EQ> target_name((fapi2::plat_target_handle_t)i);
- FAPI_DBG("target_name i = %d hi word = 0x%08X", i, (uint32_t)(target_name.get()>>32));
+ fapi2::Target<fapi2::TARGET_TYPE_MCS> target_name((fapi2::plat_target_handle_t)i);
// Determine if the chiplet is present and, thus, functional
// via partial good attributes
FAPI_TRY(plat_TargetPresent(chip_target, target_name, b_present));
G_vec_targets.at(l_beginning_offset+i) = revle64((fapi2::plat_target_handle_t)(target_name.get()));
- FAPI_DBG("G offset = %d", l_beginning_offset+i);
+
}
/*
- * Core (EC) Targets
+ * Nest Targets - group 2
*/
- FAPI_DBG("Core Target info: CORE_TARGET_OFFSET %u CORE_TARGET_COUNT %u",
- CORE_TARGET_OFFSET, CORE_TARGET_COUNT);
+ l_beginning_offset = NEST_GROUP2_TARGET_OFFSET;
+ for (uint32_t i = NEST_GROUP2_TARGET_OFFSET;
+ i < (NEST_GROUP2_TARGET_OFFSET + NEST_GROUP2_TARGET_COUNT); ++i)
+ {
+ fapi2::Target<fapi2::TARGET_TYPE_PERV> target_name((fapi2::plat_target_handle_t)(i - 1));
- l_beginning_offset = CORE_TARGET_OFFSET;
- FAPI_DBG("Core beginning offset =%u", l_beginning_offset);
- for (uint32_t i = 0; i < CORE_TARGET_COUNT; ++i)
+ // Determine if the chiplet is present and, thus, functional
+ // via partial good attributes
+ FAPI_TRY(plat_TargetPresent(chip_target, target_name, b_present));
+
+ G_vec_targets.at(i) = revle64((fapi2::plat_target_handle_t)(target_name.get()));
+ }
+
+ /*
+ * Cache (EQ) Targets
+ */
+ l_beginning_offset = EQ_TARGET_OFFSET;
+ for (uint32_t i = 0; i < EQ_TARGET_COUNT; ++i)
{
- fapi2::Target<fapi2::TARGET_TYPE_CORE> target_name((fapi2::plat_target_handle_t)i);
- FAPI_DBG("target_name i = %d hi word = 0x%08X", i, (uint32_t)(target_name.get()>>32));
+ fapi2::Target<fapi2::TARGET_TYPE_EQ> target_name((fapi2::plat_target_handle_t)i);
// Determine if the chiplet is present and, thus, functional
// via partial good attributes
FAPI_TRY(plat_TargetPresent(chip_target, target_name, b_present));
G_vec_targets.at(l_beginning_offset+i) = revle64((fapi2::plat_target_handle_t)(target_name.get()));
- FAPI_DBG("G offset = %d", l_beginning_offset+i);
}
/*
- * Memory Controller Synchronous (MCS) Targets
+ * Core (EC) Targets
*/
- FAPI_DBG("MCS Target info: MCS_TARGET_OFFSET %u MCS_TARGET_COUNT %u",
- MCS_TARGET_OFFSET, MCS_TARGET_COUNT);
- l_beginning_offset = MCS_TARGET_OFFSET;
- FAPI_DBG("MCS beginning offset =%u", l_beginning_offset);
- for (uint32_t i = 0; i < MCS_TARGET_COUNT; ++i)
+ l_beginning_offset = CORE_TARGET_OFFSET;
+ for (uint32_t i = 0; i < CORE_TARGET_COUNT; ++i)
{
- fapi2::Target<fapi2::TARGET_TYPE_MCS> target_name((fapi2::plat_target_handle_t)i);
- FAPI_DBG("target_name i = %d hi word = 0x%08X", i, (uint32_t)(target_name.get()>>32));
+ fapi2::Target<fapi2::TARGET_TYPE_CORE> target_name((fapi2::plat_target_handle_t)i);
// Determine if the chiplet is present and, thus, functional
// via partial good attributes
FAPI_TRY(plat_TargetPresent(chip_target, target_name, b_present));
G_vec_targets.at(l_beginning_offset+i) = revle64((fapi2::plat_target_handle_t)(target_name.get()));
- FAPI_DBG("G offset = %d", l_beginning_offset+i);
-
}
// Trace all entries
OpenPOWER on IntegriCloud