From 1e33470b9f718cd95f4810ee1798f39c5425e47d Mon Sep 17 00:00:00 2001 From: Greg Still Date: Tue, 24 Nov 2015 19:21:05 -0600 Subject: 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 --- hwpf/include/plat/target.H | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'hwpf/include/plat/target.H') 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::Target(V Value) { // Already formed target handle? - if(static_cast(Value).fields.type != 0) + if(static_cast(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; } -- cgit v1.2.1