diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/usr/hwas/common/hwas.H | 10 | ||||
| -rw-r--r-- | src/usr/hwas/common/hwas.C | 44 | ||||
| -rw-r--r-- | src/usr/isteps/istep08/call_host_slave_sbe_config.C | 4 |
3 files changed, 57 insertions, 1 deletions
diff --git a/src/include/usr/hwas/common/hwas.H b/src/include/usr/hwas/common/hwas.H index df6c3a004..891af5e3d 100644 --- a/src/include/usr/hwas/common/hwas.H +++ b/src/include/usr/hwas/common/hwas.H @@ -129,7 +129,7 @@ errlHndl_t restrictECunits( * @param[out] o_bootable Indicate whether the system is * is bootable with current configuration. * if o_bootable is not NULL an error for - * system unavailability will not be logged + * system unavailability will not be logged * * @return error log handle */ @@ -187,6 +187,14 @@ void presentByAssoc(TargetInfoVector& io_funcTargets, TargetInfoVector& o_targToDeconfig); /** +* @brief Algorithm to set up the EQ_GARD and EC_GARD attributes on the proc +* +* @param[in] i_procTarget Proccesor target to set attributes on +*/ +void setChipletGardsOnProc(TARGETING::Target * i_procTarget); + + +/** * @brief Find the ATTR_EC for all processors and calculate the EFFECTIVE_EC * (the lowest EC found) * 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"); diff --git a/src/usr/isteps/istep08/call_host_slave_sbe_config.C b/src/usr/isteps/istep08/call_host_slave_sbe_config.C index b7241a162..868f3e742 100644 --- a/src/usr/isteps/istep08/call_host_slave_sbe_config.C +++ b/src/usr/isteps/istep08/call_host_slave_sbe_config.C @@ -45,6 +45,7 @@ #include <devicefw/userif.H> #include <i2c/i2cif.H> #include <sbe/sbeif.H> +#include <hwas/common/hwas.H> // targeting support #include <targeting/common/commontargeting.H> #include <targeting/common/utilFilter.H> @@ -131,6 +132,9 @@ void* call_host_slave_sbe_config(void *io_pArgs) for (const auto & l_cpu_target: l_cpuTargetList) { + //Setup EC_GARD and EQ_GARD attrs on the proc before setting up sbe_config + HWAS::setChipletGardsOnProc(l_cpu_target); + // do not call HWP on master processor if (l_cpu_target != l_pMasterProcTarget) { |

