diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2016-06-15 17:35:18 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-06-30 15:19:35 -0400 |
commit | f07603a9f2eab60e8e524ff487787086b9a5304e (patch) | |
tree | 48bc5116dd0d999647e302c62eca2033bb03572e | |
parent | 2dbc23b7ed689e4273ff057776b3dcff9bf3a43b (diff) | |
download | talos-hostboot-f07603a9f2eab60e8e524ff487787086b9a5304e.tar.gz talos-hostboot-f07603a9f2eab60e8e524ff487787086b9a5304e.zip |
Adding support for EFFECTIVE_EC
For OpenPower systems hostboot needs to add support for the
EFFECTIVE_EC attribute that the FSP normally fills. This commit
implements the same logic as the FSP, but without processor cards.
Change-Id: I6688a5fa5509b1ee65df2454c4ab101ba0fc65de
RTC:121686
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25907
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26391
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
-rw-r--r-- | src/include/usr/hwas/common/hwas.H | 7 | ||||
-rw-r--r-- | src/usr/hwas/common/hwas.C | 49 |
2 files changed, 56 insertions, 0 deletions
diff --git a/src/include/usr/hwas/common/hwas.H b/src/include/usr/hwas/common/hwas.H index 8dafb39ae..df6c3a004 100644 --- a/src/include/usr/hwas/common/hwas.H +++ b/src/include/usr/hwas/common/hwas.H @@ -186,6 +186,13 @@ void invokePresentByAssoc(); void presentByAssoc(TargetInfoVector& io_funcTargets, TargetInfoVector& o_targToDeconfig); +/** + * @brief Find the ATTR_EC for all processors and calculate the EFFECTIVE_EC + * (the lowest EC found) + * + */ +void calculateEffectiveEC(); + }; // end namespace #endif diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index dfe446576..4c26e9ea8 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -442,6 +442,10 @@ errlHndl_t discoverTargets() } } + //Now that all proc's are created and functional, we need to + //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; @@ -2181,4 +2185,49 @@ void presentByAssoc(TargetInfoVector& io_funcTargets, } // while } // presentByAssoc +void calculateEffectiveEC() +{ + HWAS_INF("calculateEffectiveEC entry"); + + do + { + //true => FSP present. Only run this on non-FSP systems + TARGETING::Target * sys = NULL; + TARGETING::targetService().getTopLevelTarget( sys ); + TARGETING::SpFunctions spfuncs; + if( sys && + sys->tryGetAttr<TARGETING::ATTR_SP_FUNCTIONS>(spfuncs) && + spfuncs.baseServices ) + { + break; + } + + //Get all functional chips + TARGETING::TargetHandleList l_procList; + getAllChips(l_procList, TYPE_PROC); + + //Assume lowest EC among all functional processor chips is 0xFF + TARGETING::ATTR_EC_type l_lowestEC = 0xFF; + + //Loop through all functional procs and find the lowest EC + for(TargetHandleList::const_iterator proc = l_procList.begin(); + proc != l_procList.end(); ++proc) + { + if((*proc)->getAttr<TARGETING::ATTR_EC>() < l_lowestEC) + { + l_lowestEC = (*proc)->getAttr<TARGETING::ATTR_EC>(); + } + } + + HWAS_INF("Lowest functional proc chip EC = 0x%llx",l_lowestEC); + + sys->setAttr<TARGETING::ATTR_EFFECTIVE_EC>(l_lowestEC); + + }while(0); + + HWAS_INF("calculateEffectiveEC exit"); + return; + +} //calculateEffectiveEC + }; // end namespace |