diff options
author | Stephen Cprek <smcprek@us.ibm.com> | 2014-02-24 14:46:52 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-03-13 14:35:03 -0500 |
commit | dd14fcc4e5543ac944e74304dc7b9d56360e2720 (patch) | |
tree | 954aaf2f1f713c276c63a66bce7819e0dc018057 /src | |
parent | b592ba0543943531ceeeeaf56981db08404ab9a2 (diff) | |
download | talos-hostboot-dd14fcc4e5543ac944e74304dc7b9d56360e2720.tar.gz talos-hostboot-dd14fcc4e5543ac944e74304dc7b9d56360e2720.zip |
Handle missing chip condition in _deconfigureAssocProc
Changed predicate to include all Procs and X buses
but only present A buses
Change-Id: I5408a39f51a494eae2bdbfd17bd23d6d78034901
RTC: 86192
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9391
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/hwas/common/deconfigGard.H | 9 | ||||
-rw-r--r-- | src/usr/hwas/common/deconfigGard.C | 56 | ||||
-rw-r--r-- | src/usr/hwas/common/hwas.C | 26 | ||||
-rw-r--r-- | src/usr/hwas/test/hwasGardTest.H | 2 |
4 files changed, 69 insertions, 24 deletions
diff --git a/src/include/usr/hwas/common/deconfigGard.H b/src/include/usr/hwas/common/deconfigGard.H index 3c42aefd9..59b38f0f0 100644 --- a/src/include/usr/hwas/common/deconfigGard.H +++ b/src/include/usr/hwas/common/deconfigGard.H @@ -556,6 +556,15 @@ public: */ errlHndl_t deconfigureAssocProc(); + /** + * @brief Sets iv_XABusEndpointDeconfigured + * + * @param[in] deconfig Allows iv_XABusEndpointDeconfigured to be set + * to true/false + * + */ + void setXABusEndpointDeconfigured(bool deconfig); + private: // Mutex for thread safety diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C index bcc31fe39..ea0b6d51b 100644 --- a/src/usr/hwas/common/deconfigGard.C +++ b/src/usr/hwas/common/deconfigGard.C @@ -753,13 +753,11 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc() // Clear flag as this function is called multiple times iv_XABusEndpointDeconfigured = false; - // Define and populate vector of present procs + // Define and populate vector of procs // Define predicate PredicateCTM predProc(CLASS_CHIP, TYPE_PROC); PredicateHwas predPres; predPres.present(true); - PredicatePostfixExpr presProc; - presProc.push(&predProc).push(&predPres).And(); // Get top level target Target * l_pSys; @@ -770,31 +768,34 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc() targetService(). masterProcChipTargetHandle(l_pMasterProcTarget); + // Populate vector - TargetHandleList l_presProcs; - targetService().getAssociated(l_presProcs, + TargetHandleList l_procs; + targetService().getAssociated(l_procs, l_pSys, TargetService::CHILD, TargetService::ALL, - &presProc); + &predProc); + // Sort by HUID - std::sort(l_presProcs.begin(), - l_presProcs.end(), compareTargetHuid); + std::sort(l_procs.begin(), + l_procs.end(), compareTargetHuid); // General predicate to determine if target is functional PredicateIsFunctional isFunctional; - // Define and populate vector of present bus endpoint chiplets + // Define and populate vector of present A bus endpoint chiplets and + // all X bus endpoint chiplets PredicateCTM predXbus(CLASS_UNIT, TYPE_XBUS); PredicateCTM predAbus(CLASS_UNIT, TYPE_ABUS); - PredicatePostfixExpr busPres; - busPres.push(&predXbus).push(&predAbus).Or().push(&predPres).And(); + PredicatePostfixExpr busses; + busses.push(&predAbus).push(&predPres).And().push(&predXbus).Or(); - // Iterate through present procs and populate l_procInfo + // Iterate through procs and populate l_procInfo // vector with system information regarding procs for (TargetHandleList::const_iterator - l_procsIter = l_presProcs.begin(); - l_procsIter != l_presProcs.end(); + l_procsIter = l_procs.begin(); + l_procsIter != l_procs.end(); ++l_procsIter) { ProcInfo * l_ProcInfo = new ProcInfo(); @@ -833,23 +834,23 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc() ++l_procInfoIter) { // Populate vector of bus endpoints associated with this proc - TargetHandleList l_presentBusChiplets; - targetService().getAssociated(l_presentBusChiplets, + TargetHandleList l_busChiplets; + targetService().getAssociated(l_busChiplets, (*l_procInfoIter)->iv_pThisProc, TargetService::CHILD, TargetService::IMMEDIATE, - &busPres); + &busses); // Sort by HUID - std::sort(l_presentBusChiplets.begin(), - l_presentBusChiplets.end(), compareTargetHuid); + std::sort(l_busChiplets.begin(), + l_busChiplets.end(), compareTargetHuid); // iv_pA/XProcs[] and iv_A/XDeconfigured[] indexes uint8_t xBusIndex = 0; uint8_t aBusIndex = 0; - // Iterate through present bus endpoint chiplets + // Iterate through bus endpoint chiplets for (TargetHandleList::iterator - l_busIter = l_presentBusChiplets.begin(); - l_busIter != l_presentBusChiplets.end(); + l_busIter = l_busChiplets.begin(); + l_busIter != l_busChiplets.end(); ++l_busIter) { // Declare peer endpoint target @@ -925,7 +926,8 @@ errlHndl_t DeconfigGard::_invokeDeconfigureAssocProc() l_procInfoIter != l_procInfo.end(); ++l_procInfoIter) { - if ((*l_procInfoIter)->iv_deconfigured) + if ((*l_procInfoIter)->iv_deconfigured && + (isFunctional((*l_procInfoIter)->iv_pThisProc))) { // Deconfigure marked procs HWAS_INF("_invokeDeconfigureAssocProc is " @@ -1963,5 +1965,13 @@ errlHndl_t DeconfigGard::_symmetryValidation( return l_errlHdl; } +//****************************************************************************** + +void DeconfigGard::setXABusEndpointDeconfigured(bool deconfig) +{ + HWAS_INF("Set iv_XABusEndpointDeconfigured"); + iv_XABusEndpointDeconfigured = deconfig; +} + } // namespce HWAS diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index d3ed7271c..a74518faf 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -435,6 +435,30 @@ errlHndl_t discoverTargets() } // for pTarget_it + // Check for non-present Procs and if found, trigger + // DeconfigGard::_invokeDeconfigureAssocProc() to run by setting + // setXABusEndpointDeconfigured to true + PredicateCTM predProc(CLASS_CHIP, TYPE_PROC); + TargetHandleList l_procs; + targetService().getAssociated(l_procs, + pSys, + TargetService::CHILD, + TargetService::ALL, + &predProc); + + for (TargetHandleList::const_iterator + l_procsIter = l_procs.begin(); + l_procsIter != l_procs.end(); + ++l_procsIter) + { + if ( !(*l_procsIter)->getAttr<ATTR_HWAS_STATE>().present ) + { + HWAS_INF("discoverTargets: Proc not present HUID=0x%X", + (*l_procsIter)->getAttr<ATTR_HUID>()); + HWAS::theDeconfigGard().setXABusEndpointDeconfigured(true); + } + } + // PR keyword processing - potentially reduce the number of ex/core // units that are functional based on what's in the PR keyword. // call to restrict EX units, marking bad units as present=false; @@ -584,6 +608,8 @@ errlHndl_t discoverTargets() } } + + } while (0); if (errl) diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H index a179ff75d..96d0f0c3f 100644 --- a/src/usr/hwas/test/hwasGardTest.H +++ b/src/usr/hwas/test/hwasGardTest.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ |