diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2018-07-05 15:37:05 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-07-19 10:22:50 -0500 |
commit | d7cc38f0dbceb1ecf1fa033e3c7f8a15452fb8a7 (patch) | |
tree | 4a6e6e50c4ce9aaf529e76aa50650f88c8bdd7d7 /src/usr | |
parent | 63e6fb743366a2c03e3401c02c84314be5ecd602 (diff) | |
download | talos-hostboot-d7cc38f0dbceb1ecf1fa033e3c7f8a15452fb8a7.tar.gz talos-hostboot-d7cc38f0dbceb1ecf1fa033e3c7f8a15452fb8a7.zip |
Adding VPD testing data for Cumulus and Nimbus.
We turned off some VPD tests when we branched to include
cumulus. However, the VPD is different between the two and the
tests have to be different to match. This commit splits up the
testing array into two and tests depending on what system we're on.
I picked out a random sampling of VPD keyword record pairs.
Change-Id: I56949b260278e132008cc9c22068a41cc9f3bc7d
RTC:190805
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/61909
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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>
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/vpd/test/cvpdtest.H | 106 |
1 files changed, 91 insertions, 15 deletions
diff --git a/src/usr/vpd/test/cvpdtest.H b/src/usr/vpd/test/cvpdtest.H index 0d2bbbece..cb24d9faf 100755 --- a/src/usr/vpd/test/cvpdtest.H +++ b/src/usr/vpd/test/cvpdtest.H @@ -62,25 +62,48 @@ struct cvpdTestData * NOTE: By reading this entire list, it also validates that the records * and keywords that we expect to be there are actually there... */ -cvpdTestData cvpdData[] = +cvpdTestData cvpdDataNimbus[] = { { CVPD::VEIR, CVPD::pdI }, { CVPD::MER0, CVPD::pdI }, - // @todo RTC 178802 Enable test cases turned off during bring up - //{ CVPD::VSPD, CVPD::pdI }, - //{ CVPD::VSPD, CVPD::MT }, - //{ CVPD::VSPD, CVPD::MR }, - //{ CVPD::VSPD, CVPD::pdA }, - //{ CVPD::VSPD, CVPD::EL }, - //{ CVPD::VSPD, CVPD::LM }, - //{ CVPD::VSPD, CVPD::MW }, - //{ CVPD::VSPD, CVPD::MV }, - //{ CVPD::VSPD, CVPD::AM }, + { CVPD::VSPD, CVPD::pdI }, + { CVPD::VSPD, CVPD::MT }, + { CVPD::VSPD, CVPD::MR }, + { CVPD::VSPD, CVPD::pdA }, + { CVPD::VSPD, CVPD::EL }, + { CVPD::VSPD, CVPD::LM }, + { CVPD::VSPD, CVPD::MW }, + { CVPD::VSPD, CVPD::MV }, + { CVPD::VSPD, CVPD::AM }, { CVPD::VINI, CVPD::VZ }, - //{ CVPD::VSPD, CVPD::MX }, + { CVPD::VSPD, CVPD::MX }, }; +cvpdTestData cvpdDataCumulus[] = +{ + { CVPD::VEIR, CVPD::pdI }, + { CVPD::MER0, CVPD::pdI }, + { CVPD::VINI, CVPD::VZ }, + { CVPD::VINI, CVPD::FN }, + { CVPD::VINI, CVPD::PN }, + { CVPD::VINI, CVPD::HE }, + { CVPD::VINI, CVPD::CT }, + { CVPD::OPFR, CVPD::VD }, + { CVPD::OPFR, CVPD::DR }, + { CVPD::OPFR, CVPD::VP }, + { CVPD::VNDR, CVPD::VD }, + { CVPD::SPDX, CVPD::VM }, + { CVPD::SPDX, CVPD::M0 }, + { CVPD::SPDX, CVPD::M5 }, + { CVPD::SPDX, CVPD::DW }, + { CVPD::SPDX, CVPD::MX }, + { CVPD::SPDX, CVPD::Q0 }, + { CVPD::SPDX, CVPD::K0 }, + +}; + + void getMembufTargets( TargetHandleList & o_membufList ) { // Get top level system target @@ -105,6 +128,38 @@ void getMembufTargets( TargetHandleList & o_membufList ) return; } +bool isNimbusModel(void) +{ + TRACDCOMP( g_trac_vpd, "isNimbusModel() - what model is running"); + + bool isNimbus = false; + TARGETING::TargetService & tS = TARGETING::targetService(); + TARGETING::Target * sysTarget = NULL; + TargetHandleList l_chipList; + tS.getTopLevelTarget( sysTarget ); + assert( sysTarget != NULL ); + + + TARGETING::PredicateCTM predChip( TARGETING::CLASS_CHIP, + TARGETING::TYPE_PROC ); + + tS.getAssociated( l_chipList, + sysTarget, + TARGETING::TargetService::CHILD, + TARGETING::TargetService::ALL, + &predChip ); + + if(TARGETING::MODEL_NIMBUS == + l_chipList[0]->getAttr<TARGETING::ATTR_MODEL>()) + { + isNimbus = true; + } + + TRACDCOMP( g_trac_vpd, "isNimbusModel() exit"); + + return isNimbus; +} + TARGETING::Target* getFunctionalMembufTarget() { TARGETING::Target * theTarget = NULL; @@ -140,6 +195,7 @@ class CVPDTest: public CxxTest::TestSuite { public: + /** * @brief This function will test CVPD reads. */ @@ -166,12 +222,32 @@ class CVPDTest: public CxxTest::TestSuite uint8_t * theData = NULL; size_t theSize = 0; - const uint32_t numCmds = sizeof(cvpdData)/sizeof(cvpdData[0]); + uint32_t numCmds; + + bool isNimbus = isNimbusModel(); + + if(isNimbus) + { + numCmds = sizeof(cvpdDataNimbus)/sizeof(cvpdDataNimbus[0]); + }else + { + numCmds = sizeof(cvpdDataCumulus)/sizeof( + cvpdDataCumulus[0]); + } + for( uint32_t curCmd = 0; curCmd < numCmds; curCmd++ ) { cmds++; - theRecord = (uint64_t)cvpdData[curCmd].record; - theKeyword = (uint64_t)cvpdData[curCmd].keyword; + if(isNimbus) + { + theRecord = (uint64_t)cvpdDataNimbus[curCmd].record; + theKeyword = (uint64_t)cvpdDataNimbus[curCmd].keyword; + }else + { + theRecord = (uint64_t)cvpdDataCumulus[curCmd].record; + theKeyword = (uint64_t)cvpdDataCumulus[curCmd].keyword; + } + err = deviceRead( theTarget, NULL, theSize, |