summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorChris Engel <cjengel@us.ibm.com>2016-07-13 16:10:54 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-08-22 13:47:05 -0400
commitb692f91c173ca684b557b8f76d268720e58b36a4 (patch)
tree6f100e0f80e5bc60b69824441e266e1da69e6760 /src/include
parent984f7f35a02e4894c8cb448223bea8d53b64f459 (diff)
downloadtalos-hostboot-b692f91c173ca684b557b8f76d268720e58b36a4.tar.gz
talos-hostboot-b692f91c173ca684b557b8f76d268720e58b36a4.zip
Trustedboot support for using TPM target
Change-Id: I362085fd81663b9b8ec56ed9e0670cf71fc851e4 RTC: 153386 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28482 Reviewed-by: Christopher J. Engel <cjengel@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/devicefw/userif.H6
-rw-r--r--src/include/usr/i2c/tpmddif.H18
-rw-r--r--src/include/usr/i2c/tpmddreasoncodes.H1
-rw-r--r--src/include/usr/secureboot/trustedbootif.H14
4 files changed, 18 insertions, 21 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
index 970a747a6..59e812d8a 100644
--- a/src/include/usr/devicefw/userif.H
+++ b/src/include/usr/devicefw/userif.H
@@ -304,15 +304,13 @@ namespace DeviceFW
/**
* Construct the device addressing parameters for the TPM device ops.
- * @param[in] i_tpm_enum The chip number of the TPM to access. See
- * tpm_chip_types_t in tpmddif.H
* @param[in] i_tpm_operation The TPM operation to perform. See
* tpm_op_types_t in tpmddif.H
* @param[in] i_command_len Command length to write during transmit
* operations
*/
- #define DEVICE_TPM_ADDRESS( i_tpm_enum, i_tpm_op, i_command_len )\
- DeviceFW::TPM, static_cast<uint64_t>(( i_tpm_enum )),\
+ #define DEVICE_TPM_ADDRESS( i_tpm_op, i_command_len )\
+ DeviceFW::TPM,\
static_cast<uint64_t>(( i_tpm_op )),\
static_cast<uint64_t>(( i_command_len ))
diff --git a/src/include/usr/i2c/tpmddif.H b/src/include/usr/i2c/tpmddif.H
index fe8bd0c4a..67602c2be 100644
--- a/src/include/usr/i2c/tpmddif.H
+++ b/src/include/usr/i2c/tpmddif.H
@@ -29,17 +29,6 @@ namespace TPMDD
{
/**
- * @brief Enumerations to select TPM
-*/
-enum tpm_chip_types_t
-{
- TPM_PRIMARY = 0,
- TPM_BACKUP = 1,
- LAST_CHIP_TYPE,
- FIRST_CHIP_TYPE = TPM_PRIMARY
-};
-
-/**
* @brief TPM Operation to perform
*/
enum tpm_op_types_t
@@ -68,12 +57,12 @@ struct tpm_info_t
{
tpm_op_types_t operation; ///< TPM operation to perform
TARGETING::EntityPath i2cMasterPath; ///< I2C Master path
- TARGETING::Target * i2cTarget; ///< I2C Target
+ TARGETING::Target * i2cTarget; ///< I2C Master Target
+ TARGETING::Target * tpmTarget; ///< TPM Target
uint64_t busFreq; ///< Bus speed in Hz
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
@@ -90,8 +79,7 @@ struct tpm_info_t
*
* @return true if device is present
*/
-bool tpmPresence ( TARGETING::Target * i_target,
- tpm_chip_types_t i_chip );
+bool tpmPresence ( TARGETING::Target * i_target);
/**
* @brief this function will read all of the associated attributes needed
diff --git a/src/include/usr/i2c/tpmddreasoncodes.H b/src/include/usr/i2c/tpmddreasoncodes.H
index 7bd2df1cf..d9abeec67 100644
--- a/src/include/usr/i2c/tpmddreasoncodes.H
+++ b/src/include/usr/i2c/tpmddreasoncodes.H
@@ -59,6 +59,7 @@ enum tpmModuleId
TPMDD_WRITEFIFO = 0x09,
TPMDD_READFIFO = 0x0A,
TPMDD_READSTSREGVALID = 0x0B,
+ TPMDD_TPMPRESENCEDETECT = 0x0C,
};
/**
diff --git a/src/include/usr/secureboot/trustedbootif.H b/src/include/usr/secureboot/trustedbootif.H
index 27dd1e8d4..21ab262a6 100644
--- a/src/include/usr/secureboot/trustedbootif.H
+++ b/src/include/usr/secureboot/trustedbootif.H
@@ -42,11 +42,21 @@ namespace TRUSTEDBOOT
{
struct _TpmLogMgr;
+ /// Enumerations to select TPM
+ typedef enum
+ {
+ TPM_PRIMARY = 0,
+ TPM_BACKUP = 1,
+ LAST_CHIP_TYPE,
+ FIRST_CHIP_TYPE = TPM_PRIMARY
+ } TPM_role;
+
+
/// Track system TPM status
struct TpmTarget
{
- TARGETING::Target* nodeTarget; ///< Node target ptr
- TPMDD::tpm_chip_types_t chip; ///< Chip Pri vs Backup
+ TARGETING::Target* tpmTarget; ///< TPM target ptr
+ TPM_role role; ///< Pri vs Backup
uint8_t initAttempted:1;///< Has TPM init been run
uint8_t available:1; ///< Is TPM physically in system
uint8_t failed:1; ///< Is TPM currently failed
OpenPOWER on IntegriCloud