diff options
author | Mike Jones <mjjones@us.ibm.com> | 2014-02-25 11:31:25 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-27 14:20:37 -0600 |
commit | 0c77c1149543e775fe0168e9e99947a33d16f6d3 (patch) | |
tree | 344b8f9d969db69c3b6fd660286df263b41365bc /src | |
parent | cfb19f068394a358ce21fa3976d0aca834bb3030 (diff) | |
download | talos-hostboot-0c77c1149543e775fe0168e9e99947a33d16f6d3.tar.gz talos-hostboot-0c77c1149543e775fe0168e9e99947a33d16f6d3.zip |
Extend FAPI Error XML to callout specific children by affinity and containment
Change-Id: Iedad86021ba4773b6cc0584dc2983b13b2b0af37
RTC: 98365
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9141
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Reviewed-by: William H. Schwartz <whs@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/hwpf/fapi/fapiErrorInfo.H | 35 | ||||
-rw-r--r-- | src/include/usr/hwpf/fapi/fapiTarget.H | 48 | ||||
-rw-r--r-- | src/usr/hwpf/fapi/fapiTarget.C | 56 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/fapiHwpErrorInfo.xml | 24 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatHwpInvoker.C | 314 |
5 files changed, 315 insertions, 162 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H index 23250aa51..b7818058b 100644 --- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H +++ b/src/include/usr/hwpf/fapi/fapiErrorInfo.H @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: fapiErrorInfo.H,v 1.11 2013/11/11 19:33:43 mjjones Exp $ +// $Id: fapiErrorInfo.H,v 1.12 2014/02/26 14:50:39 mjjones Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.H,v $ /** @@ -332,9 +332,7 @@ struct ErrorInfoBusCallout // The callout priority CalloutPriorities::CalloutPriority iv_calloutPriority; }; -// defines used with MBA dimm callouts -#define FAPI_ALL_MBA_PORTS 0xFF -#define FAPI_ALL_MBA_DIMMS 0xFF + /** * @struct ErrorInfoCDG * @@ -393,6 +391,17 @@ struct ErrorInfoCDG * @struct ErrorInfoChildrenCDG * * This struct contains children targets to callout/deconfigure/GARD + * + * Children by containment can be CDG (chiplets belonging to a parent chip) e.g. + * - PROC_CHIP -> EX_CHIPLET + * - MEMBUF_CHIP -> MBA_CHIPLET + * Children by affinity can be CDG. + * Any from PROC_CHIP->MCS_CHIPLET->MEMBUF_CHIP->MBA_CHIPLET->DIMM e.g. + * - PROC_CHIP->MEMBUF_CHIP + * - MEMBUF_CHIP->DIMM + * - MBA_CHIPLET->DIMM + * Port and Number criteria can be applied to the child target as + * detailed in the constructor */ struct ErrorInfoChildrenCDG { @@ -405,12 +414,12 @@ struct ErrorInfoChildrenCDG * @param[in] i_deconfigure True if Target should be deconfigured * @param[in] i_gard True if Target should be GARDed * @param[in] i_priority The priority of any callout - * @param[in] i_childPort Parent port number where child is - * connected - * @param[in] i_childNum Chip number of child target - * - * @note i_childPort and i_childNum are valid only for MBA/DIMM - * parent/child combination + * @param[in] i_childPort Child Port + * For DIMM children, the MBA port number + * @param[in] i_childNum Child Number + * For DIMM children, the dimm socket number + * For Chip children, the chip position + * For Chiplet children, the chiplet unit pos */ ErrorInfoChildrenCDG(const Target & i_parentChip, const TargetType i_childType, @@ -454,10 +463,12 @@ struct ErrorInfoChildrenCDG // GARD Information bool iv_gard; - // For MBA/DIMM parent/child, the MBA port + // Child Port + static const uint8_t ALL_CHILD_PORTS = 0xff; uint8_t iv_childPort; - // For MBA/DIMM parent/child, the MBA dimm number + // Child Number + static const uint8_t ALL_CHILD_NUMBERS = 0xff; uint8_t iv_childNumber; }; diff --git a/src/include/usr/hwpf/fapi/fapiTarget.H b/src/include/usr/hwpf/fapi/fapiTarget.H index b1c98efb0..ee5656d58 100644 --- a/src/include/usr/hwpf/fapi/fapiTarget.H +++ b/src/include/usr/hwpf/fapi/fapiTarget.H @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: fapiTarget.H,v 1.8 2013/10/15 13:13:43 dcrowell Exp $ +// $Id: fapiTarget.H,v 1.9 2014/02/26 14:51:05 mjjones Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiTarget.H,v $ /** @@ -42,6 +42,8 @@ * mjjones 02/07/2012 Remove MBS_CHIPLET * Add XBUS_ENDPOINT ABUS_ENDPOINT * mjjones 02/21/2012 Add high performance toEcmdString + * mjjones 02/24/2014 Add isChip/Chiplet using types + * Add isPhysParentChild */ #ifndef FAPITARGET_H_ @@ -199,11 +201,32 @@ public: void setType(const TargetType i_type) { iv_type = i_type; } /** + * @brief Returns if a target type is a chip + * + * @param[in] i_type Target Type + * + * @return boolean. true if chip else false + */ + static bool isChip(const TargetType i_type); + + /** * @brief Returns if the target is a chip * - * @return boolean. true if chip else fase + * @return boolean. true if chip else false + */ + bool isChip() const + { + return isChip(iv_type); + } + + /** + * @brief Returns if a target type is a chiplet + * + * @param[in] i_type Target Type + * + * @return boolean. true if chip else false */ - bool isChip() const; + static bool isChiplet(const TargetType i_type); /** * @brief Returns if the target is a chiplet @@ -212,7 +235,24 @@ public: * * @return boolean. true if chiplet else false */ - bool isChiplet() const; + bool isChiplet() const + { + return isChiplet(iv_type); + } + + /** + * @brief Returns if a pair of target types is a physical parent/child + * + * This is true if the parent type is a chip and the child type is a + * chiplet that belongs to the chip (e.g. PROC_CHIP->EX_CHIPLET) + * + * @param[in] i_parentType Parent Target Type + * @param[in] i_childType Child Target Type + * + * @return boolean. + */ + static bool isPhysParentChild(const TargetType i_parentType, + const TargetType i_childType); /** * @brief Convert a target to an ecmd-format target string diff --git a/src/usr/hwpf/fapi/fapiTarget.C b/src/usr/hwpf/fapi/fapiTarget.C index 057267477..006e2fb36 100644 --- a/src/usr/hwpf/fapi/fapiTarget.C +++ b/src/usr/hwpf/fapi/fapiTarget.C @@ -20,7 +20,7 @@ /* Origin: 30 */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: fapiTarget.C,v 1.9 2013/10/15 13:13:42 dcrowell Exp $ +// $Id: fapiTarget.C,v 1.10 2014/02/26 14:51:07 mjjones Exp $ // $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiTarget.C,v $ /** @@ -40,6 +40,8 @@ * Add XBUS_ENDPOINT ABUS_ENDPOINT * mjjones 02/21/2012 Add high performance toEcmdString * mjjones 07/11/2012 Clear iv_pEcmdString on set + * mjjones 02/24/2014 Add isChip/Chiplet using types + * Add isPhysParentChild */ #include <fapiTarget.H> @@ -136,24 +138,54 @@ void Target::set(void * i_pHandle) } //****************************************************************************** -// Is the target a chip? +// Is a target type a chip? //****************************************************************************** -bool Target::isChip() const +bool Target::isChip(const TargetType i_type) { - return ((iv_type & (TARGET_TYPE_PROC_CHIP | TARGET_TYPE_MEMBUF_CHIP)) != 0); + return ((i_type & (TARGET_TYPE_PROC_CHIP | TARGET_TYPE_MEMBUF_CHIP)) != 0); } //****************************************************************************** -// Is the target a chiplet? +// Is a target type a chiplet? //****************************************************************************** -bool Target::isChiplet() const +bool Target::isChiplet(const TargetType i_type) { - return ((iv_type & (TARGET_TYPE_EX_CHIPLET | - TARGET_TYPE_MBA_CHIPLET | - TARGET_TYPE_MCS_CHIPLET | - TARGET_TYPE_XBUS_ENDPOINT | - TARGET_TYPE_ABUS_ENDPOINT | - TARGET_TYPE_L4 )) != 0); + return ((i_type & (TARGET_TYPE_EX_CHIPLET | + TARGET_TYPE_MBA_CHIPLET | + TARGET_TYPE_MCS_CHIPLET | + TARGET_TYPE_XBUS_ENDPOINT | + TARGET_TYPE_ABUS_ENDPOINT | + TARGET_TYPE_L4 )) != 0); +} + +//****************************************************************************** +// Is a target type pair a physical parent/child? +//****************************************************************************** +bool Target::isPhysParentChild(const TargetType i_parentType, + const TargetType i_childType) +{ + bool l_result = false; + + if (i_parentType == TARGET_TYPE_PROC_CHIP) + { + if ((i_childType == TARGET_TYPE_EX_CHIPLET) || + (i_childType == TARGET_TYPE_MCS_CHIPLET) || + (i_childType == TARGET_TYPE_XBUS_ENDPOINT) || + (i_childType == TARGET_TYPE_ABUS_ENDPOINT)) + { + l_result = true; + } + } + else if (i_parentType == TARGET_TYPE_MEMBUF_CHIP) + { + if ((i_childType == TARGET_TYPE_MBA_CHIPLET) || + (i_childType == TARGET_TYPE_L4)) + { + l_result = true; + } + } + + return l_result; } } diff --git a/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml b/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml index bc7740d13..4de66539f 100644 --- a/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml +++ b/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml @@ -5,7 +5,7 @@ <!-- --> <!-- IBM CONFIDENTIAL --> <!-- --> -<!-- COPYRIGHT International Business Machines Corp. 2011,2013 --> +<!-- COPYRIGHT International Business Machines Corp. 2011,2014 --> <!-- --> <!-- p1 --> <!-- --> @@ -126,6 +126,28 @@ <priority>MEDIUM</priority> </callout> --> + <!-- Callout MASTER_CHIP's EX4 chiplet MEDIUM --> + <!-- Commented out to avoid actually calling out chiplets in UT + <callout> + <childTargets> + <parent>UNIT_TEST_FFDC_MASTER_CHIP_TARGET</parent> + <childType>TARGET_TYPE_EX_CHIPLET</childType> + <childNumber>4</childNumber> + </childTargets> + <priority>MEDIUM</priority> + </callout> + --> + <!-- Callout MASTER_CHIP's associated Centaur4 chip MEDIUM --> + <!-- Commented out to avoid actually calling out chips in UT + <callout> + <childTargets> + <parent>UNIT_TEST_FFDC_MASTER_CHIP_TARGET</parent> + <childType>TARGET_TYPE_MEMBUF_CHIP</childType> + <childNumber>4</childNumber> + </childTargets> + <priority>MEDIUM</priority> + </callout> + --> <!-- Deconfigure MASTER_CHIP's ABUS endpoints --> <!-- Commented out to avoid actually deconfiguring chiplets in UT <deconfigure> diff --git a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C index 22202a80d..1dc565b7b 100644 --- a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C +++ b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* COPYRIGHT International Business Machines Corp. 2011,2014 */ /* */ /* p1 */ /* */ @@ -133,61 +133,64 @@ HWAS::epubProcedureID xlateProcedureCallout( return l_proc; } -void getChildTargetsForCDG( - TARGETING::Target * i_pParent, TARGETING::TYPE i_childType, - TARGETING::TargetHandleList & o_childTargets, uint8_t i_childPort, - uint8_t i_childNumber); /** * @brief Translates a FAPI target type to a Targeting target type * * @param[i] i_targetType FAPI target type - * - * @return TARGETING type + * @param[o] o_class Targeting class + * @param[o] o_type Targeting type */ -TARGETING::TYPE xlateTargetType( - const fapi::TargetType i_targetType) +void xlateTargetType(const fapi::TargetType i_targetType, + TARGETING::CLASS & o_class, + TARGETING::TYPE & o_type) { - TARGETING::TYPE l_type = TARGETING::TYPE_NA; - switch (i_targetType) { case fapi::TARGET_TYPE_SYSTEM: - l_type = TARGETING::TYPE_SYS; + o_class = TARGETING::CLASS_SYS; + o_type = TARGETING::TYPE_SYS; break; case fapi::TARGET_TYPE_DIMM: - l_type = TARGETING::TYPE_DIMM; + o_class = TARGETING::CLASS_LOGICAL_CARD; + o_type = TARGETING::TYPE_DIMM; break; case fapi::TARGET_TYPE_PROC_CHIP: - l_type = TARGETING::TYPE_PROC; + o_class = TARGETING::CLASS_CHIP; + o_type = TARGETING::TYPE_PROC; break; case fapi::TARGET_TYPE_MEMBUF_CHIP: - l_type = TARGETING::TYPE_MEMBUF; + o_class = TARGETING::CLASS_CHIP; + o_type = TARGETING::TYPE_MEMBUF; break; case fapi::TARGET_TYPE_EX_CHIPLET: - l_type = TARGETING::TYPE_EX; + o_class = TARGETING::CLASS_UNIT; + o_type = TARGETING::TYPE_EX; break; case fapi::TARGET_TYPE_MBA_CHIPLET: - l_type = TARGETING::TYPE_MBA; + o_class = TARGETING::CLASS_UNIT; + o_type = TARGETING::TYPE_MBA; break; case fapi::TARGET_TYPE_MCS_CHIPLET: - l_type = TARGETING::TYPE_MCS; + o_class = TARGETING::CLASS_UNIT; + o_type = TARGETING::TYPE_MCS; break; case fapi::TARGET_TYPE_XBUS_ENDPOINT: - l_type = TARGETING::TYPE_XBUS; + o_class = TARGETING::CLASS_UNIT; + o_type = TARGETING::TYPE_XBUS; break; case fapi::TARGET_TYPE_ABUS_ENDPOINT: - l_type = TARGETING::TYPE_ABUS; + o_class = TARGETING::CLASS_UNIT; + o_type = TARGETING::TYPE_ABUS; break; case fapi::TARGET_TYPE_L4: - l_type = TARGETING::TYPE_L4; + o_class = TARGETING::CLASS_UNIT; + o_type = TARGETING::TYPE_L4; break; default: - l_type = TARGETING::TYPE_NA; - break; + o_class = TARGETING::CLASS_NA; + o_type = TARGETING::TYPE_NA; } - - return l_type; } /** @@ -388,151 +391,196 @@ void processEICDGs(const ErrorInfo & i_errInfo, l_gard = HWAS::GARD_Unrecoverable; } - FAPI_ERR("processEICDGs: Calling out target (pri:%d, deconf:%d, gard:%d)", - l_priority, l_deconfig, l_gard); + FAPI_ERR("processEICDGs: Calling out target (huid:%.8x, pri:%d, deconf:%d, gard:%d)", + TARGETING::get_huid(l_pTarget), l_priority, l_deconfig, + l_gard); io_pError->addHwCallout(l_pTarget, l_priority, l_deconfig, l_gard); } } /** - * @brief Processes any Children Callout/Deconfigure/GARD requests in the - * ReturnCode Error Information and adds them to the error log + * @brief Returns child targets to Callout/Deconfigure/GARD * - * @param[i] i_errInfo Reference to ReturnCode Error Information - * @param[io] io_pError Errorlog Handle + * @param[i] i_parentTarget FAPI Parent Target + * @param[i] i_childType FAPI Child Type + * @param[i] i_childPort Child Port Number + * For DIMMs: MBA Port Number + * Else unused + * @param[i] i_childNum Child Number + * For DIMMs: DIMM Socket Number + * For Chips: Chip Position + * For Chiplets: Chiplet Position */ -void processEIChildrenCDGs(const ErrorInfo & i_errInfo, - errlHndl_t io_pError) +void getChildTargetsForCDG(const fapi::Target & i_parentTarget, + const fapi::TargetType i_childType, + const uint8_t i_childPort, + const uint8_t i_childNum, + TARGETING::TargetHandleList & o_childTargets) { - // Iterate through the Child CGD requests, adding each to the error log - for (ErrorInfo::ErrorInfoChildrenCDGCItr_t l_itr = - i_errInfo.iv_childrenCDGs.begin(); - l_itr != i_errInfo.iv_childrenCDGs.end(); ++l_itr) + o_childTargets.clear(); + + do { + // Get the parent TARGETING::Target + TARGETING::Target * l_pTargParent = + reinterpret_cast<TARGETING::Target *>(i_parentTarget.get()); - uint8_t l_childNumber = (*l_itr)->iv_childNumber; - uint8_t l_childPort = (*l_itr)->iv_childPort; + if (l_pTargParent == NULL) + { + FAPI_ERR("getChildTargetsForCDG: NULL Target pointer"); + break; + } - TARGETING::TYPE l_childType = - xlateTargetType((*l_itr)->iv_childType); + // Find if the child target type is a dimm, chip or chiplet + bool l_childIsDimm = false; + bool l_childIsChip = false; + bool l_childIsChiplet = false; - if (l_childType == TARGETING::TYPE_NA) + if (i_childType == fapi::TARGET_TYPE_DIMM) { - FAPI_ERR("processEIChildrenCDGs: Could not xlate child type (0x%08x)", - (*l_itr)->iv_childType); + l_childIsDimm = true; } else { - TARGETING::Target * l_pParent = - reinterpret_cast<TARGETING::Target *> - ((*l_itr)->iv_parent.get()); + l_childIsChip = fapi::Target::isChip(i_childType); - HWAS::callOutPriority l_priority = - xlateCalloutPriority((*l_itr)->iv_calloutPriority); - - HWAS::DeconfigEnum l_deconfig = HWAS::NO_DECONFIG; - if ((*l_itr)->iv_deconfigure) + if (!l_childIsChip) { - l_deconfig = HWAS::DELAYED_DECONFIG; + l_childIsChiplet = fapi::Target::isChiplet(i_childType); } + } - HWAS::GARD_ErrorType l_gard = HWAS::GARD_NULL; - if ((*l_itr)->iv_gard) - { - l_gard = HWAS::GARD_Unrecoverable; - } - - // Get a list of functional children - TARGETING::TargetHandleList l_children; - - getChildTargetsForCDG( l_pParent, l_childType, l_children, - l_childPort, l_childNumber ); - - // Callout/Deconfigure/GARD each child as appropriate - for (TARGETING::TargetHandleList::const_iterator - l_itr = l_children.begin(); - l_itr != l_children.end(); ++l_itr) - { + // Translate the FAPI child target type into TARGETING Class/Type + TARGETING::CLASS l_targChildClass = TARGETING::CLASS_NA; + TARGETING::TYPE l_targChildType = TARGETING::TYPE_NA; + xlateTargetType(i_childType, l_targChildClass, l_targChildType); - FAPI_ERR("processEIChildrenCDGs: Calling out target" - " (type: 0x%02x, pri:%d, deconf:%d, gard:%d)", - l_childType, l_priority, l_deconfig, l_gard); - io_pError->addHwCallout(*l_itr, l_priority, l_deconfig, l_gard); - } + if (l_targChildType == TARGETING::TYPE_NA) + { + FAPI_ERR("getChildTargetsForCDG: Could not xlate child type (0x%08x)", + i_childType); + break; } - } -} -void getChildTargetsForCDG( - TARGETING::Target * i_pParent, TARGETING::TYPE i_childType, - TARGETING::TargetHandleList & o_childTargets, uint8_t i_childPort, - uint8_t i_childNumber ) -{ - o_childTargets.clear(); - bool l_functional = true; - - // dimms are not considered as a chiplet but - // a logical card so we need special processing here - if( i_childType == TARGETING::TYPE_DIMM ) - { - TARGETING::TargetHandleList l_dimmList; + // Get the child targets + TARGETING::TargetHandleList l_targChildList; - TARGETING:: getChildAffinityTargets( l_dimmList, i_pParent, - TARGETING::CLASS_LOGICAL_CARD, - TARGETING::TYPE_DIMM, l_functional); + if (fapi::Target::isPhysParentChild(i_parentTarget.getType(), + i_childType)) + { + // Child by containment + TARGETING::getChildChiplets(l_targChildList, l_pTargParent, + l_targChildType); + FAPI_ERR("getChildTargetsForCDG: Got %d candidate children by containment", + l_targChildList.size()); + } + else + { + // Assumption is child by affinity + TARGETING::getChildAffinityTargets(l_targChildList, l_pTargParent, + l_targChildClass, + l_targChildType); + FAPI_ERR("getChildTargetsForCDG: Got %d candidate children by affinity", + l_targChildList.size()); + } + // Filter out child targets based on type and input port/number for (TARGETING::TargetHandleList::const_iterator - l_itr = l_dimmList.begin(); - l_itr != l_dimmList.end(); - ++l_itr) + l_itr = l_targChildList.begin(); + l_itr != l_targChildList.end(); ++l_itr) { - - uint8_t l_mbaPort = - (*l_itr)->getAttr<TARGETING::ATTR_MBA_PORT>(); - - uint8_t l_mbaDimm = - (*l_itr)->getAttr<TARGETING::ATTR_MBA_DIMM>(); - - // if childPort was not set in the callout - // the caller is trying to callout either all dimms - // connected to this MBA or a specific dimm number on both - // ports - if( i_childPort == FAPI_ALL_MBA_PORTS ) + if (l_childIsDimm) { - // if the caller reqested all children on all ports - // or if this dimm matches the requested dimm on - // either port then add it - if( ( i_childNumber == FAPI_ALL_MBA_DIMMS ) || - ( i_childNumber == l_mbaDimm )) + // Match i_childPort and i_childNum + if ( ((i_childPort == ErrorInfoChildrenCDG::ALL_CHILD_PORTS) || + (i_childPort == + (*l_itr)->getAttr<TARGETING::ATTR_MBA_PORT>())) + && + ((i_childNum == ErrorInfoChildrenCDG::ALL_CHILD_NUMBERS) || + (i_childNum == + (*l_itr)->getAttr<TARGETING::ATTR_MBA_DIMM>())) ) { - FAPI_DBG("adding callout for i_childNumber=%d " - "and i_childPort %d ", - i_childNumber, i_childPort ); - - o_childTargets.push_back( *l_itr ); + o_childTargets.push_back(*l_itr); } } - else + else if (l_childIsChip) { - // if caller requested all dimms on a specific port or if this - // child is the one requested then add it - if((( i_childNumber == FAPI_ALL_MBA_DIMMS ) || - ( i_childNumber == l_mbaDimm )) && - ( i_childPort == l_mbaPort )) + // Match i_childNum + if ((i_childNum == ErrorInfoChildrenCDG::ALL_CHILD_NUMBERS) || + (i_childNum == + (*l_itr)->getAttr<TARGETING::ATTR_POSITION>())) { - FAPI_DBG("adding callout for i_childNumber=%d " - " and i_childPort %d", - i_childNumber, i_childPort ); - - o_childTargets.push_back( *l_itr ); + o_childTargets.push_back(*l_itr); } } + else if (l_childIsChiplet) + { + // Match i_childNum + if ((i_childNum == ErrorInfoChildrenCDG::ALL_CHILD_NUMBERS) || + (i_childNum == + (*l_itr)->getAttr<TARGETING::ATTR_CHIP_UNIT>())) + { + o_childTargets.push_back(*l_itr); + } + } + else + { + // Do not match on anything + o_childTargets.push_back(*l_itr); + } } - } - else + } while(0); +} + +/** + * @brief Processes any Children Callout/Deconfigure/GARD requests in the + * ReturnCode Error Information and adds them to the error log + * + * @param[i] i_errInfo Reference to ReturnCode Error Information + * @param[io] io_pError Errorlog Handle + */ +void processEIChildrenCDGs(const ErrorInfo & i_errInfo, + errlHndl_t io_pError) +{ + // Iterate through the Child CGD requests, adding each to the error log + for (ErrorInfo::ErrorInfoChildrenCDGCItr_t l_itr = + i_errInfo.iv_childrenCDGs.begin(); + l_itr != i_errInfo.iv_childrenCDGs.end(); ++l_itr) { - TARGETING::getChildChiplets(o_childTargets, i_pParent, i_childType); - } + HWAS::callOutPriority l_priority = + xlateCalloutPriority((*l_itr)->iv_calloutPriority); + + HWAS::DeconfigEnum l_deconfig = HWAS::NO_DECONFIG; + if ((*l_itr)->iv_deconfigure) + { + l_deconfig = HWAS::DELAYED_DECONFIG; + } + + HWAS::GARD_ErrorType l_gard = HWAS::GARD_NULL; + if ((*l_itr)->iv_gard) + { + l_gard = HWAS::GARD_Unrecoverable; + } + + // Get a list of children to callout + TARGETING::TargetHandleList l_children; + getChildTargetsForCDG((*l_itr)->iv_parent, + (*l_itr)->iv_childType, + (*l_itr)->iv_childPort, + (*l_itr)->iv_childNumber, + l_children); + + // Callout/Deconfigure/GARD each child as appropriate + for (TARGETING::TargetHandleList::const_iterator + l_itr = l_children.begin(); + l_itr != l_children.end(); ++l_itr) + { + FAPI_ERR("processEIChildrenCDGs: Calling out target (huid:%.8x, pri:%d, deconf:%d, gard:%d)", + TARGETING::get_huid(*l_itr), l_priority, l_deconfig, + l_gard); + io_pError->addHwCallout(*l_itr, l_priority, l_deconfig, l_gard); + } + } } //****************************************************************************** |