summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2019-01-10 10:30:22 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-01-17 15:50:15 -0600
commitb5c6e0b3b0d4d570246cdb6215d93de955da474f (patch)
tree8ee3420271838e594655efca8347f6d810e0fb14 /src/include/usr
parentfba889a1a092467ff83e8540b399c6a7f0d3e748 (diff)
downloadtalos-hostboot-b5c6e0b3b0d4d570246cdb6215d93de955da474f.tar.gz
talos-hostboot-b5c6e0b3b0d4d570246cdb6215d93de955da474f.zip
Add Support for Nuvoton 75x Model of TPMs
This commit adds the ability for hostboot code to support the Nuvoton 75x TPMs along with the current support of the 65x models. A new attribute TPM_MODEL is used to configure the appropriate settings for each model. Change-Id: I14b0f6606a1a94d0ed300fd51bbf3f50e63dfb01 RTC:202356 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70464 Reviewed-by: Ilya Smirnov <ismirno@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> 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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/i2c/tpmddif.H35
-rw-r--r--src/include/usr/i2c/tpmddreasoncodes.H4
2 files changed, 36 insertions, 3 deletions
diff --git a/src/include/usr/i2c/tpmddif.H b/src/include/usr/i2c/tpmddif.H
index d9ff469b8..0f57e4797 100644
--- a/src/include/usr/i2c/tpmddif.H
+++ b/src/include/usr/i2c/tpmddif.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2018 */
+/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -63,6 +63,20 @@ enum tpm_locality_t
};
/**
+ * @brief TPM Models that are supported
+ *
+ * @note Must stay in sync with TPM_MODEL in attribute_types_hb.xml
+ * @note Not using Attribute Enums since FSP does not currently support
+ * overriding enum values
+ */
+enum tpm_model_t : uint8_t
+{
+ TPM_MODEL_UNDETERMINED = 0x00,
+ TPM_MODEL_65x = 0x01,
+ TPM_MODEL_75x = 0x02,
+};
+
+/**
* @brief Structure of common parameters needed by different parts of
* the code.
*/
@@ -84,6 +98,15 @@ struct tpm_info_t
uint8_t i2cMuxBusSelector; ///< The Selector for the I2C MUX
TARGETING::EntityPath i2cMuxPath; ///< I2C MUX path
+ uint8_t model; ///< TPM Model
+ uint8_t sts; ///< STS
+ uint8_t burstCount; ///< burstCount
+ uint8_t tpmHash; ///< TPM Hash
+ uint8_t wrFifo; ///< Write FIFO
+ uint8_t rdFifo; ///< Read FIFO
+ uint8_t vendorIdOffset; ///< Vendor ID Offset
+ uint32_t vendorId; ///< Vendor ID
+
/**
* @brief Construct a default tpm_info_t
*/
@@ -100,7 +123,15 @@ struct tpm_info_t
offset(0),
addrSize(LAST_DEVICE_TYPE),
i2cMuxBusSelector(I2C_MUX::NOT_APPLICABLE),
- i2cMuxPath()
+ i2cMuxPath(),
+ model(TPM_MODEL_UNDETERMINED),
+ sts(0),
+ burstCount(0),
+ tpmHash(0),
+ wrFifo(0),
+ rdFifo(0),
+ vendorIdOffset(0),
+ vendorId(0)
{
}
};
diff --git a/src/include/usr/i2c/tpmddreasoncodes.H b/src/include/usr/i2c/tpmddreasoncodes.H
index 9041391fb..6099d66e0 100644
--- a/src/include/usr/i2c/tpmddreasoncodes.H
+++ b/src/include/usr/i2c/tpmddreasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -87,6 +87,8 @@ enum tpmReasonCode
TPM_RC_TPM_NOT_DETECTED = TPMDD_COMP_ID | 0x0D,
TPM_RC_UNEXPECTED_VENDOR_ID = TPMDD_COMP_ID | 0x0E,
TPM_RC_UNEXPECTED_FAMILY_ID = TPMDD_COMP_ID | 0x0F,
+ TPM_ATTR_MODEL_NOT_FOUND = TPMDD_COMP_ID | 0x10,
+ TPM_ATTR_INVALID_MODEL = TPMDD_COMP_ID | 0x11,
};
}; // end TPMDD
OpenPOWER on IntegriCloud