diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2018-09-07 10:23:17 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2018-09-10 10:05:06 -0500 |
commit | c16e0b97bd2226d63a93a2dec286a5d3f49f71e7 (patch) | |
tree | 87499f8a6851464fa69157fc3e719a75d394601c /src/import/hwpf/fapi2 | |
parent | f629523b932bd6096460f845446e2ebb3c76908d (diff) | |
download | talos-hostboot-c16e0b97bd2226d63a93a2dec286a5d3f49f71e7.tar.gz talos-hostboot-c16e0b97bd2226d63a93a2dec286a5d3f49f71e7.zip |
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 <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65835
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2')
-rw-r--r-- | src/import/hwpf/fapi2/src/fapi2_utils.C | 159 |
1 files changed, 85 insertions, 74 deletions
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; } |