summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2018-02-05 12:12:37 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-10 22:19:49 -0500
commit6a2a94e232d808fd630214956f661b428114eaaf (patch)
treefa0f2e1c9a5492d7d24195a69cf4b88b94f92e32 /src
parent77012419bdbc31b3587169426fb95a92895fbdfa (diff)
downloadtalos-hostboot-6a2a94e232d808fd630214956f661b428114eaaf.tar.gz
talos-hostboot-6a2a94e232d808fd630214956f661b428114eaaf.zip
Add callout for unresponsive TPMs
Adds a callout for TPMs that are unresponsive to i2c requests and lowers the processor callout priority to avoid recommending a processor replacement when it was the TPM that was unresponsive. Change-Id: Ia213183f2e93e3bd7e56e93c831ef52c28af31c4 CQ:SW415447 Backport:release-fips910 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53387 Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@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> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/i2c/i2c.C44
1 files changed, 40 insertions, 4 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index 61256f3bd..3b90515db 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -1923,13 +1923,49 @@ errlHndl_t i2cWaitForCmdComp ( TARGETING::Target * i_target,
i_target),
I2C_SET_USER_DATA_2(i_args));
+ // Attempt to find a target representing the device that
+ // failed to respond, and call it out as the most likely
+ // problem. For now, we only support TPM reverse lookup;
+ // TODO RTC 94872 will implement generic support for other
+ // devices.
+
+ // Loop thru TPMs in the system and match physical path,
+ // engine, and port to the i2c master
+ auto l_devFound = false;
+ const auto l_physPath = i_target->getAttr<
+ TARGETING::ATTR_PHYS_PATH>();
+ TARGETING::TargetHandleList allTpms;
+ TARGETING::getAllChips( allTpms, TARGETING::TYPE_TPM, false );
+ for(const auto &tpm: allTpms)
+ {
+ const auto l_tpmInfo = tpm->getAttr<
+ TARGETING::ATTR_TPM_INFO>();
- // For now limited in what we can call out:
- // Could be an issue with Processor or its bus
+ if (l_tpmInfo.i2cMasterPath == l_physPath &&
+ l_tpmInfo.engine == i_args.engine &&
+ l_tpmInfo.port == i_args.port)
+ {
+ TRACFCOMP(g_trac_i2c,
+ "Unresponsive TPM found: "
+ "Engine=%d, masterPort=%d "
+ "huid for its i2c master is 0x%.8X",
+ l_tpmInfo.engine,
+ l_tpmInfo.port,
+ TARGETING::get_huid(i_target));
+ err->addHwCallout(tpm,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::NO_DECONFIG,
+ HWAS::GARD_NULL);
+ l_devFound = true;
+ break;
+ }
+ }
+
+ // Could also be an issue with Processor or its bus
// -- both on the same FRU
- // @todo RTC 94872 - update this callout
err->addHwCallout( i_target,
- HWAS::SRCI_PRIORITY_HIGH,
+ l_devFound? HWAS::SRCI_PRIORITY_MED:
+ HWAS::SRCI_PRIORITY_HIGH,
HWAS::NO_DECONFIG,
HWAS::GARD_NULL );
OpenPOWER on IntegriCloud