summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/hwpf/include/plat/target.H4
-rw-r--r--src/hwpf/src/plat/plat_attribute_service.H24
-rwxr-xr-xsrc/tools/scripts/ppeParseAttributeInfo.pl50
3 files changed, 54 insertions, 24 deletions
diff --git a/src/hwpf/include/plat/target.H b/src/hwpf/include/plat/target.H
index a204a08c..b262ae8c 100644
--- a/src/hwpf/include/plat/target.H
+++ b/src/hwpf/include/plat/target.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -259,7 +259,7 @@ namespace fapi2
template<>
template<TargetType T>
Target<T, plat_target_handle_t>
- Target<TARGET_TYPE_PROC_CHIP | TARGET_TYPE_CORE | TARGET_TYPE_EX,
+ Target<TARGET_TYPE_PROC_CHIP | TARGET_TYPE_CORE | TARGET_TYPE_EX | TARGET_TYPE_PERV,
plat_target_handle_t>::getParent(void) const
{
static_assert(((T == TARGET_TYPE_PROC_CHIP) || (T == TARGET_TYPE_EQ)),
diff --git a/src/hwpf/src/plat/plat_attribute_service.H b/src/hwpf/src/plat/plat_attribute_service.H
index 86d78316..c54a5f28 100644
--- a/src/hwpf/src/plat/plat_attribute_service.H
+++ b/src/hwpf/src/plat/plat_attribute_service.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -237,6 +237,28 @@ void __set( const Target<K>& i_ptarget, TAttrStruct* object, const AttributeId a
template<TargetType K, typename TAttrStruct, typename TValue, AttributeId AId>
void __get( const Target<K>& i_ptarget, const TAttrStruct* object, const AttributeId attrid, TValue* value );
+#define ATTR_CHIP_UNIT_POS_GETMACRO PLAT_ATTR_GET_CHIP_UNIT_POS
+
+#define PLAT_ATTR_GET_CHIP_UNIT_POS(ID, PTARGET, VAL) \
+ _getAttrChipUnitPos(PTARGET, VAL)
+
+template<TargetType K>
+inline
+AttributeRC _getAttrChipUnitPos(const Target<K>& i_target,
+ ATTR_CHIP_UNIT_POS_Type& o_val)
+{
+ o_val = i_target.get().getTargetInstance();
+ return FAPI2_RC_SUCCESS;
+}
+
+template<>
+inline
+AttributeRC _getAttrChipUnitPos(const Target<TARGET_TYPE_PERV>& i_target,
+ ATTR_CHIP_UNIT_POS_Type& o_val)
+{
+ o_val = i_target.getChipletNumber();
+ return FAPI2_RC_SUCCESS;
+}
/* INSERT NEW GETTER AND SETTER FUNCTIONS HERE */
diff --git a/src/tools/scripts/ppeParseAttributeInfo.pl b/src/tools/scripts/ppeParseAttributeInfo.pl
index d43d4c7c..97188e8a 100755
--- a/src/tools/scripts/ppeParseAttributeInfo.pl
+++ b/src/tools/scripts/ppeParseAttributeInfo.pl
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2017
# [+] International Business Machines Corp.
#
#
@@ -480,28 +480,36 @@ foreach my $entr (@{$entries->{entry}}) {
print AIFILE "const fapi2::TargetType $attr->{id}_TargetType = ";
- # Split on commas
- my @targTypes = split(',', $attr->{targetType});
- my $targType = $targTypes[0];
-
- foreach my $targType (@targTypes)
+ if($attr->{id} eq 'ATTR_CHIP_UNIT_POS')
{
- # Remove newlines and leading/trailing whitespace
- $targType =~ s/\n//;
- $targType =~ s/^\s+//;
- $targType =~ s/\s+$//;
-
- # Consider only supported target types. The rest are ignored
- if($targType ~~ ["TARGET_TYPE_PROC_CHIP", "TARGET_TYPE_SYSTEM",
- "TARGET_TYPE_CORE", "TARGET_TYPE_MCS", "TARGET_TYPE_PERV",
- "TARGET_TYPE_EQ", "TARGET_TYPE_EX"])
- {
- print AIFILE "$targType";
- last;
- }
- else
+ # Default CHIP_UNIT_POS to all chiplet class targets
+ print AIFILE "TARGET_TYPE_CHIPLETS";
+ }
+ else
+ {
+ # Split on commas
+ my @targTypes = split(',', $attr->{targetType});
+ my $targType = $targTypes[0];
+
+ foreach my $targType (@targTypes)
{
- next;
+ # Remove newlines and leading/trailing whitespace
+ $targType =~ s/\n//;
+ $targType =~ s/^\s+//;
+ $targType =~ s/\s+$//;
+
+ # Consider only supported target types. The rest are ignored
+ if($targType ~~ ["TARGET_TYPE_PROC_CHIP", "TARGET_TYPE_SYSTEM",
+ "TARGET_TYPE_CORE", "TARGET_TYPE_MCS", "TARGET_TYPE_PERV",
+ "TARGET_TYPE_EQ", "TARGET_TYPE_EX"])
+ {
+ print AIFILE "$targType";
+ last;
+ }
+ else
+ {
+ next;
+ }
}
}
print AIFILE ";\n";
OpenPOWER on IntegriCloud