diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2017-07-31 16:26:42 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-09-29 13:26:29 -0400 |
commit | eb2d9340dac4d1bf781bc44aa6e7d4718a3b90a9 (patch) | |
tree | b689f0c71a0f0f41d71f10e8200acacca0051b0b /src/usr/hwas/test | |
parent | 7ca7ca7fc1aea76ef66ea9472a3e2e6bc6b605b4 (diff) | |
download | talos-hostboot-eb2d9340dac4d1bf781bc44aa6e7d4718a3b90a9.tar.gz talos-hostboot-eb2d9340dac4d1bf781bc44aa6e7d4718a3b90a9.zip |
Partial good updates for Cumulus
Handle differences in PG data for Cumulus that may not have been
identified or finalized for the initial P9 development.
Change-Id: Ibec5a31cca5e8cf62d3671698e09c01f24619d1e
RTC: 134608
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44020
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@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/test')
-rw-r--r-- | src/usr/hwas/test/hwas1test.H | 229 |
1 files changed, 228 insertions, 1 deletions
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H index 0eca4045a..4b1e9ccd0 100644 --- a/src/usr/hwas/test/hwas1test.H +++ b/src/usr/hwas/test/hwas1test.H @@ -1422,7 +1422,234 @@ public: break; - case TYPE_OBUS_BRICK: + case TYPE_MC: + TS_INFO( "testHWASisDescFunctional: " + "MC%d is not functional", l_chipUnit); + if (l_chipUnit) + { + pgData[VPD_CP00_PG_N1_INDEX] |= + (uint16_t)VPD_CP00_PG_N1_MCS23; + } + else + { + pgData[VPD_CP00_PG_N3_INDEX] |= + (uint16_t)VPD_CP00_PG_N3_MCS01; + } + + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "N1/N3 for MC%d = 0x%04x.", + isDescFunctional(pDesc, pgData), + l_chipUnit, + l_chipUnit ? pgData[VPD_CP00_PG_N1_INDEX] + : pgData[VPD_CP00_PG_N3_INDEX]); + } + + if (l_chipUnit) + { + pgData[VPD_CP00_PG_N1_INDEX] = + (uint16_t)VPD_CP00_PG_N1_GOOD; + } + else + { + pgData[VPD_CP00_PG_N3_INDEX] = + (uint16_t)VPD_CP00_PG_N3_GOOD; + } + + for (l_mask = 0x8000; + l_mask > 0; + l_mask >>= 1) + { + if (pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit * 2]] + & l_mask) + { + // Turn off a bit that should be on + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit * 2]] + &= ~l_mask; + } + else + { + // Turn on a bit that should be off + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit * 2]] + |= l_mask; + } + + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "MC%s for MC%d = 0x%04x, " + "mask = 0x%04x.", + isDescFunctional(pDesc, pgData), + l_chipUnit ? "01" : "23", + l_chipUnit, + pgData[VPD_CP00_PG_MCxx_INDEX + [l_chipUnit * 2]], + l_mask); + } + + // Restore the "all good" data + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit * 2]] = + (uint16_t)VPD_CP00_PG_MCxx_GOOD; + } + + break; + + case TYPE_MI: + TS_INFO( "testHWASisDescFunctional: " + "MI%d is not functional", l_chipUnit); + if (l_chipUnit / 2) + { + pgData[VPD_CP00_PG_N1_INDEX] |= + (uint16_t)VPD_CP00_PG_N1_MCS23; + } + else + { + pgData[VPD_CP00_PG_N3_INDEX] |= + (uint16_t)VPD_CP00_PG_N3_MCS01; + } + + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "N1/N3 for MI%d = 0x%04x.", + isDescFunctional(pDesc, pgData), + l_chipUnit, + (l_chipUnit / 2) + ? pgData[VPD_CP00_PG_N1_INDEX] + : pgData[VPD_CP00_PG_N3_INDEX]); + } + + if (l_chipUnit / 2) + { + pgData[VPD_CP00_PG_N1_INDEX] = + (uint16_t)VPD_CP00_PG_N1_GOOD; + } + else + { + pgData[VPD_CP00_PG_N3_INDEX] = + (uint16_t)VPD_CP00_PG_N3_GOOD; + } + + for (l_mask = 0x8000; + l_mask > 0; + l_mask >>= 1) + { + if (pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit]] + & l_mask) + { + // Turn off a bit that should be on + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit]] + &= ~l_mask; + } + else + { + // Turn on a bit that should be off + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit]] + |= l_mask; + } + + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "MC%s for MI%d = 0x%04x, " + "mask = 0x%04x.", + isDescFunctional(pDesc, pgData), + (l_chipUnit / 2) ? "01" : "23", + l_chipUnit, + pgData[VPD_CP00_PG_MCxx_INDEX + [l_chipUnit]], + l_mask); + } + + // Restore the "all good" data + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit]] = + (uint16_t)VPD_CP00_PG_MCxx_GOOD; + } + + break; + + case TYPE_DMI: + TS_INFO( "testHWASisDescFunctional: " + "DMI%d is not functional", l_chipUnit); + if (l_chipUnit / 4) + { + pgData[VPD_CP00_PG_N1_INDEX] |= + (uint16_t)VPD_CP00_PG_N1_MCS23; + } + else + { + pgData[VPD_CP00_PG_N3_INDEX] |= + (uint16_t)VPD_CP00_PG_N3_MCS01; + } + + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "N1/N3 for DMI%d = 0x%04x.", + isDescFunctional(pDesc, pgData), + l_chipUnit, + (l_chipUnit / 4) + ? pgData[VPD_CP00_PG_N1_INDEX] + : pgData[VPD_CP00_PG_N3_INDEX]); + } + + if (l_chipUnit / 4) + { + pgData[VPD_CP00_PG_N1_INDEX] = + (uint16_t)VPD_CP00_PG_N1_GOOD; + } + else + { + pgData[VPD_CP00_PG_N3_INDEX] = + (uint16_t)VPD_CP00_PG_N3_GOOD; + } + + for (l_mask = 0x8000; + l_mask > 0; + l_mask >>= 1) + { + if (pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit / 2]] + & l_mask) + { + // Turn off a bit that should be on + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit / 2]] + &= ~l_mask; + } + else + { + // Turn on a bit that should be off + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit / 2]] + |= l_mask; + } + + if (isDescFunctional(pDesc, pgData)) + { + TS_FAIL("testHWASisDescFunctional>" + "functional = 0x%x, should be false, " + "MC%s for DMI%d = 0x%04x, " + "mask = 0x%04x.", + isDescFunctional(pDesc, pgData), + (l_chipUnit / 4) ? "01" : "23", + l_chipUnit, + pgData[VPD_CP00_PG_MCxx_INDEX + [l_chipUnit / 2]], + l_mask); + } + + // Restore the "all good" data + pgData[VPD_CP00_PG_MCxx_INDEX[l_chipUnit / 2]] = + (uint16_t)VPD_CP00_PG_MCxx_GOOD; + } + + break; + + case TYPE_OBUS_BRICK: { //Two cases here: //OBRICK==SMP --> Target should be present regardless of PG |