summaryrefslogtreecommitdiffstats
path: root/src/include/usr/i2c
diff options
context:
space:
mode:
authorChris Engel <cjengel@us.ibm.com>2015-08-03 16:01:14 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-12-11 11:17:32 -0600
commite914974751a5125cff6fa7078399db6f3aac5641 (patch)
tree4f50b6677a2a0111f98884813ff7e028459bcca2 /src/include/usr/i2c
parent0cbd52585b9013430efeaeed6b4c38f6122eea98 (diff)
downloadtalos-hostboot-e914974751a5125cff6fa7078399db6f3aac5641.tar.gz
talos-hostboot-e914974751a5125cff6fa7078399db6f3aac5641.zip
Trustedboot: Additional commands in trusted boot init sequence
- getCap FW Version - TPM Command marshal/unmarshal code Change-Id: Ia9a90b1160c9c3b5d818318771bff21eb013bdf4 RTC: 125287 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20056 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Timothy R. Block <block@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/i2c')
-rw-r--r--src/include/usr/i2c/tpmddif.H46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/include/usr/i2c/tpmddif.H b/src/include/usr/i2c/tpmddif.H
index 0a8233eda..08fbebfc0 100644
--- a/src/include/usr/i2c/tpmddif.H
+++ b/src/include/usr/i2c/tpmddif.H
@@ -51,6 +51,35 @@ enum tpm_op_types_t
};
/**
+* @brief Enumerations to describe the type of devices to be accessed.
+*/
+enum tpm_addr_size_t
+{
+ ONE_BYTE_ADDR = 1,
+ TWO_BYTE_ADDR = 2,
+ LAST_DEVICE_TYPE
+};
+
+/**
+ * @brief Structure of common parameters needed by different parts of
+ * the code.
+ */
+struct tpm_info_t
+{
+ tpm_op_types_t operation; ///< TPM operation to perform
+ TARGETING::EntityPath i2cMasterPath; ///< I2C Master path
+ TARGETING::Target * i2cTarget; ///< I2C Target
+
+ uint8_t port; ///< I2C Master port
+ uint8_t engine; ///< I2C Master engine
+ uint8_t chip; ///< Chip target, primary/backup
+ uint8_t tpmEnabled; ///< TPM attribute defined as available
+ uint8_t devAddr; ///< I2C Address
+ size_t offset; ///< TPM Device register offset
+ tpm_addr_size_t addrSize; ///< I2C Addr size
+};
+
+/**
*
* @brief Determine if targeted TPM is present and enabled in the system
*
@@ -63,6 +92,23 @@ enum tpm_op_types_t
bool tpmPresence ( TARGETING::Target * i_target,
tpm_chip_types_t i_chip );
+/**
+ * @brief this function will read all of the associated attributes needed
+ * to access the intended TPM. These attributes will be used to
+ * determine the type of I2C device as well as how to address it via
+ * the I2C device driver.
+ *
+ * @param[in] i_target target node.
+ *
+ * @param[in/out] io_tpmInfo The structure that will contain the attribute data
+ * read from the target device. Chip field must be set
+ *
+ * @return errlHndl_t NULL if successful, otherwise a pointer to the
+ * error log.
+ */
+errlHndl_t tpmReadAttributes ( TARGETING::Target * i_target,
+ tpm_info_t & io_tpmInfo );
+
}; // end namespace TPMDD
OpenPOWER on IntegriCloud