diff options
author | Bill Hoffa <wghoffa@us.ibm.com> | 2017-01-06 14:03:09 -0600 |
---|---|---|
committer | Matthew A. Ploetz <maploetz@us.ibm.com> | 2017-01-12 16:25:54 -0500 |
commit | caba5e2793fe5c021fead24b2157dc03d5b9133b (patch) | |
tree | cd9d750679d563a641b659abb791239c0ba2fac7 /src/usr/hwas/test | |
parent | 42013d80fce1c1e4386cda63c9c7115382f3c4eb (diff) | |
download | talos-hostboot-caba5e2793fe5c021fead24b2157dc03d5b9133b.tar.gz talos-hostboot-caba5e2793fe5c021fead24b2157dc03d5b9133b.zip |
Deconfig PHB targets when PEC target not in PG
Change-Id: I2ad6c28c3e91e4878aec150352bed2859de3efa7
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34513
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/test')
-rw-r--r-- | src/usr/hwas/test/hwas1test.H | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H index 667d03a46..7dd7b70ed 100644 --- a/src/usr/hwas/test/hwas1test.H +++ b/src/usr/hwas/test/hwas1test.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2016 */ +/* Contributors Listed Below - COPYRIGHT 2011,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -911,7 +911,59 @@ public: (uint16_t)VPD_CP00_PG_PCIx_GOOD[l_chipUnit]; } break; + case TYPE_PHB: + { + TS_INFO( "testHWASisDescFunctional: " + "PCI%d is not functional for PHB target", + l_chipUnit); + //First get Parent PEC target as there are no PG bits + // for PHB + TargetHandleList pParentPECList; + getParentAffinityTargetsByState(pParentPECList, pDesc, + CLASS_UNIT, TYPE_PEC, UTIL_FILTER_PRESENT); + HWAS_ASSERT((pParentPECList.size() == 1), + "testHWASisDescFunctional(): pParentPECList != 1"); + Target *l_parentPEC = pParentPECList[0]; + + //Check if parent PEC's PG Data marks it good + ATTR_CHIP_UNIT_type l_indexPCI = + l_parentPEC->getAttr<ATTR_CHIP_UNIT>(); + + for (l_mask = 0x8000; + l_mask > 0; + l_mask >>= 1) + { + if (pgData[VPD_CP00_PG_PCI0_INDEX + l_indexPCI] & + l_mask) + { + // Turn off a bit that should be on + pgData[VPD_CP00_PG_PCI0_INDEX + l_indexPCI] &= + ~l_mask; + } + else + { + // Turn on a bit that should be off + pgData[VPD_CP00_PG_PCI0_INDEX + l_indexPCI] |= + l_mask; + } + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "PCI%d = 0x%04x, mask = 0x%04x", + isDescFunctional(pDesc, pgData), + l_indexPCI, + pgData[VPD_CP00_PG_PCI0_INDEX + + l_indexPCI], + l_mask); + } + // Restore the "all good" data + pgData[VPD_CP00_PG_PCI0_INDEX + l_indexPCI] = + (uint16_t)VPD_CP00_PG_PCIx_GOOD[l_indexPCI]; + } + break; + } case TYPE_EQ: TS_INFO( "testHWASisDescFunctional: " "EQ%d is not functional", l_chipUnit); |