summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2018-03-14 01:15:12 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-03-15 18:13:50 -0400
commitaa5d9565d0d12327e781309c614f00fd90e64ebc (patch)
tree83c0cbf3e8522dab3070383eff790591e846d2ff /src/usr/i2c
parent54cc57dd329ef1d2971915348fabfb6f7e13dc01 (diff)
downloadtalos-hostboot-aa5d9565d0d12327e781309c614f00fd90e64ebc.tar.gz
talos-hostboot-aa5d9565d0d12327e781309c614f00fd90e64ebc.zip
Secure Boot: Mark redundant TPM not present until SMP is enabled
Until the SMP is up, a redundant TPM is not able to be presence detected. This change updates the TPM presence detect routine to report a TPM connected to remote processor as not present when the remote processor is not connected to the SMP, so that Hostboot doesn't hit errors attempting to access/use the TPM at inappropriate times. Change-Id: I10aa683ec073be2b44e810746bee320dd6366184 RTC: 184515 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/55814 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: Christopher J. Engel <cjengel@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/i2c')
-rwxr-xr-xsrc/usr/i2c/tpmdd.C24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/usr/i2c/tpmdd.C b/src/usr/i2c/tpmdd.C
index c23862257..a64b43154 100755
--- a/src/usr/i2c/tpmdd.C
+++ b/src/usr/i2c/tpmdd.C
@@ -42,6 +42,7 @@
#include <errl/errludtarget.H>
#include <errl/errludstring.H>
#include <targeting/common/targetservice.H>
+#include <targeting/common/util.H>
#include <devicefw/driverif.H>
#include <i2c/tpmddif.H>
#include <i2c/i2creasoncodes.H>
@@ -354,8 +355,27 @@ bool tpmPresence ( TARGETING::Target * i_target)
break;
}
-
-
+ // Treat TPM as not present if it is being driven by a processor that is
+ // not yet available via XSCOM. The remote processor's FSI accessible
+ // I2C master does not have a path to the TPM, so defer discovery to
+ // after the point when the SMP is established.
+ if( tpmInfo.i2cTarget->getAttr<TARGETING::ATTR_TYPE>()
+ == TARGETING::TYPE_PROC)
+ {
+ const auto scomSwitches = tpmInfo.i2cTarget->getAttr<
+ TARGETING::ATTR_SCOM_SWITCHES>();
+ if(!scomSwitches.useXscom)
+ {
+ TRACFCOMP(g_trac_tpmdd,
+ INFO_MRK "tpmPresence: TPM with HUID 0x%08X not "
+ "accessible, as the proc that drives it (HUID 0x%08X) "
+ "is not XSCOM accessible",
+ get_huid(tpmInfo.tpmTarget),
+ get_huid(tpmInfo.i2cTarget));
+ l_present = false;
+ break;
+ }
+ }
// Verify the TPM is supported by this driver by reading and
// comparing the vendorid
OpenPOWER on IntegriCloud