summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/test/fapi2GetChipletNumTest.H
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-03-24 14:17:48 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-05-23 14:02:55 -0400
commit3d40df249d4ff2f2f6a3c17dcab7d069a355d28a (patch)
treec4dae42b02565637586d2c254ab8077a3dac1658 /src/usr/fapi2/test/fapi2GetChipletNumTest.H
parentda1946689af4b765c9ad5c6a7f64cc4f34df252a (diff)
downloadtalos-hostboot-3d40df249d4ff2f2f6a3c17dcab7d069a355d28a.tar.gz
talos-hostboot-3d40df249d4ff2f2f6a3c17dcab7d069a355d28a.zip
Changing NV target to OBUS_BRICK and mark it a child of OBUS
Change-Id: I17b52033d1e6811c320f201056708f31ef34d0e9 RTC:171597 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38481 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/test/fapi2GetChipletNumTest.H')
-rw-r--r--src/usr/fapi2/test/fapi2GetChipletNumTest.H36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/usr/fapi2/test/fapi2GetChipletNumTest.H b/src/usr/fapi2/test/fapi2GetChipletNumTest.H
index 01c65c0bc..1057c076a 100644
--- a/src/usr/fapi2/test/fapi2GetChipletNumTest.H
+++ b/src/usr/fapi2/test/fapi2GetChipletNumTest.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -104,54 +104,58 @@ class Fapi2GetChipletNum : public CxxTest::TestSuite
FAPI_INF("Complete testVerifyiPhbChipletNum");
}
- void testVerifyNvChipletNum()
+ void testVerifyObusBrickChipletNum()
{
uint8_t l_chiplet_id = 0;
uint8_t l_exp_chiplet_id = 0;
+ uint8_t l_chip_unit = 0;
- FAPI_INF ("Start testVerifyNvChipletNum");
+ FAPI_INF ("Start testVerifyObusBrickChipletNum");
do
{
- // find the all NV units
+ // find the all OBUS Brick units
TARGETING::Target * pSys;
TARGETING::targetService().getTopLevelTarget(pSys);
- TARGETING::PredicateCTM predNv(TARGETING::CLASS_UNIT,
- TARGETING::TYPE_NV);
+ TARGETING::PredicateCTM predObusBrick(TARGETING::CLASS_UNIT,
+ TARGETING::TYPE_OBUS_BRICK);
TARGETING::TargetHandleList l_TargetList;
TARGETING::targetService().getAssociated( l_TargetList, pSys,
TARGETING::TargetService::CHILD,
TARGETING::TargetService::ALL,
- &predNv);
+ &predObusBrick);
if (l_TargetList.empty())
{
- TS_FAIL("testVerifyNvChipletNum: empty l_TargetList");
+ TS_FAIL("testVerifyObusBrickChipletNum: empty l_TargetList");
break;
}
- // Iterate through all NV chiplets
+ // Iterate through all OBUS BRICK chiplets
for (auto & l_Target : l_TargetList)
{
// map Targeting Type to fapi2 Type
- Target<fapi2::TARGET_TYPE_NV> fapi2_Target( l_Target);
+ Target<fapi2::TARGET_TYPE_OBUS_BRICK> fapi2_Target( l_Target);
l_chiplet_id = fapi2_Target.getChipletNumber();
- FAPI_DBG("testVerifyNvChipletNum HUID: %.8X, ChipletId: %.8X",
+ FAPI_DBG("testVerifyObusBrickChipletNum HUID: %.8X, ChipletId: %.8X",
TARGETING::get_huid(l_Target), l_chiplet_id);
- // NV 0,1 maps to pervasive id 0x05
- l_exp_chiplet_id = START_NV_CHIPLET_NUM;
+ //OBUS Brick's chiplet id should be same as its parent
+ auto l_parent = static_cast<TARGETING::Target*>
+ (fapi2_Target.getParent<TARGET_TYPE_OBUS>());
+ l_chip_unit = l_parent->getAttr<TARGETING::ATTR_CHIP_UNIT>();
+ l_exp_chiplet_id = l_chip_unit + START_OBUS_BRICK_CHIPLET_NUM;
if (l_chiplet_id != l_exp_chiplet_id)
{
- TS_FAIL("testVerifyNvChipletNum: Mismatch - Expected: %.8X:, Found: %.8X",
+ TS_FAIL("testVerifyObusBrickChipletNum: Mismatch - Expected: %.8X:, Found: %.8X",
l_exp_chiplet_id, l_chiplet_id);
break;
}
}
} while(0);
- FAPI_INF("Complete testVerifyNvChipletNum");
+ FAPI_INF("Complete testVerifyObusBrickChipletNum");
}
void testVerifyPecChipletNum()
@@ -789,7 +793,7 @@ class Fapi2GetChipletNum : public CxxTest::TestSuite
testVerifyCappChipletNum();
- testVerifyNvChipletNum();
+ testVerifyObusBrickChipletNum();
testVerifyPecChipletNum();
OpenPOWER on IntegriCloud