summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c
diff options
context:
space:
mode:
authorChris Engel <cjengel@us.ibm.com>2016-04-13 13:32:43 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-07-27 12:22:07 -0400
commit3d565d0fd7f4f05803e53ab7274008fa448030f6 (patch)
treefd6ef511ac6281f1c041dc11956b934ffe43db12 /src/usr/i2c
parentc7ba6555103fb93d5c23b5b9faaff789098b93eb (diff)
downloadtalos-hostboot-3d565d0fd7f4f05803e53ab7274008fa448030f6.tar.gz
talos-hostboot-3d565d0fd7f4f05803e53ab7274008fa448030f6.zip
Support for TPM Required attribute to allow system to IPL without a TPM
Change-Id: I53e841036dfff75c6ed7d04ee55292b1285a6bee RTC: 125287 ForwardPort: yes Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27454 Tested-by: Jenkins Server <pfd-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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/i2c')
-rwxr-xr-xsrc/usr/i2c/tpmdd.C28
-rwxr-xr-xsrc/usr/i2c/tpmdd.H7
2 files changed, 22 insertions, 13 deletions
diff --git a/src/usr/i2c/tpmdd.C b/src/usr/i2c/tpmdd.C
index d2b777cb0..8c0b5319a 100755
--- a/src/usr/i2c/tpmdd.C
+++ b/src/usr/i2c/tpmdd.C
@@ -340,7 +340,8 @@ bool tpmPresence ( TARGETING::Target * i_target,
err = tpmRead( &vendorId,
vendorIdSize,
- tpmInfo );
+ tpmInfo,
+ true /* silent */ );
if ( NULL != err )
{
@@ -391,7 +392,8 @@ bool tpmPresence ( TARGETING::Target * i_target,
err = tpmRead( &familyId,
familyIdSize,
- tpmInfo );
+ tpmInfo,
+ true /* silent */);
if ( NULL != err )
{
@@ -463,7 +465,8 @@ bool tpmPresence ( TARGETING::Target * i_target,
// ------------------------------------------------------------------
errlHndl_t tpmRead ( void * o_buffer,
size_t i_buflen,
- tpm_info_t i_tpmInfo )
+ tpm_info_t i_tpmInfo,
+ bool i_silent)
{
errlHndl_t err = NULL;
errlHndl_t err_NACK = NULL;
@@ -654,16 +657,19 @@ errlHndl_t tpmRead ( void * o_buffer,
{
if (err)
{
- // commit original NACK error with new err PLID
- err_NACK->plid(err->plid());
- TRACFCOMP(g_trac_tpmdd, "tpmRead(): Committing saved NACK "
- "err eid=0x%X with plid of returned err: 0x%X",
- err_NACK->eid(), err_NACK->plid());
+ if (!i_silent)
+ {
+ // commit original NACK error with new err PLID
+ err_NACK->plid(err->plid());
+ TRACFCOMP(g_trac_tpmdd, "tpmRead(): Committing saved NACK "
+ "err eid=0x%X with plid of returned err: 0x%X",
+ err_NACK->eid(), err_NACK->plid());
- ERRORLOG::ErrlUserDetailsTarget(i_tpmInfo.i2cTarget)
- .addToLog(err_NACK);
+ ERRORLOG::ErrlUserDetailsTarget(i_tpmInfo.i2cTarget)
+ .addToLog(err_NACK);
- errlCommit(err_NACK, TPMDD_COMP_ID);
+ errlCommit(err_NACK, TPMDD_COMP_ID);
+ }
}
else
{
diff --git a/src/usr/i2c/tpmdd.H b/src/usr/i2c/tpmdd.H
index ad531d67d..1daee5ab6 100755
--- a/src/usr/i2c/tpmdd.H
+++ b/src/usr/i2c/tpmdd.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -158,12 +158,15 @@ errlHndl_t tpmPerformOp( DeviceFW::OperationType i_opType,
* @param[in] i_tpmInfo Structure of I2C parameters needed to execute
* the command to the I2C device driver.
*
+ * @param[in] i_silent Don't log any error logs on failure
+ *
* @return errlHndl_t NULL if successful, otherwise a pointer to the
* error log.
*/
errlHndl_t tpmRead ( void * o_buffer,
size_t i_buflen,
- tpm_info_t i_tpmInfo );
+ tpm_info_t i_tpmInfo,
+ bool i_silent = false);
/**
* @brief This function peforms the sequencing to do a write of the
OpenPOWER on IntegriCloud