diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2016-05-25 12:19:53 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-07-03 22:38:22 -0400 |
commit | 0b65db2f12b9d51f0ed6120b8ed0115f911dafb3 (patch) | |
tree | 4974b33cab57f6438c124aea0aca5d8e46040c36 /src/usr/hwas | |
parent | 912f18dea05a7b8d80923807416c5791f74e9a71 (diff) | |
download | talos-hostboot-0b65db2f12b9d51f0ed6120b8ed0115f911dafb3.tar.gz talos-hostboot-0b65db2f12b9d51f0ed6120b8ed0115f911dafb3.zip |
Correctly query PG for PERV targets
Change-Id: Ieafc1b73df4618a4838b2c06575afdfae96024b6
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25024
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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')
-rw-r--r-- | src/usr/hwas/common/hwas.C | 53 |
1 files changed, 17 insertions, 36 deletions
diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index 4c26e9ea8..152672433 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -881,43 +881,24 @@ bool isDescFunctional(const TARGETING::TargetHandle_t &i_desc, else if (i_desc->getAttr<ATTR_TYPE>() == TYPE_PERV) { - // Loop through PG entries from PRV entry to last used entry - for (uint8_t l_pgDataIndex = - VPD_CP00_PG_PERVASIVE_INDEX; - l_pgDataIndex <= VPD_CP00_PG_MAX_USED_INDEX; - ++l_pgDataIndex) - { - // Skip reserved entries between EP5 entry and EC00 entry - if ((l_pgDataIndex > VPD_CP00_PG_EP5_INDEX) && - (l_pgDataIndex < VPD_CP00_PG_EC00_INDEX)) - { - continue; - } - - // Skip OB1 and OB2 entries on NIMBUS (region doesn't exist) - if ((i_desc->getAttr<ATTR_MODEL>() == - MODEL_NIMBUS) && - (l_pgDataIndex > VPD_CP00_PG_OB0_INDEX) && - (l_pgDataIndex < VPD_CP00_PG_OB3_INDEX)) - { - continue; - } + // The chip unit number of the perv target + // is the index into the PG data + ATTR_CHIP_UNIT_type indexPERV = + i_desc->getAttr<ATTR_CHIP_UNIT>(); - // Check PERV bit in the entry - if ((i_pgData[l_pgDataIndex] - & VPD_CP00_PG_xxx_PERV) != 0) - { - HWAS_INF("pDesc %.8X - PERV pgData[%d]: " - "actual 0x%04X, expected 0x%04X - bad", - i_desc->getAttr<ATTR_HUID>(), - l_pgDataIndex, - i_pgData[l_pgDataIndex], - (i_pgData[l_pgDataIndex] & - ~VPD_CP00_PG_xxx_PERV)); - l_descFunctional = false; - break; - } - } + // Check PERV bit in the entry + if ((i_pgData[indexPERV] + & VPD_CP00_PG_xxx_PERV) != 0) + { + HWAS_INF("pDesc %.8X - PERV pgData[%d]: " + "actual 0x%04X, expected 0x%04X - bad", + i_desc->getAttr<ATTR_HUID>(), + indexPERV, + i_pgData[indexPERV], + (i_pgData[indexPERV] & + ~VPD_CP00_PG_xxx_PERV)); + l_descFunctional = false; + } } return l_descFunctional; |