summaryrefslogtreecommitdiffstats
path: root/src/hwpf/src/plat/plat_attribute_service.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/hwpf/src/plat/plat_attribute_service.H')
-rw-r--r--src/hwpf/src/plat/plat_attribute_service.H24
1 files changed, 23 insertions, 1 deletions
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 */
OpenPOWER on IntegriCloud