From b8acb760d5f059e5d15008e8113d3f951dfe0e9b Mon Sep 17 00:00:00 2001 From: Santosh Puranik Date: Thu, 2 Feb 2017 05:12:46 -0600 Subject: Plat fixes for array ops -- Enable ATTR_CHIP_UNIT_POS on all chiplet targets -- Add PERV to compound target for getParent specialization Change-Id: I156e5b92b21c486f549543c63ed66f59f60fc9bc Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35789 Reviewed-by: Sachin Gupta Reviewed-by: Shakeeb A. Pasha B K Tested-by: Jenkins Server Reviewed-by: Santosh S. Puranik --- src/hwpf/include/plat/target.H | 4 ++-- src/hwpf/src/plat/plat_attribute_service.H | 24 +++++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'src/hwpf') 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 Target - Target::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& i_ptarget, TAttrStruct* object, const AttributeId a template void __get( const Target& 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 +inline +AttributeRC _getAttrChipUnitPos(const Target& 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& 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 */ -- cgit v1.2.1