Skip to content

Commit

Permalink
Update getChildTargetsForCDG to use CEN PORT/DIMM
Browse files Browse the repository at this point in the history
The port and dimm sockets come off of the centaur on cumulus.
Update this function to look at the correct attributes.

These attribute do not exist on Cumulus so the default will
be to just return all dimms under the input target.

This code change affected the test case so an update was required
there as well (i.e. the fix for this defect).

Change-Id: I102c40acc124100e90dd832aeed94716c0f18811
CQ:SW428864
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59073
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
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>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
geissonator authored and dcrowell77 committed May 29, 2018
1 parent fc79c53 commit f1186fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/usr/fapi2/plat_utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,8 @@ void processEICDGs(const ErrorInfo & i_errInfo,
/// For DIMMs: DIMM Socket Number
/// For Chips: Chip Position
/// For Chiplets: Chiplet Position
/// @param[o] o_childTargets List of child targets matching input
/// criteria.
///
void getChildTargetsForCDG(
const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_parentTarget,
Expand Down Expand Up @@ -1081,11 +1083,11 @@ void getChildTargetsForCDG(
// Match i_childPort and i_childNum
if ( ((i_childPort == ErrorInfoChildrenCDG::ALL_CHILD_PORTS) ||
(i_childPort ==
(*l_itr)->getAttr<TARGETING::ATTR_MBA_PORT>()))
(*l_itr)->getAttr<TARGETING::ATTR_CEN_MBA_PORT>()))
&&
((i_childNum == ErrorInfoChildrenCDG::ALL_CHILD_NUMBERS) ||
(i_childNum ==
(*l_itr)->getAttr<TARGETING::ATTR_MBA_DIMM>())) )
(*l_itr)->getAttr<TARGETING::ATTR_CEN_MBA_DIMM>())) )
{
o_childTargets.push_back(*l_itr);
}
Expand Down
18 changes: 13 additions & 5 deletions src/usr/fapi2/test/fapi2GetChildrenTest.H
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,8 @@ void test_fapi2getChildTargetsForCDG()
TARGETING::Target * l_cumulusProc = nullptr;
TARGETING::Target * l_proc = nullptr;
size_t l_expectedDimms = 0;
size_t l_expectedDimmsUnderPort0 = 0;
size_t l_expectedDimmsUnderPort1 = 0;
do
{
FAPI_DBG("start of test_fapi2getChildTargetsForCDG()");
Expand All @@ -929,12 +931,16 @@ void test_fapi2getChildTargetsForCDG()
{
l_proc = l_nimbusProc;
l_expectedDimms = 16;

l_expectedDimmsUnderPort0 = l_expectedDimms;
l_expectedDimmsUnderPort1 = 0;
}
else if (l_cumulusProc != nullptr)
{
l_proc = l_cumulusProc;
l_expectedDimms = 8;
l_expectedDimmsUnderPort0 = l_expectedDimms/2;
l_expectedDimmsUnderPort1 = l_expectedDimms/2;

}
else //both are nullptr
{
Expand Down Expand Up @@ -973,10 +979,11 @@ void test_fapi2getChildTargetsForCDG()
FAPI_INF("test_fapi2getChildTargetsForCDG: Dimms under proc 0x%.08X port 0 is %d",
TARGETING::get_huid(l_proc),l_dimmList.size());
numTests++;
if(l_dimmList.size() != l_expectedDimms)

if(l_dimmList.size() != l_expectedDimmsUnderPort0)
{
FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under port 0 not equal expected %d",
l_dimmList.size(),l_expectedDimms);
l_dimmList.size(),l_expectedDimmsUnderPort0);
numFails++;
}

Expand All @@ -989,10 +996,11 @@ void test_fapi2getChildTargetsForCDG()
FAPI_INF("test_fapi2getChildTargetsForCDG: Dimms under proc 0x%.08X port 1 is %d",
TARGETING::get_huid(l_proc),l_dimmList.size());
numTests++;
if(l_dimmList.size() != 0)

if(l_dimmList.size() != l_expectedDimmsUnderPort1)
{
FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under port 1 not equal expected %d",
l_dimmList.size(),0);
l_dimmList.size(),l_expectedDimmsUnderPort1);
numFails++;
}

Expand Down

0 comments on commit f1186fd

Please sign in to comment.