From c16e0b97bd2226d63a93a2dec286a5d3f49f71e7 Mon Sep 17 00:00:00 2001 From: "Richard J. Knight" Date: Fri, 7 Sep 2018 10:23:17 -0500 Subject: get FAPI_POS for all valid target types passed in SBE FIFO ffdc -In some cases the the SBE will return a proc target type as part of the SBE FFDC buffer, the current code only considers non-proc types when converting the FFDC buffer contents to a target. This commit will correctly convert all valid target types passed back in the FFDC buffer. Change-Id: If9f3542f18b72652d3353b6f167a264fcba21352 CQ:SW444855 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65832 Tested-by: Jenkins Server Reviewed-by: Christian R. Geddes Tested-by: HWSV CI Reviewed-by: Dean Sanner Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65835 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins --- src/import/hwpf/fapi2/src/fapi2_utils.C | 159 +++++++++++++++++--------------- 1 file changed, 85 insertions(+), 74 deletions(-) (limited to 'src/import/hwpf') diff --git a/src/import/hwpf/fapi2/src/fapi2_utils.C b/src/import/hwpf/fapi2/src/fapi2_utils.C index f1c364f77..f1124d508 100644 --- a/src/import/hwpf/fapi2/src/fapi2_utils.C +++ b/src/import/hwpf/fapi2/src/fapi2_utils.C @@ -84,86 +84,97 @@ uint16_t convertSbeTargInstanceToFapiPos(fapi2::TargetType i_targType, FAPI_ATTR_GET(fapi2::ATTR_FAPI_POS, i_proc, l_procPosition); - switch( i_targType ) + // if the target type being converted is a proc chip, then + // it will be the same proc as the sbe instance, just return that one + if(i_targType == TARGET_TYPE_PROC_CHIP ) { - case TARGET_TYPE_EQ: - { - max_targets = MAX_EQ_PER_PROC; - break; - } - - case TARGET_TYPE_CORE: - { - max_targets = MAX_CORE_PER_PROC; - break; - } - - case TARGET_TYPE_EX: - { - max_targets = MAX_EX_PER_PROC; - break; - } - - case TARGET_TYPE_MCS: - { - max_targets = MAX_MCS_PER_PROC; - break; - } - - case TARGET_TYPE_MCA: - { - max_targets = MAX_MCA_PER_PROC; - break; - } - - case TARGET_TYPE_MC: - { - max_targets = MAX_MC_PER_PROC; - break; - } - - case TARGET_TYPE_MI: - { - max_targets = MAX_MI_PER_PROC; - break; - } - - case TARGET_TYPE_PHB: - { - max_targets = MAX_PHB_PER_PROC; - break; - } - - case TARGET_TYPE_MCBIST: - { - max_targets = MAX_MCBIST_PER_PROC; - break; - } - - case TARGET_TYPE_PERV: - { - max_targets = MAX_PERV_PER_PROC; - break; - } - - default: - max_targets = INVALID_TARGET_COUNT; - break; - } - - if( max_targets == INVALID_TARGET_COUNT ) - { - FAPI_ERR("Unable to determine the target count " - "for target type = 0x%x and instance 0x%d " - "associated with proc position %d", - i_targType, i_instance, l_procPosition); + fapi_pos = l_procPosition; } else { - fapi_pos = max_targets * l_procPosition + - (i_instance % max_targets); + switch( i_targType ) + { + case TARGET_TYPE_EQ: + { + max_targets = MAX_EQ_PER_PROC; + break; + } + + case TARGET_TYPE_CORE: + { + max_targets = MAX_CORE_PER_PROC; + break; + } + + case TARGET_TYPE_EX: + { + max_targets = MAX_EX_PER_PROC; + break; + } + + case TARGET_TYPE_MCS: + { + max_targets = MAX_MCS_PER_PROC; + break; + } + + case TARGET_TYPE_MCA: + { + max_targets = MAX_MCA_PER_PROC; + break; + } + + case TARGET_TYPE_MC: + { + max_targets = MAX_MC_PER_PROC; + break; + } + + case TARGET_TYPE_MI: + { + max_targets = MAX_MI_PER_PROC; + break; + } + + case TARGET_TYPE_PHB: + { + max_targets = MAX_PHB_PER_PROC; + break; + } + + case TARGET_TYPE_MCBIST: + { + max_targets = MAX_MCBIST_PER_PROC; + break; + } + + case TARGET_TYPE_PERV: + { + max_targets = MAX_PERV_PER_PROC; + break; + } + + default: + max_targets = INVALID_TARGET_COUNT; + break; + } + + if( max_targets == INVALID_TARGET_COUNT ) + { + FAPI_ERR("Unable to determine the target count " + "for target type = 0x%x and instance 0x%d " + "associated with proc position %d", + i_targType, i_instance, l_procPosition); + } + else + { + fapi_pos = max_targets * l_procPosition + + (i_instance % max_targets); + } } + FAPI_INF("Returning FAPI_POS= %d for target type 0x%x", fapi_pos, i_targType); + return fapi_pos; } -- cgit v1.2.1