diff options
author | Bill Schwartz <whs@us.ibm.com> | 2013-01-30 16:30:42 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-02-08 10:34:35 -0600 |
commit | 74c20caefdab7f7aa9268dd3f359f2038cee8ccf (patch) | |
tree | b35a48fe1ea86bf181c16a5bfbcd4a5f5d823cab /src/usr/hwpf/hwp/fapiTestHwpConfig.C | |
parent | 6261fa26ccb412df36bb9ec400e85f9cc6e9cfb9 (diff) | |
download | talos-hostboot-74c20caefdab7f7aa9268dd3f359f2038cee8ccf.tar.gz talos-hostboot-74c20caefdab7f7aa9268dd3f359f2038cee8ccf.zip |
FAPI Interface to get the target on the other side of the DMI bus
Add new fapiGetOtherSideOfMemChannel function
Replace getAffinityChips with more general getChildAffinityTargets
and added getParentAffinityTargets to find MCS from Centaur.
RTC: 61987
Change-Id: I772ef95452215c54fdfab98998507e6db5a862d0
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3062
Tested-by: Jenkins Server
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/fapiTestHwpConfig.C')
-rw-r--r-- | src/usr/hwpf/hwp/fapiTestHwpConfig.C | 138 |
1 files changed, 84 insertions, 54 deletions
diff --git a/src/usr/hwpf/hwp/fapiTestHwpConfig.C b/src/usr/hwpf/hwp/fapiTestHwpConfig.C index dfd290f96..f01811356 100644 --- a/src/usr/hwpf/hwp/fapiTestHwpConfig.C +++ b/src/usr/hwpf/hwp/fapiTestHwpConfig.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2012 */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ /* */ /* p1 */ /* */ @@ -58,61 +58,91 @@ fapi::ReturnCode hwpTestConfig(const fapi::Target & i_chip) fapi::ReturnCode l_rc; std::vector<fapi::Target> l_targets; - // Call fapiGetChildChiplets to get the child MCS chiplets - l_rc = fapiGetChildChiplets(i_chip, fapi::TARGET_TYPE_MCS_CHIPLET, + do { + + // Call fapiGetChildChiplets to get the child MCS chiplets + l_rc = fapiGetChildChiplets(i_chip, fapi::TARGET_TYPE_MCS_CHIPLET, l_targets); - if (l_rc) - { - FAPI_ERR("hwpTestConfig: Error from fapiGetChildChiplets"); - } - else - { - FAPI_INF("hwpTestConfig: %d MCS chiplets", l_targets.size()); - - if (l_targets.size() == 0) - { - FAPI_ERR("hwpTestConfig: No MCS chiplets"); - FAPI_SET_HWP_ERROR(l_rc, RC_TEST_CONFIG_NO_MCS_CHIPLETS); - } - else - { - // Save the first MCS target - fapi::Target l_mcs = l_targets[0]; - - // Call fapiGetAssociatedDimms to get the dimms for this MCS - l_rc = fapiGetAssociatedDimms(l_mcs, l_targets); - - if (l_rc) - { - FAPI_ERR("hwpTestConfig: Error from fapiGetAssociatedDimms"); - } - else - { - FAPI_INF("hwpTestConfig: %d dimms", l_targets.size()); - - // Call fapiGetParentChip to get the parent of the MCS - fapi::Target l_chip; - - l_rc = fapiGetParentChip(l_mcs, l_chip); - - if (l_rc) - { - FAPI_ERR("hwpTestConfig: Error from fapiGetParentChip"); - } - else - { - // Check that the parent chip is is same as the input chip - if (i_chip != l_chip) - { - FAPI_ERR("hwpTestConfig: Chip mismatch"); - FAPI_SET_HWP_ERROR(l_rc, - RC_TEST_CONFIG_PARENT_CHIP_MISMATCH); - } - } - } - } - } + if (l_rc) + { + FAPI_ERR("hwpTestConfig: Error from fapiGetChildChiplets"); + break; + } + + FAPI_INF("hwpTestConfig: %d MCS chiplets", l_targets.size()); + + if (l_targets.size() == 0) + { + FAPI_ERR("hwpTestConfig: No MCS chiplets"); + FAPI_SET_HWP_ERROR(l_rc, RC_TEST_CONFIG_NO_MCS_CHIPLETS); + break; + } + + // Save the first MCS target + fapi::Target l_mcs = l_targets[0]; + + // Call fapiGetAssociatedDimms to get the dimms for this MCS + l_rc = fapiGetAssociatedDimms(l_mcs, l_targets); + + if (l_rc) + { + FAPI_ERR("hwpTestConfig: Error from fapiGetAssociatedDimms"); + break; + } + + FAPI_INF("hwpTestConfig: %d dimms", l_targets.size()); + + // Call fapiGetParentChip to get the parent of the MCS + fapi::Target l_chip; + + l_rc = fapiGetParentChip(l_mcs, l_chip); + + if (l_rc) + { + FAPI_ERR("hwpTestConfig: Error from fapiGetParentChip"); + break; + } + + // Check that the parent chip is is same as the input chip + if (i_chip != l_chip) + { + FAPI_ERR("hwpTestConfig: Chip mismatch"); + FAPI_SET_HWP_ERROR(l_rc, RC_TEST_CONFIG_PARENT_CHIP_MISMATCH); + break; + } + + // Call fapiGetOtherSideOfDmiBus to get mem buffer + fapi::Target l_mb; + fapi::Target l_mcs2; + + FAPI_INF("hwpTestConfig: mcs: %s", l_mcs.toEcmdString()); + + l_rc = fapiGetOtherSideOfMemChannel(l_mcs, l_mb); + if (l_rc) + { + FAPI_ERR("hwpTestConfig: Error from fapiGetOtherSideOfDmiBus"); + break; + } + FAPI_INF("hwpTestConfig: mem buf: %s", l_mb.toEcmdString()); + + // Call fapiGetOtherSideOfDmiBus to get back to the same mcs + l_rc = fapiGetOtherSideOfMemChannel(l_mb, l_mcs2); + if (l_rc) + { + FAPI_ERR("hwpTestConfig: Error from fapiGetOtherSideOfDmiBus"); + break; + } + FAPI_INF("hwpTestConfig: mcs: %s", l_mcs2.toEcmdString()); + + if (l_mcs != l_mcs2) + { + FAPI_ERR("hwpTestConfig: fapiGetOtherSideOfDmiBus wrong mcs"); + FAPI_SET_HWP_ERROR(l_rc, RC_TEST_WRONG_MCS_RETURNED); + break; + } + + } while (0); FAPI_INF("hwpTestConfig: End HWP"); return l_rc; |