diff options
-rw-r--r-- | src/usr/hwas/common/hwas.C | 29 | ||||
-rw-r--r-- | src/usr/hwas/hwasPlat.C | 13 |
2 files changed, 25 insertions, 17 deletions
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index a89601391..f0d10232a 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -120,26 +120,10 @@ errlHndl_t discoverTargets() // find CLASS_ENC PredicateCTM predEnc(CLASS_ENC); - TargetHandleList pEncList; - targetService().getAssociated( pEncList, pSys, - TargetService::CHILD, TargetService::ALL, &predEnc ); - - for (TargetHandleList::iterator pEnc_it = pEncList.begin(); - pEnc_it != pEncList.end(); - pEnc_it++) - { - TargetHandle_t pEnc = *pEnc_it; - - // mark it as present - enableHwasState(pEnc, true, true); - HWAS_DBG("pEnc %.8X - marked present", - pEnc->getAttr<ATTR_HUID>()); - } // for pEnc_it - PredicateCTM predChip(CLASS_CHIP); PredicateCTM predDimm(CLASS_LOGICAL_CARD, TYPE_DIMM); PredicatePostfixExpr checkExpr; - checkExpr.push(&predChip).push(&predDimm).Or(); + checkExpr.push(&predChip).push(&predDimm).Or().push(&predEnc).Or(); TargetHandleList pCheckPres; targetService().getAssociated( pCheckPres, pSys, @@ -168,6 +152,17 @@ errlHndl_t discoverTargets() { TargetHandle_t pTarget = *pTarget_it; + // if CLASS_ENC is still in this list, mark as present + if (pTarget->getAttr<ATTR_CLASS>() == CLASS_ENC) + { + enableHwasState(pTarget, true, true); + HWAS_DBG("pTarget %.8X - CLASS_ENC marked present", + pTarget->getAttr<ATTR_HUID>()); + + // on to the next target + continue; + } + bool chipFunctional = true; bool chipPresent = true; uint16_t pgData[VPD_CP00_PG_DATA_LENGTH / sizeof(uint16_t)]; diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C index 51131afd5..a572501e6 100644 --- a/src/usr/hwas/hwasPlat.C +++ b/src/usr/hwas/hwasPlat.C @@ -197,6 +197,19 @@ errlHndl_t platPresenceDetect(TargetHandleList &io_targets) { TargetHandle_t pTarget = *pTarget_it; + // if CLASS_ENC + // by definition, hostboot only has 1 node/enclosure, and we're + // here, so it is functional + if (pTarget->getAttr<ATTR_CLASS>() == CLASS_ENC) + { + HWAS_DBG("pTarget %.8X - detected present", + pTarget->getAttr<ATTR_HUID>()); + + // on to the next target + pTarget_it++; + continue; + } + // call deviceRead() to see if they are present bool present = false; size_t presentSize = sizeof(present); |