diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2016-02-01 09:07:03 -0600 |
---|---|---|
committer | Matthew A. Ploetz <maploetz@us.ibm.com> | 2016-04-27 06:40:46 -0400 |
commit | 76febbb5c230f1231be719831f84923fb802cb95 (patch) | |
tree | 54b45deb80a2a091db0c44daa19751e191e70afc /src/usr/hwas/test | |
parent | 5e80adfa475e07dcd896de7ced5004cf51e95ff5 (diff) | |
download | talos-hostboot-76febbb5c230f1231be719831f84923fb802cb95.tar.gz talos-hostboot-76febbb5c230f1231be719831f84923fb802cb95.zip |
P9 changes for PR core restriction
Covers the work required to support the P9 module vpd and new EQ/EX/EC core
structure in relation to the processing of the PR keyword to restrict the
number of cores.
Add new traces or enhance old traces with additional data to improve debug.
Update the module vpd binary for our standalone model.
Change-Id: I20018ccf1daa429e5b0ad9e38f50b1bc5943bcb5
RTC:145459
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/705
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/test')
-rw-r--r-- | src/usr/hwas/test/hwas1test.H | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H index b6aad2fa2..1f24dadd0 100644 --- a/src/usr/hwas/test/hwas1test.H +++ b/src/usr/hwas/test/hwas1test.H @@ -1236,6 +1236,73 @@ public: TS_TRACE( "testHWASisDescFunctional exit" ); } + /** + * @brief test restrictECunits + */ + void testHWASrestrictECunits() + { + using namespace HWAS; + using namespace TARGETING; + + errlHndl_t errl = NULL; + + // list of procs and data that we'll need to look at the PR keyword + procRestrict_t l_procEntry; + std::vector <procRestrict_t> l_procPRList; + + // Get list of present targets with type PROC + TargetHandleList pCheckPres; + getAllChips( pCheckPres, TYPE_PROC, true ); + + for (TargetHandleList::const_iterator pTarget_it = pCheckPres.begin(); + pTarget_it != pCheckPres.end(); + ++pTarget_it + ) + { + TargetHandle_t pTarget = *pTarget_it; + + // read the PR keywords that we need, so that if + // we have errors, we can handle them as approprite. + uint8_t prData[VPD_VINI_PR_DATA_LENGTH/sizeof(uint8_t)]; + bzero(prData, sizeof(prData)); + errl = platReadPR(pTarget, prData); + if (errl != NULL) + { // read of PR keyword failed + TS_FAIL("testHWASrestrictECunits>" + "pTarget %.8X - read PR failed - bad", + pTarget->getAttr<ATTR_HUID>()); + } + else + { + // save info so that we can + // process the PR keyword after this loop + l_procEntry.target = pTarget; + l_procEntry.group = pTarget->getAttr<ATTR_FRU_ID>(); + l_procEntry.procs = (prData[7] & VPD_VINI_PR_B7_MASK) + 1; + l_procEntry.maxECs = l_procEntry.procs * + (prData[2] & VPD_VINI_PR_B2_MASK) >> VPD_VINI_PR_B2_SHIFT; + l_procPRList.push_back(l_procEntry); + + if (l_procEntry.maxECs == 0) + { + // this is PROBABLY bad PR, so YELL... + TS_FAIL("testHWASrestrictECunits>" + "pTarget %.8X - PR VPD says 0 CORES", + pTarget->getAttr<ATTR_HUID>()); + } + } + } // for pTarget_it + + // Call restrictECunits + errl = restrictECunits(l_procPRList, false, 0); + if (errl != NULL) + { // restrict EC units failed + TS_FAIL("testHWASrestrictECunits> - restrict EC units failed"); + } + + TS_TRACE( "testHWASrestrictECunits exit" ); + } + }; #endif // |