diff options
author | crgeddes <crgeddes@us.ibm.com> | 2016-10-03 15:59:08 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-10-04 22:52:10 -0400 |
commit | f019674c62ab1485d2fb87e7aebcccb9ee3fe6e0 (patch) | |
tree | 52fa72b6eb412614bb5684a20d6c4ef1f1e5fedf /src/usr/hwas/common | |
parent | 6a41be7a1e83d4ede3116b926719caa1037992b9 (diff) | |
download | talos-hostboot-f019674c62ab1485d2fb87e7aebcccb9ee3fe6e0.tar.gz talos-hostboot-f019674c62ab1485d2fb87e7aebcccb9ee3fe6e0.zip |
Port setting of EC/EQ_GARD attrs on the PROC from hwsv->hwas
There was already code that did this in HWSV so we are moving it
to HWAS to make it common. Also added the call where we need it at
call_host_slave_sbe_config before the HWP call.
Change-Id: Ie19ba0afd55fcb21a2661e0e2e6e1c9422105c7f
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30642
Reviewed-by: Matt Derksen <v2cibmd@us.ibm.com>
Tested-by: Jenkins Server <pfd-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/hwas/common')
-rw-r--r-- | src/usr/hwas/common/hwas.C | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index 1d11cbfc9..371474c17 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -2137,6 +2137,50 @@ void presentByAssoc(TargetInfoVector& io_funcTargets, } // while } // presentByAssoc +void setChipletGardsOnProc(TARGETING::Target * i_procTarget) +{ + TARGETING::TargetHandleList l_targetList; + + TARGETING::ATTR_EQ_GARD_type l_eqGard = 0xFF; + TARGETING::ATTR_EC_GARD_type l_ecGard = 0xFFFFFFFF; + + TARGETING::PredicateCTM l_eqs(TARGETING::CLASS_UNIT, + TARGETING::TYPE_EQ); + + TARGETING::PredicateCTM l_ecs(TARGETING::CLASS_UNIT, + TARGETING::TYPE_CORE); + + TARGETING::PredicateIsFunctional l_isFunctional; + TARGETING::PredicatePostfixExpr l_funcChipletFilter; + + l_funcChipletFilter.push(&l_eqs).push(&l_ecs).Or(). + push(&l_isFunctional).And(); + + TARGETING::targetService().getAssociated(l_targetList, + i_procTarget, + TARGETING::TargetService::CHILD, + TARGETING::TargetService::ALL, + &l_funcChipletFilter); + + for(auto & l_targ : l_targetList) + { + TARGETING::ATTR_CHIP_UNIT_type l_chipUnit = + l_targ->getAttr<TARGETING::ATTR_CHIP_UNIT>(); + if((l_targ)->getAttr<TARGETING::ATTR_TYPE>() == TARGETING::TYPE_EQ) + { + l_eqGard &= ~(0x80 >> l_chipUnit ); + } + else + { + l_ecGard &= ~(0x80000000 >> l_chipUnit ); + } + } + HWAS_INF("EQ Gard Bit:0x%x EC Gard Bit:0x%08x on proc with HUID: 0x%lx ", + l_eqGard,l_ecGard, i_procTarget->getAttr<TARGETING::ATTR_HUID>()); + i_procTarget->setAttr<TARGETING::ATTR_EQ_GARD>(l_eqGard); + i_procTarget->setAttr<TARGETING::ATTR_EC_GARD>(l_ecGard); +}//setChipletGardsOnProc + void calculateEffectiveEC() { HWAS_INF("calculateEffectiveEC entry"); |