summaryrefslogtreecommitdiffstats
path: root/hwpf/include
diff options
context:
space:
mode:
authorGreg Still <stillgs@us.ibm.com>2015-11-24 19:21:05 -0600
committerGregory S. Still <stillgs@us.ibm.com>2016-01-25 08:41:27 -0600
commit1e33470b9f718cd95f4810ee1798f39c5425e47d (patch)
tree9305d366693c88d0e78a600d2cb19e8f23b4fe0d /hwpf/include
parent40a4fdbc442230634723bf528085be8d984bedea (diff)
downloadtalos-sbe-1e33470b9f718cd95f4810ee1798f39c5425e47d.tar.gz
talos-sbe-1e33470b9f718cd95f4810ee1798f39c5425e47d.zip
Update PPE target to uint32_t and include MI target
- Reduces the vector storage needs to allow additional targets in the future - Added a valid bit to the target as the old means of checking for an already formed target (when uint64_t was used) no longer works. - Add MI target type support for compilation. No MI target addressing support is present at this time as this is a Cummuls only function Change-Id: I1ed89392cc232f31141febc108e7ba0fb7bf65bd Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22737 Tested-by: Jenkins Server Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'hwpf/include')
-rw-r--r--hwpf/include/fapi2_target.H22
-rw-r--r--hwpf/include/plat/plat_target.H4
-rw-r--r--hwpf/include/plat/target.H24
-rw-r--r--hwpf/include/target_types.H33
4 files changed, 38 insertions, 45 deletions
diff --git a/hwpf/include/fapi2_target.H b/hwpf/include/fapi2_target.H
index f8c458b2..363c371e 100644
--- a/hwpf/include/fapi2_target.H
+++ b/hwpf/include/fapi2_target.H
@@ -214,7 +214,7 @@ namespace fapi2
/// in order. That is, core 0 is std::vector[0].
///
template< TargetType T>
- inline std::vector<Target<T> >
+ std::vector<Target<T> >
getChildren(const TargetState i_state = TARGET_STATE_FUNCTIONAL) const;
///
@@ -295,7 +295,7 @@ namespace fapi2
///
inline V getAddressOverlay(void) const
{
- return this->iv_handle.fields.address_overlay;
+ return (iv_handle.value & 0xFF000000);
}
///
@@ -304,7 +304,7 @@ namespace fapi2
///
inline uint32_t getTargetNumber(void) const
{
- return static_cast<uint32_t>(this->iv_handle.fields.type_target_num);
+ return static_cast<uint32_t>(iv_handle.fields.type_target_num);
}
///
@@ -313,7 +313,7 @@ namespace fapi2
///
inline TargetTypes_t getTargetType(void) const
{
- return static_cast<TargetTypes_t>(this->iv_handle.fields.type);
+ return static_cast<TargetTypes_t>(iv_handle.fields.type);
}
///
@@ -322,7 +322,7 @@ namespace fapi2
///
inline ChipletNumber_t getChipletNumber(void) const
{
- return static_cast<ChipletNumber_t>(this->iv_handle.fields.chiplet_num);
+ return static_cast<ChipletNumber_t>(iv_handle.fields.chiplet_num);
}
#endif
@@ -339,17 +339,17 @@ namespace fapi2
#ifdef _BIG_ENDIAN
V chiplet_num : 8;
V type_target_num : 8;
- V type : 8;
- V _reserved_b6 : 6;
V present : 1;
V functional : 1;
- V address_overlay : 32;
+ V _reserved_b1 : 1;
+ V valid : 1;
+ V type : 12;
#else
- V address_overlay : 32;
+ V type : 12;
+ V valid : 1;
+ V _reserved_b1 : 1;
V functional : 1;
V present : 1;
- V _reserved_b6 : 6;
- V type : 8;
V type_target_num : 8;
V chiplet_num : 8;
#endif
diff --git a/hwpf/include/plat/plat_target.H b/hwpf/include/plat/plat_target.H
index 3e28c1da..0468dd02 100644
--- a/hwpf/include/plat/plat_target.H
+++ b/hwpf/include/plat/plat_target.H
@@ -29,11 +29,11 @@
//
// Define what a platform handle looks like. For Hostboot,
// for example, this might be a void*. For the SBE, this
-// will be a uint64_t ...
+// will be a uint32_t ...
//
namespace fapi2
{
-typedef uint64_t plat_target_handle_t;
+ typedef uint32_t plat_target_handle_t;
}
#endif
diff --git a/hwpf/include/plat/target.H b/hwpf/include/plat/target.H
index 7fb907ef..79d61f7f 100644
--- a/hwpf/include/plat/target.H
+++ b/hwpf/include/plat/target.H
@@ -56,7 +56,7 @@ namespace fapi2
Target<K, V>::Target(V Value)
{
// Already formed target handle?
- if(static_cast<union iv_handle>(Value).fields.type != 0)
+ if(static_cast<union iv_handle>(Value).fields.valid == 1)
{
this->iv_handle.value = Value;
return;
@@ -69,51 +69,45 @@ namespace fapi2
this->iv_handle.fields.type = TARGET_TYPE_PROC_CHIP;
this->iv_handle.fields.type_target_num = 0;
}
-
- if(K & TARGET_TYPE_PERV)
+ else if(K & TARGET_TYPE_PERV)
{
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;
}
-
- if(K & TARGET_TYPE_CORE)
+ else if(K & TARGET_TYPE_CORE)
{
this->iv_handle.fields.chiplet_num = Value + CORE_CHIPLET_OFFSET;
this->iv_handle.fields.type = TARGET_TYPE_CORE | TARGET_TYPE_PERV;
this->iv_handle.fields.type_target_num = Value;
}
-
- if(K & TARGET_TYPE_EQ)
+ else if(K & TARGET_TYPE_EQ)
{
this->iv_handle.fields.chiplet_num = Value + EQ_CHIPLET_OFFSET;
this->iv_handle.fields.type = TARGET_TYPE_EQ | TARGET_TYPE_PERV;
this->iv_handle.fields.type_target_num = Value;
}
-
- if(K & TARGET_TYPE_EX)
+ else if(K & TARGET_TYPE_EX)
{
this->iv_handle.fields.chiplet_num = (Value / 2) + EX_CHIPLET_OFFSET;
this->iv_handle.fields.type = TARGET_TYPE_EX | TARGET_TYPE_PERV;
this->iv_handle.fields.type_target_num = Value;
}
-
- if(K & TARGET_TYPE_MCS)
+ else if(K & TARGET_TYPE_MCS)
{
this->iv_handle.fields.chiplet_num = Value + MCS_CHIPLET_OFFSET;
this->iv_handle.fields.type = TARGET_TYPE_MCS | TARGET_TYPE_PERV;
this->iv_handle.fields.type_target_num = Value;
}
-
- if(K == TARGET_TYPE_ALL)
+ else if(K == TARGET_TYPE_ALL)
{
this->iv_handle.fields.chiplet_num = Value;
this->iv_handle.fields.type = TARGET_TYPE_ALL;
}
- this->iv_handle.fields.address_overlay =
- (this->iv_handle.fields.chiplet_num << 24);
+
+ this->iv_handle.fields.valid = 1;
}
diff --git a/hwpf/include/target_types.H b/hwpf/include/target_types.H
index 56470cd0..ca5c6af8 100644
--- a/hwpf/include/target_types.H
+++ b/hwpf/include/target_types.H
@@ -32,7 +32,6 @@
#ifndef __ASSEMBLER__
-
/// FAPI namespace
namespace fapi2
{
@@ -47,19 +46,19 @@ namespace fapi2
/// Target Kind
enum TargetType
{
- TARGET_TYPE_NONE = 0x00, ///< No type
- TARGET_TYPE_PROC_CHIP = 0x01, ///< Processor type
- TARGET_TYPE_EX = 0x02, ///< Ex type
- TARGET_TYPE_CORE = 0x04, ///< Core type
- TARGET_TYPE_EQ = 0x08, ///< EQ type
- TARGET_TYPE_MCS = 0x10, ///< MCS type
- TARGET_TYPE_PERV = 0x20, ///< Pervasive type
- TARGET_TYPE_MCAST = 0x40, ///< Multicast type
- TARGET_TYPE_SYSTEM = 0x80, ///< System type
-
- TARGET_TYPE_ALL = 0xFF, ///< Any/All types
+ TARGET_TYPE_NONE = 0x00, ///< No type
+ TARGET_TYPE_PROC_CHIP = 0x01, ///< Processor type
+ TARGET_TYPE_EX = 0x02, ///< Ex type
+ TARGET_TYPE_CORE = 0x04, ///< Core type
+ TARGET_TYPE_EQ = 0x08, ///< EQ type
+ TARGET_TYPE_MCS = 0x10, ///< MCS type
+ TARGET_TYPE_PERV = 0x20, ///< Pervasive type
+ TARGET_TYPE_MCAST = 0x40, ///< Multicast type
+ TARGET_TYPE_MI = 0x80, ///< MI type
+ TARGET_TYPE_SYSTEM = 0x100, ///< System type
+ TARGET_TYPE_ALL = 0xFFF, ///< Any/All types
- // The following are actually illegal targets on PPE platforms
+ // The following are actually illegal targets on PPE platforms
// TARGET_TYPE_SYSTEM = 0xFE, ///< System type
// TARGET_TYPE_DIMM = 0xFD, ///< DIMM type
// TARGET_TYPE_MEMBUF_CHIP = 0xFC, ///< Membuf type
@@ -77,8 +76,8 @@ namespace fapi2
// TARGET_TYPE_SBE = 0xF0, ///< SBE type
// TARGET_TYPE_PPE = 0xEF, ///< PPE type
// TARGET_TYPE_PEC = 0xEE, ///< PEC type
-// TARGET_TYPE_PHB = 0xED, ///< PHB type
-// TARGET_TYPE_MI = 0xEC, ///< MI type
+// TARGET_TYPE_PHB = 0xED, ///< PHB type
+// TARGET_TYPE_MI = 0xEC, ///< MI type
// Mappings to target types found in the error xml files
TARGET_TYPE_EX_CHIPLET = TARGET_TYPE_EX,
@@ -87,11 +86,11 @@ namespace fapi2
// TARGET_TYPE_XBUS_ENDPOINT = TARGET_TYPE_XBUS,
// TARGET_TYPE_ABUS_ENDPOINT = TARGET_TYPE_ABUS,
};
-
+
///
/// @brief Typedef used when passing multiple TargetType values
///
- typedef uint8_t TargetTypes_t;
+ typedef uint16_t TargetTypes_t;
/// @cond
constexpr TargetType operator|(TargetType x, TargetType y)
OpenPOWER on IntegriCloud