diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2016-08-10 12:20:36 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-25 18:44:00 -0400 |
commit | 51aa7d2be9897a31da51518dc964f09f688a275c (patch) | |
tree | a084abac54fbe8942148e4a7fb1ef8f48acbebc9 /src/usr/hwas | |
parent | 6eb84744ea7350eb566f3ddfd02d254a85ed4e08 (diff) | |
download | blackbird-hostboot-51aa7d2be9897a31da51518dc964f09f688a275c.tar.gz blackbird-hostboot-51aa7d2be9897a31da51518dc964f09f688a275c.zip |
Update Xbus hwas rules and call pcie_scominit for all procs
Change-Id: I10db2fecc8a4b5571f7a8f9551954c107a2ebf2a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28110
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas')
-rw-r--r-- | src/usr/hwas/common/hwas.C | 56 | ||||
-rw-r--r-- | src/usr/hwas/test/hwas1test.H | 45 |
2 files changed, 43 insertions, 58 deletions
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index 64f248dac..0dc9adfa8 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -117,43 +117,6 @@ void enableHwasState(Target *i_target, } -/** - * @brief simple helper fn to check IOX/PBIOX pairs in PG XBUS data - * - * @param[in] i_pgData XBUS data from PG keyword VPD - * - * @return bool pairs are valid - * - */ -bool areIoxPairsValid(uint16_t i_pgData) -{ - bool l_valid = true; - - // Check that pairs are valid, that is, both good or both bad - for (uint8_t l_pair = 0; - l_pair <= 2; - l_pair++) - { - // Check if both are good in the pair - if ((i_pgData & VPD_CP00_PG_XBUS_IOX_PAIR[l_pair]) == 0) - { - continue; - } - - // Check if both are bad in the pair - if ((i_pgData & VPD_CP00_PG_XBUS_IOX_PAIR[l_pair]) == - VPD_CP00_PG_XBUS_IOX_PAIR[l_pair]) - { - continue; - } - - l_valid = false; - break; - } - - return l_valid; -} - /** * @brief simple helper fn to check L3/L2/REFR triplets in PG EPx data @@ -501,6 +464,10 @@ bool isChipFunctional(const TARGETING::TargetHandle_t &i_target, { bool l_chipFunctional = true; + ATTR_MODEL_type l_model = i_target->getAttr<ATTR_MODEL>(); + uint16_t l_xbus = (l_model == MODEL_NIMBUS) ? + VPD_CP00_PG_XBUS_GOOD_NIMBUS : VPD_CP00_PG_XBUS_GOOD_CUMULUS; + // Check all bits in FSI entry if (i_pgData[VPD_CP00_PG_FSI_INDEX] != VPD_CP00_PG_FSI_GOOD) @@ -577,18 +544,17 @@ bool isChipFunctional(const TARGETING::TargetHandle_t &i_target, l_chipFunctional = false; } else - // Check bits in XBUS entry, validating pairs in partial good region + // Check bits in XBUS entry, ignoring individual xbus targets + // Note that what is good is different bewteen Nimbus/Cumulus if (((i_pgData[VPD_CP00_PG_XBUS_INDEX] & - ~VPD_CP00_PG_XBUS_PG_MASK) != VPD_CP00_PG_XBUS_GOOD) - || - (!areIoxPairsValid(i_pgData[VPD_CP00_PG_XBUS_INDEX]))) + ~VPD_CP00_PG_XBUS_PG_MASK) != l_xbus)) { HWAS_INF("pTarget %.8X - XBUS pgData[%d]: " "actual 0x%04X, expected 0x%04X - bad", i_target->getAttr<ATTR_HUID>(), VPD_CP00_PG_XBUS_INDEX, i_pgData[VPD_CP00_PG_XBUS_INDEX], - VPD_CP00_PG_XBUS_GOOD); + l_xbus); l_chipFunctional = false; } @@ -605,9 +571,9 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, { ATTR_CHIP_UNIT_type indexXB = i_desc->getAttr<ATTR_CHIP_UNIT>(); - // Check pair of bits in XBUS entry + // Check bits in XBUS entry if ((i_pgData[VPD_CP00_PG_XBUS_INDEX] & - VPD_CP00_PG_XBUS_IOX_PAIR[indexXB]) != 0) + VPD_CP00_PG_XBUS_IOX[indexXB]) != 0) { HWAS_INF("pDesc %.8X - XBUS%d pgData[%d]: " "actual 0x%04X, expected 0x%04X - bad", @@ -615,7 +581,7 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, VPD_CP00_PG_XBUS_INDEX, i_pgData[VPD_CP00_PG_XBUS_INDEX], (i_pgData[VPD_CP00_PG_XBUS_INDEX] & - ~VPD_CP00_PG_XBUS_IOX_PAIR[indexXB])); + ~VPD_CP00_PG_XBUS_IOX[indexXB])); l_descFunctional = false; } } diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H index 4ad8e49a8..a79828f06 100644 --- a/src/usr/hwas/test/hwas1test.H +++ b/src/usr/hwas/test/hwas1test.H @@ -57,7 +57,7 @@ const uint16_t pgDataAllGood[HWAS::VPD_CP00_PG_DATA_ENTRIES] = (uint16_t)HWAS::VPD_CP00_PG_N1_GOOD, (uint16_t)HWAS::VPD_CP00_PG_N2_GOOD, (uint16_t)HWAS::VPD_CP00_PG_N3_GOOD, - (uint16_t)HWAS::VPD_CP00_PG_XBUS_GOOD, + (uint16_t)HWAS::VPD_CP00_PG_XBUS_GOOD_CUMULUS, (uint16_t)HWAS::VPD_CP00_PG_MCxx_GOOD, (uint16_t)HWAS::VPD_CP00_PG_MCxx_GOOD, (uint16_t)HWAS::VPD_CP00_PG_OBUS_GOOD, @@ -296,9 +296,9 @@ public: TargetHandle_t pTarget = *pTarget_it; ATTR_MODEL_type l_model = pTarget->getAttr<ATTR_MODEL>(); uint16_t l_xbus = (MODEL_NIMBUS == l_model) - ? (uint16_t)(VPD_CP00_PG_XBUS_GOOD | - VPD_CP00_PG_XBUS_IOX_PAIR[0]) - : (uint16_t)VPD_CP00_PG_XBUS_GOOD; + ? (uint16_t)(VPD_CP00_PG_XBUS_GOOD_NIMBUS | + VPD_CP00_PG_XBUS_IOX[0]) + : (uint16_t)VPD_CP00_PG_XBUS_GOOD_CUMULUS; uint16_t l_obus12 = (MODEL_NIMBUS == l_model) ? (uint16_t)VPD_CP00_PG_RESERVED_GOOD : (uint16_t)VPD_CP00_PG_OBUS_GOOD; @@ -538,9 +538,11 @@ public: l_mask > 0; l_mask >>= 1) { - // NOTE: Single bits of XBUS matched pairs will be turned - // on or off individually while going through loop, - // thus creating and testing mismatched pairs. + // NOTE: Xbus doesn't have matched pairs anymore + // individual Xbus units (0x0400, 0x0200, and 0x0100) + // can be bad and chip is still functional. Any + // other bit being incorrect should cause full chip + // deconfig if (pgData[VPD_CP00_PG_XBUS_INDEX] & l_mask) { // Turn off a bit that should be on @@ -552,14 +554,31 @@ public: pgData[VPD_CP00_PG_XBUS_INDEX] |= l_mask; } - if (isChipFunctional(pTarget, pgData)) + if (((uint16_t)(VPD_CP00_PG_XBUS_PG_MASK)) & l_mask) { - TS_FAIL("testHWASisChipFunctional>" + //Chip should be functional + if (!isChipFunctional(pTarget, pgData)) + { + TS_FAIL("testHWASisChipFunctional>" + "functional = 0x%x, should be true, " + "XBUS = 0x%04x, mask = 0x%04x.", + isChipFunctional(pTarget, pgData), + pgData[VPD_CP00_PG_XBUS_INDEX], + l_mask); + } + } + else + { + //Chip should be non functional + if (isChipFunctional(pTarget, pgData)) + { + TS_FAIL("testHWASisChipFunctional>" "functional = 0x%x, should be false, " "XBUS = 0x%04x, mask = 0x%04x.", isChipFunctional(pTarget, pgData), pgData[VPD_CP00_PG_XBUS_INDEX], l_mask); + } } // Restore the "all good" data @@ -590,9 +609,9 @@ public: TargetHandle_t pTarget = *pTarget_it; ATTR_MODEL_type l_model = pTarget->getAttr<ATTR_MODEL>(); uint16_t l_xbus = (MODEL_NIMBUS == l_model) - ? (uint16_t)(VPD_CP00_PG_XBUS_GOOD | - VPD_CP00_PG_XBUS_IOX_PAIR[0]) - : (uint16_t)VPD_CP00_PG_XBUS_GOOD; + ? (uint16_t)(VPD_CP00_PG_XBUS_GOOD_NIMBUS | + VPD_CP00_PG_XBUS_IOX[0]) + : (uint16_t)VPD_CP00_PG_XBUS_GOOD_CUMULUS; uint16_t l_obus12 = (MODEL_NIMBUS == l_model) ? (uint16_t)VPD_CP00_PG_RESERVED_GOOD : (uint16_t)VPD_CP00_PG_OBUS_GOOD; @@ -758,7 +777,7 @@ public: TS_TRACE( "testHWASisDescFunctional: " "XBUS%d is not functional", l_chipUnit); pgData[VPD_CP00_PG_XBUS_INDEX] |= - (uint16_t)VPD_CP00_PG_XBUS_IOX_PAIR[l_chipUnit]; + (uint16_t)VPD_CP00_PG_XBUS_IOX[l_chipUnit]; if (isDescFunctional(pDesc, pgData)) { |