diff options
author | Ilya Smirnov <ismirno@us.ibm.com> | 2017-10-13 18:25:52 -0500 |
---|---|---|
committer | Nicholas E. Bofferding <bofferdn@us.ibm.com> | 2017-10-17 22:48:52 -0400 |
commit | 0d9804fd00081aa587e3d5bb7f38f9f36c4689b5 (patch) | |
tree | 38a91f23c7268004a86be4e5fe3829a8f6c45398 | |
parent | 9bc838a525559eb6e68494b51931846975d17ac2 (diff) | |
download | blackbird-hostboot-0d9804fd00081aa587e3d5bb7f38f9f36c4689b5.tar.gz blackbird-hostboot-0d9804fd00081aa587e3d5bb7f38f9f36c4689b5.zip |
Check parents of OBUS_BRICK to determine their functionality
A situation has occurred where an OBUS was not functional but its
child OBUS_BRICKs were, which doesn't make sense. This fix is to
implement checking for OBUS (parent) functionality as part of
OBUS_BRICK check and mark the OBUS_BRICKs not functional if their
parent is not functional.
Change-Id: I7f52927455f08296e55d73312e932f9ebbd2b700
CQ:SW404097
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48415
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
-rw-r--r-- | src/usr/hwas/common/hwas.C | 113 |
1 files changed, 65 insertions, 48 deletions
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index c8af71942..f827ba207 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -591,6 +591,62 @@ bool isChipFunctional(const TARGETING::TargetHandle_t &i_target, return l_chipFunctional; } // isChipFunctional +// Checks the passed in target for functionality. This function assumes +// that the passed in target is of TYPE_OBUS. Returns true if the target +// is functional; false otherwise. +bool isObusFunctional(const TARGETING::TargetHandle_t &i_desc, + const uint16_t i_pgData[]) +{ + bool l_isFunctional = true; + + ATTR_CHIP_UNIT_type indexOB = i_desc->getAttr<ATTR_CHIP_UNIT>(); + // Check all bits in OBUSx entry + if (i_pgData[VPD_CP00_PG_OB0_INDEX + indexOB] != VPD_CP00_PG_OBUS_GOOD) + { + HWAS_INF("pDesc %.8X - OB%d pgData[%d]: " + "actual 0x%04X, expected 0x%04X - bad", + i_desc->getAttr<ATTR_HUID>(), indexOB, + VPD_CP00_PG_OB0_INDEX + indexOB, + i_pgData[VPD_CP00_PG_OB0_INDEX + indexOB], + VPD_CP00_PG_OBUS_GOOD); + l_isFunctional = false; + } + else + // Check PBIOO0 bit in N1 entry + // Rule 3 / Rule 4 PBIOO0 to be good with Nimbus and Cumulus except + // Nimbus Sforza (without optics and NVLINK), so is + // associated with all OBUS entries + if ((i_pgData[VPD_CP00_PG_N1_INDEX] & VPD_CP00_PG_N1_PBIOO0) != 0) + { + HWAS_INF("pDesc %.8X - OB%d pgData[%d]: " + "actual 0x%04X, expected 0x%04X - bad", + i_desc->getAttr<ATTR_HUID>(), indexOB, + VPD_CP00_PG_N1_INDEX, + i_pgData[VPD_CP00_PG_N1_INDEX], + (i_pgData[VPD_CP00_PG_N1_INDEX] & + ~VPD_CP00_PG_N1_PBIOO0)); + l_isFunctional = false; + } + else + // Check PBIOO1 bit in N1 entry if second or third OBUS + // Rule 4 PBIOO1 to be associated with OBUS1 and OBUS2 which only are + // valid on a Cumulus + if (((1 == indexOB) || (2 == indexOB)) && ((i_pgData[VPD_CP00_PG_N1_INDEX] & + VPD_CP00_PG_N1_PBIOO1) != 0)) + { + HWAS_INF("pDesc %.8X - OB%d pgData[%d]: " + "actual 0x%04X, expected 0x%04X - bad", + i_desc->getAttr<ATTR_HUID>(), indexOB, + VPD_CP00_PG_N1_INDEX, + i_pgData[VPD_CP00_PG_N1_INDEX], + (i_pgData[VPD_CP00_PG_N1_INDEX] & + ~VPD_CP00_PG_N1_PBIOO1)); + l_isFunctional = false; + } + + return l_isFunctional; +} + bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, const uint16_t i_pgData[]) @@ -618,54 +674,7 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, else if (i_desc->getAttr<ATTR_TYPE>() == TYPE_OBUS) { - ATTR_CHIP_UNIT_type indexOB = - i_desc->getAttr<ATTR_CHIP_UNIT>(); - // Check all bits in OBUSx entry - if (i_pgData[VPD_CP00_PG_OB0_INDEX + indexOB] != - VPD_CP00_PG_OBUS_GOOD) - { - HWAS_INF("pDesc %.8X - OB%d pgData[%d]: " - "actual 0x%04X, expected 0x%04X - bad", - i_desc->getAttr<ATTR_HUID>(), indexOB, - VPD_CP00_PG_OB0_INDEX + indexOB, - i_pgData[VPD_CP00_PG_OB0_INDEX + indexOB], - VPD_CP00_PG_OBUS_GOOD); - l_descFunctional = false; - } - else - // Check PBIOO0 bit in N1 entry - // Rule 3 / Rule 4 PBIOO0 to be good with Nimbus and Cumulus except - // Nimbus Sforza (without optics and NVLINK), so is - // associated with all OBUS entries - if ((i_pgData[VPD_CP00_PG_N1_INDEX] & - VPD_CP00_PG_N1_PBIOO0) != 0) - { - HWAS_INF("pDesc %.8X - OB%d pgData[%d]: " - "actual 0x%04X, expected 0x%04X - bad", - i_desc->getAttr<ATTR_HUID>(), indexOB, - VPD_CP00_PG_N1_INDEX, - i_pgData[VPD_CP00_PG_N1_INDEX], - (i_pgData[VPD_CP00_PG_N1_INDEX] & - ~VPD_CP00_PG_N1_PBIOO0)); - l_descFunctional = false; - } - else - // Check PBIOO1 bit in N1 entry if second or third OBUS - // Rule 4 PBIOO1 to be associated with OBUS1 and OBUS2 which only are - // valid on a Cumulus - if (((1 == indexOB) || (2 == indexOB)) && - ((i_pgData[VPD_CP00_PG_N1_INDEX] & - VPD_CP00_PG_N1_PBIOO1) != 0)) - { - HWAS_INF("pDesc %.8X - OB%d pgData[%d]: " - "actual 0x%04X, expected 0x%04X - bad", - i_desc->getAttr<ATTR_HUID>(), indexOB, - VPD_CP00_PG_N1_INDEX, - i_pgData[VPD_CP00_PG_N1_INDEX], - (i_pgData[VPD_CP00_PG_N1_INDEX] & - ~VPD_CP00_PG_N1_PBIOO1)); - l_descFunctional = false; - } + l_descFunctional = isObusFunctional(i_desc, i_pgData); } else if ((i_desc->getAttr<ATTR_TYPE>() == TYPE_PEC) @@ -1085,6 +1094,14 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, ~VPD_CP00_PG_N3_NPU)); l_descFunctional = false; } + + // If the target is functional at this point, check its parent + // to make sure it is also functional. Then mark the target + // not functional if its parent is not functional. + if(l_descFunctional) + { + l_descFunctional = isObusFunctional(l_obus_ptr, i_pgData); + } } else if (i_desc->getAttr<ATTR_TYPE>() == TYPE_NPU) |