Skip to content

Commit

Permalink
Add callout for unresponsive TPMs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
popfuture authored and dcrowell77 committed Feb 11, 2018
1 parent 7701241 commit 6a2a94e
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions src/usr/i2c/i2c.C
Expand Up @@ -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 );

Expand Down

0 comments on commit 6a2a94e

Please sign in to comment.