diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2016-08-24 12:53:20 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-26 11:17:21 -0400 |
commit | 56249539651bcb950d0710caf00674e6f99344c9 (patch) | |
tree | aa035e00a83877325356f69a7e6ee3d9b66a3cd1 /src | |
parent | 2ca97f1fd9776aba2e82bc786953c07cc12c0133 (diff) | |
download | talos-hostboot-56249539651bcb950d0710caf00674e6f99344c9.tar.gz talos-hostboot-56249539651bcb950d0710caf00674e6f99344c9.zip |
Remove core reduction based on PR field
The PR field that specifies the number of cores to enable in a
given FRU has been removed for P9. Instead, the PG keyword in
the module vpd will be the only indicator of the good cores.
Change-Id: Ib22a5779b6beba7a4da19659f7c003a8fffb0855
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29339
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/build/configs/vpo.cnfg | 1 | ||||
-rw-r--r-- | src/include/usr/hwas/common/hwasCommon.H | 19 | ||||
-rw-r--r-- | src/usr/hwas/HBconfig | 5 | ||||
-rw-r--r-- | src/usr/hwas/common/hwas.C | 92 | ||||
-rw-r--r-- | src/usr/hwas/hwasPlat.C | 64 | ||||
-rw-r--r-- | src/usr/hwas/test/hwas1test.H | 64 |
6 files changed, 67 insertions, 178 deletions
diff --git a/src/build/configs/vpo.cnfg b/src/build/configs/vpo.cnfg index f66b26f5f..db21d135f 100644 --- a/src/build/configs/vpo.cnfg +++ b/src/build/configs/vpo.cnfg @@ -2,4 +2,3 @@ unset SFC_IS_AST2400 unset SFC_IS_IBM_DPSS set SFC_IS_FAKE set P9_VPO_COMPILE -set SKIP_RESTRICT_EC_UNITS diff --git a/src/include/usr/hwas/common/hwasCommon.H b/src/include/usr/hwas/common/hwasCommon.H index 4dde4d47f..f381beb5a 100644 --- a/src/include/usr/hwas/common/hwasCommon.H +++ b/src/include/usr/hwas/common/hwasCommon.H @@ -239,6 +239,7 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, /** + * @deprecated * @brief platform specific code to determine the PR vector of the input * target. The platform specific code is responsible for returning the * vector. The caller is responsible for allocating and de-allocating the @@ -256,23 +257,7 @@ errlHndl_t platReadPR(const TARGETING::TargetHandle_t &i_target, void *o_prData); // constants the platReadPR will use for looking at the VPD data -const uint32_t VPD_VINI_PR_DATA_LENGTH = 8; - -// Byte 2 Number of processors per module chip -const uint32_t VPD_VINI_PR_B2_MASK = 0xF0; // bits 0-3 -const uint32_t VPD_VINI_PR_B2_SHIFT = 4; -// Byte 7 Max VPD copies (aka replication factor) -// Bits 2:7 -// Number of chips using this VPD minus 1, i.e., Used to -// calculate the maximum number of duplicate copies of the B9 -// keyword allowed. Multiply PR byte 2 (number of processor -// per module) times this value [(PR byte 7) + 1] to get the max -// number of copies of any given B9 keyword data in the SPIRA -// PACA structure. -// If the number of functional processors is different on chips -// within the same module. It will be firmwares responsibility -// average them out as specified in byte 2 above. -const uint32_t VPD_VINI_PR_B7_MASK = 0x3F; // bits 2-7 +const uint32_t VPD_VINI_PR_DATA_LENGTH = 8; //@deprecrated /** * @brief platform specific code to read the Field Core Override diff --git a/src/usr/hwas/HBconfig b/src/usr/hwas/HBconfig index 371bca3b0..8f6791be4 100644 --- a/src/usr/hwas/HBconfig +++ b/src/usr/hwas/HBconfig @@ -1,8 +1,3 @@ -config SKIP_RESTRICT_EC_UNITS - default n - help - Skip restricting the number of ec/cores based on PR keyword - config NO_GARD_SUPPORT default n help diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index 0dc9adfa8..78864f6e5 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -223,9 +223,10 @@ errlHndl_t discoverTargets() // read the partialGood vector to determine if any are not functional // and read and store values from the PR keyword - // list of procs and data that we'll need to look at the PR keyword + // list of procs and data that we'll need to look at when potentially + // reducing the list of valid ECs later procRestrict_t l_procEntry; - std::vector <procRestrict_t> l_procPRList; + std::vector <procRestrict_t> l_procRestrictList; // sort the list by ATTR_HUID to ensure that we // start at the same place each time @@ -294,52 +295,19 @@ errlHndl_t discoverTargets() } else { - // look at the 'nest' logic to override the functionality - // of this proc - chipFunctional = isChipFunctional(pTarget, pgData); - - if (chipFunctional) - { - // 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 - HWAS_INF("pTarget %.8X - read PR failed - bad", - pTarget->getAttr<ATTR_HUID>()); - chipFunctional = false; - errlEid = errl->eid(); - - // commit the error but keep going - errlCommit(errl, HWAS_COMP_ID); - // errl is now NULL - } - else - { - // save info so that we can - // process the PR keyword after this loop - HWAS_INF("pTarget %.8X - pushing to procPRlist; FRU_ID %d", - pTarget->getAttr<ATTR_HUID>(), - pTarget->getAttr<ATTR_FRU_ID>()); - 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... - HWAS_ERR("pTarget %.8X - PR VPD says 0 CORES", - pTarget->getAttr<ATTR_HUID>()); - } - } - } + // look at the 'nest' logic to override the + // functionality of this proc + chipFunctional = isChipFunctional(pTarget, pgData); + + // Fill in a dummy restrict list + l_procEntry.target = pTarget; + // every proc is uniquely counted + l_procEntry.group = pTarget->getAttr<ATTR_HUID>(); + // just 1 proc per group + l_procEntry.procs = 1; + // indicates we should use all available ECs + l_procEntry.maxECs = UINT32_MAX; + l_procRestrictList.push_back(l_procEntry); } } // TYPE_PROC } // CLASS_CHIP @@ -424,20 +392,17 @@ errlHndl_t discoverTargets() //calculate the system EFFECTIVE_EC calculateEffectiveEC(); - // PR keyword processing - potentially reduce the number of ec/core - // units that are functional based on what's in the PR keyword. - // call to restrict EC units, marking bad units as present=false; + // Potentially reduce the number of ec/core units that are present + // based on fused mode + // marking bad units as present=false; // deconfigReason = 0 because present is false so this is not a - // deconfigured event. -#ifndef CONFIG_SKIP_RESTRICT_EC_UNITS - errl = restrictECunits(l_procPRList, false, 0); - + // deconfigured event. + errl = restrictECunits(l_procRestrictList, false, 0); if (errl) { HWAS_ERR("discoverTargets: restrictECunits failed"); break; } -#endif // call invokePresentByAssoc() to obtain functional MCSs, MEMBUFs, and // DIMMs for non-direct memory or MCSs, MCAs, and DIMMs for direct @@ -918,7 +883,7 @@ errlHndl_t restrictECunits( // this procs number, used to determine groupings uint32_t thisGroup = i_procList[procIdx].group; - HWAS_INF("procRestrictList[%d] - maxECs %d, procs %d, group %d", + HWAS_INF("procRestrictList[%d] - maxECs 0x%X, procs %d, group %d", procIdx, maxECs, procs, thisGroup); // exs, ecs, and iters for each proc in this vpd set @@ -1014,15 +979,22 @@ errlHndl_t restrictECunits( ++procIdx; } // for i < procs + // adjust maxECs based on fused mode + if( is_fused_mode() ) + { + // only allow complete pairs + maxECs = std::min( currentPairedECs*2, maxECs ); + } + if ((currentPairedECs + currentSingleECs) <= maxECs) { // we don't need to restrict - we're done with this group. - HWAS_DBG("currentECs %d <= maxECs %d -- done", + HWAS_INF("currentECs 0x%X <= maxECs 0x%X -- done", (currentPairedECs + currentSingleECs), maxECs); continue; } - HWAS_DBG("currentECs %d > maxECs %d -- restricting!", + HWAS_DBG("currentECs 0x%X > maxECs 0x%X -- restricting!", (currentPairedECs + currentSingleECs), maxECs); // now need to find EC units that stay functional, going @@ -1039,7 +1011,7 @@ errlHndl_t restrictECunits( ((maxECs > currentPairedECs) && !is_fused_mode()) ? (maxECs - currentPairedECs) : 0; uint32_t goodECs = 0; - HWAS_DBG("procs %d maxECs %d", procs, maxECs); + HWAS_DBG("procs 0x%X maxECs 0x%X", procs, maxECs); // Each pECList has ECs for a given EX and proc. Check each EC list to // determine if it has an EC pair or a single EC and if the remaining diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C index 57d185ab2..36bab192b 100644 --- a/src/usr/hwas/hwasPlat.C +++ b/src/usr/hwas/hwasPlat.C @@ -295,68 +295,8 @@ errlHndl_t platReadPartialGood(const TargetHandle_t &i_target, errlHndl_t platReadPR(const TargetHandle_t &i_target, void *o_prData) { - HWAS_DBG( "i_target %.8X", - i_target->getAttr<ATTR_HUID>()); - - // call deviceRead() to find the PR record - uint8_t prData[VPD_VINI_PR_DATA_LENGTH]; - size_t prSize = sizeof(prData); - - errlHndl_t errl = deviceRead(i_target, prData, prSize, - DEVICE_MVPD_ADDRESS(MVPD::VINI, MVPD::PR)); - - if (unlikely(errl != NULL)) - { // errl was set - this is an error condition. - HWAS_ERR( "i_target %.8X - failed PR read", - i_target->getAttr<ATTR_HUID>()); - } - else - { -#if 0 -// Unit test. set P8_MURANO.config to have 4 procs, and this code will -// alter the VPD so that some of the procs and chiplets should get marked -// as NOT functional. - { - if (i_target->getAttr<ATTR_HUID>() == 0x50000) - { // 1st proc - let it go thru ok. - prData[2] = 3 << VPD_VINI_PR_B2_SHIFT; // 3*2 = 6 cores - prData[7] = 1; // 2 procs - //prData[2] = 1 << VPD_VINI_PR_B2_SHIFT; // 1*4 = 4 cores - //prData[7] = 3; // 4 cores - } - else - if (i_target->getAttr<ATTR_HUID>() == 0x50001) - { // 2nd proc - - prData[2] = 3 << VPD_VINI_PR_B2_SHIFT; // 3*2 = 6 cores - prData[7] = 1; // 2 procs - //prData[2] = 1 << VPD_VINI_PR_B2_SHIFT; // 1*4 = 4 cores - //prData[7] = 3; // 4 cores - } - else - if (i_target->getAttr<ATTR_HUID>() == 0x50002) - { // 3rd proc - - prData[2] = 3 << VPD_VINI_PR_B2_SHIFT; // 3*1 = 3 cores - prData[7] = 0; // 1 procs - //prData[2] = 1 << VPD_VINI_PR_B2_SHIFT; // 1*4 = 4 cores - //prData[7] = 3; // 4 cores - } - else - if (i_target->getAttr<ATTR_HUID>() == 0x50003) - { // 4th proc - - prData[2] = 4 << VPD_VINI_PR_B2_SHIFT; // 4*1 = 4 cores - prData[7] = 0; // 1 procs - //prData[2] = 1 << VPD_VINI_PR_B2_SHIFT; // 1*4 = 4 cores - //prData[7] = 3; // 4 cores - } - } -#endif - - HWAS_DBG_BIN("PR record", prData, VPD_VINI_PR_DATA_LENGTH); - // copy the data back into the caller's buffer - memcpy(o_prData, prData, VPD_VINI_PR_DATA_LENGTH); - } - - return errl; + HWAS_ERR( "platReadPR is deprecated!!!" ); + return NULL; } // platReadPR //****************************************************************************** diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H index a79828f06..df43cbfd0 100644 --- a/src/usr/hwas/test/hwas1test.H +++ b/src/usr/hwas/test/hwas1test.H @@ -1263,11 +1263,12 @@ public: using namespace HWAS; using namespace TARGETING; +#if 0 //Cannot actually run this because it might change state errlHndl_t errl = NULL; - // list of procs and data that we'll need to look at the PR keyword + // list of procs and data procRestrict_t l_procEntry; - std::vector <procRestrict_t> l_procPRList; + std::vector <procRestrict_t> l_procRestrictList; // Get list of present targets with type PROC TargetHandleList pCheckPres; @@ -1280,46 +1281,43 @@ public: { 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>()); - } - } + // create data for each proc + l_procEntry.target = pTarget; + l_procEntry.group = 0; + l_procEntry.procs = 1; + l_procEntry.maxECs = UINT32_MAX; + + l_procPRList.push_back(l_procEntry); } // for pTarget_it // Call restrictECunits - errl = restrictECunits(l_procPRList, false, 0); + errl = restrictECunits(l_procRestrictList, false, 0); if (errl != NULL) { // restrict EC units failed TS_FAIL("testHWASrestrictECunits> - restrict EC units failed"); } +#endif + + // Instead verify that we ended up with exactly the right number + // enabled cores that we expect for our NIMBUS standalone config + TargetHandleList l_funcProcs; + getAllChips( l_funcProcs, TYPE_PROC, true ); + for( const auto& l_proc : l_funcProcs ) + { + TargetHandleList l_funcCores; + getChildChiplets( l_funcCores, l_proc, TYPE_CORE, true ); + + // Currently we have 4 ECs configured in the PG record + const size_t l_numCores = 4; + if( l_funcCores.size() != l_numCores ) + { + TS_FAIL("testHWASrestrictECunits> Expected %d cores, but saw %d", + l_numCores, l_funcCores.size() ); + } + } TS_TRACE( "testHWASrestrictECunits exit" ); + } /** |