summaryrefslogtreecommitdiffstats
path: root/src/usr/secureboot
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2018-02-28 13:01:46 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-03-01 09:51:04 -0500
commiteeadfb7bf9852f327256b17786796809458118ce (patch)
tree4bbfb138279bc5f6b43e32e36a9b7394de1e0e68 /src/usr/secureboot
parenta8b0039d4e3af6fb2a7cbc82b328fa73e14dbc30 (diff)
downloadtalos-hostboot-eeadfb7bf9852f327256b17786796809458118ce.tar.gz
talos-hostboot-eeadfb7bf9852f327256b17786796809458118ce.zip
Add Reset to TPM's I2C Bus for MPIPLs
This commit updates the general I2C reset function to only reset certain engine(s) of the I2C master. This new functionality is then used to reset all of the processor I2C engines that can drive the TPMs on MPIPLs. Change-Id: Ie19e93233b5012b69d59bfc3f485ce2914d665da CQ:SW419116 Backport:release-fips910 Backport:release-fips900 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54840 CI-Ready: Nicholas E. Bofferding <bofferdn@us.ibm.com> CI-Ready: Marshall J. Wilks <mjwilks@us.ibm.com> CI-Ready: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@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> Reviewed-by: Marshall J. Wilks <mjwilks@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: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/secureboot')
-rw-r--r--src/usr/secureboot/trusted/trustedboot.C28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/usr/secureboot/trusted/trustedboot.C b/src/usr/secureboot/trusted/trustedboot.C
index 0c1e9e974..43ce1f330 100644
--- a/src/usr/secureboot/trusted/trustedboot.C
+++ b/src/usr/secureboot/trusted/trustedboot.C
@@ -52,6 +52,7 @@
#include <config.h>
#include <devicefw/driverif.H>
#include <i2c/tpmddif.H>
+#include <i2c/i2cif.H>
#include "trustedboot.H"
#include "trustedTypes.H"
#include "trustedbootCmds.H"
@@ -274,6 +275,33 @@ void* host_update_master_tpm( void *io_pArgs )
if( hwasState.present
&& hwasState.functional)
{
+ // If MPIPL do I2C Reset to any processor's I2C engine that is
+ // driving the TPMs
+ TARGETING::Target* sys = nullptr;
+ (void) tS.getTopLevelTarget( sys );
+ assert(sys, "host_update_master_tpm() system target is nullptr");
+
+ if (sys->getAttr<TARGETING::ATTR_IS_MPIPL_HB>())
+ {
+ err = I2C::i2cResetActiveMasters(
+ I2C::I2C_PROC_HOST,
+ true,
+ I2C::i2cEngineToEngineSelect(tpmData.engine));
+
+ if (nullptr != err)
+ {
+ // Commit log and continue
+ TRACFCOMP(g_trac_trustedboot,ERR_MRK
+ "host_update_master_tpm(): Committing I2C "
+ "Reset Fail plid=0x%X but continuing",
+ err->plid());
+ err->collectTrace(TRBOOT_COMP_NAME);
+ errlCommit(err, TRBOOT_COMP_ID);
+ err = nullptr;
+ }
+
+ }
+
// API call will set TPM init attempted appropriately
tpmInitialize(pPrimaryTpm);
}
OpenPOWER on IntegriCloud