diff options
author | Chris Engel <cjengel@us.ibm.com> | 2015-10-16 13:21:21 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-11-18 12:32:46 -0600 |
commit | 37ad6f7b1a53aaaf063c0cca2baf42da92571139 (patch) | |
tree | 1a5fe9fdfebe4a876cd70447ea94e22ea34519f4 /src/include | |
parent | f5bf9deb1368c6cddc69ca2d20db98939570350c (diff) | |
download | talos-hostboot-37ad6f7b1a53aaaf063c0cca2baf42da92571139.tar.gz talos-hostboot-37ad6f7b1a53aaaf063c0cca2baf42da92571139.zip |
Trustedboot: Move data to Hostboot base and add pcrExtend stub function
Change-Id: Id488af88c7f1796606434a062a9001f31f413ac0
RTC: 125288
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/21475
Tested-by: Jenkins Server
Reviewed-by: Timothy R. Block <block@us.ibm.com>
Tested-by: Jenkins OP Build CI
Tested-by: Jenkins OP HW
Tested-by: FSP CI Jenkins
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/secureboot/trustedbootif.H | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/include/usr/secureboot/trustedbootif.H b/src/include/usr/secureboot/trustedbootif.H index d73220f7f..d59cd1e14 100644 --- a/src/include/usr/secureboot/trustedbootif.H +++ b/src/include/usr/secureboot/trustedbootif.H @@ -33,10 +33,34 @@ // ----------------------------------------------- // Includes // ----------------------------------------------- +#include <i2c/tpmddif.H> +#include <errl/errlentry.H> namespace TRUSTEDBOOT { + /// Track system TPM status + struct TpmTarget + { + TARGETING::Target* nodeTarget; ///< Node target ptr + TPMDD::tpm_chip_types_t chip; ///< Chip Pri vs Backup + uint8_t initAttempted:1;///< Has TPM init been run + uint8_t failed:1; ///< Is TPM currently failed + mutex_t tpmMutex; ///< TPM Mutex + + TpmTarget(); + }; + + /// TPM PCR designations + enum TPM_Pcr + { + PCR_0 = 0, + PCR_1 = 1, + PCR_4 = 4, + PCR_DEBUG = 16, + PCR_MAX = 16, + }; + /** * @brief Initialize trusted boot/TPM components for the master TPM @@ -48,6 +72,21 @@ namespace TRUSTEDBOOT */ void* host_update_master_tpm( void *io_pArgs ); + /** + * @brief Extend a measurement into the TPMs and log + * @param[in] i_pcr PCR to write to + * @param[in] i_digest Digest value to write to PCR + * @param[in] i_digestSize Byte size of i_digest data + * @param[in] i_logMsg Null terminated log message, truncated at 128 chars + * @return errlHndl_t NULL if successful, otherwise a pointer to the + * error log. + * Digest will be right padded with zeros or truncated to match TPM digest + * size being used + */ + errlHndl_t pcrExtend(TPM_Pcr i_pcr, + uint8_t* i_digest, + size_t i_digestSize, + const char* i_logMsg); } // end TRUSTEDBOOT namespace |