summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime
diff options
context:
space:
mode:
authorIlya Smirnov <ismirno@us.ibm.com>2019-02-19 09:19:35 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-01 15:06:57 -0600
commitb1c1b2cc5e78267fadb9001587f66566cf19159e (patch)
treee40435fd16338b995a5b6c3b0c3bd132ce3d159f /src/usr/runtime
parent7364f2447d187b1b7dfff42403db051c4fc7e4e4 (diff)
downloadtalos-hostboot-b1c1b2cc5e78267fadb9001587f66566cf19159e.tar.gz
talos-hostboot-b1c1b2cc5e78267fadb9001587f66566cf19159e.zip
Secureboot: Enhanced Multinode Comm: TPM_POISONED
This commit introduces a new attribute TPM_POISONED used to indicate that a certain TPM was poisoned during the boot. This attribute is also used to adjust the trustedboot flag in HDAT: if the primary TPM was poisoned during the IPL, the trustedboot setting is turned off in HDAT. Change-Id: I32ff6e79ebba0e38c0e8b4b9bd4aa0f52a250d9a RTC: 203645 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72129 Reviewed-by: Michael Baiocchi <mbaiocch@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: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime')
-rw-r--r--src/usr/runtime/populate_hbruntime.C18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index db32eef40..75c8f3a2f 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -1762,6 +1762,22 @@ errlHndl_t populate_hbSecurebootData ( void )
bool trusted = false;
#ifdef CONFIG_TPMDD
trusted = TRUSTEDBOOT::functionalPrimaryTpmExists();
+
+ if(trusted)
+ {
+ // Check if the primary TPM has been poisoned. If it has,
+ // trustedboot state cannot be guaranteed on the system.
+ TARGETING::Target* l_primaryTpm = nullptr;
+ TRUSTEDBOOT::getPrimaryTpm(l_primaryTpm);
+ if(!l_primaryTpm ||
+ l_primaryTpm->getAttr<TARGETING::ATTR_TPM_POISONED>())
+ {
+ // Primary TPM doesn't exist or is poisoned -
+ // turn off trustedboot
+ trusted = false;
+ }
+ }
+
#endif
l_sysSecSets->trustedboot = trusted? 1: 0;
OpenPOWER on IntegriCloud