diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/i2c/tpmddif.H | 35 | ||||
-rw-r--r-- | src/include/usr/i2c/tpmddreasoncodes.H | 8 |
2 files changed, 34 insertions, 9 deletions
diff --git a/src/include/usr/i2c/tpmddif.H b/src/include/usr/i2c/tpmddif.H index 4abd46a04..34128e04c 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,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -78,19 +78,40 @@ struct tpm_info_t uint8_t devAddr; ///< I2C Address size_t offset; ///< TPM Device register offset tpm_addr_size_t addrSize; ///< I2C Addr size + + /** + * @brief Construct a default tpm_info_t + */ + tpm_info_t() + : operation(TPM_OP_LASTOP), + i2cMasterPath(), + i2cTarget(nullptr), + tpmTarget(nullptr), + busFreq(0), + port(0), + engine(0), + tpmEnabled(false), + devAddr(0), + offset(0), + addrSize(LAST_DEVICE_TYPE) + { + } }; /** + * @brief Determine if requested TPM is present and enabled in the system * - * @brief Determine if targeted TPM is present and enabled in the system - * - * @param[in] i_target Target node + * @par Detailed Description: + * Determines if requested TPM is present and enabled in the system. If the + * "TPM Required" policy is set to "TPM Required" and a blueprint TPM (which + * is specified as enabled in the object model) is not detected properly, + * the function will throw error logs to help diagnose the problem. * - * @param[in] i_chip Select primary vs secondary TPM + * @param[in] i_pTpm TPM target; must be of TPM type and must not be nullptr * - * @return true if device is present + * @return bool Whether device is present (true) or not (false) */ -bool tpmPresence ( TARGETING::Target * i_target); +bool tpmPresence (TARGETING::Target* i_pTpm); /** * @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 d9abeec67..9041391fb 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,2016 */ +/* Contributors Listed Below - COPYRIGHT 2011,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -60,6 +60,7 @@ enum tpmModuleId TPMDD_READFIFO = 0x0A, TPMDD_READSTSREGVALID = 0x0B, TPMDD_TPMPRESENCEDETECT = 0x0C, + TPMDD_TPMPRESENCE = 0x0D, }; /** @@ -81,8 +82,11 @@ enum tpmReasonCode TPM_OVERFLOW_ERROR = TPMDD_COMP_ID | 0x08, TPM_UNDERFLOW_ERROR = TPMDD_COMP_ID | 0x09, TPM_TIMEOUT = TPMDD_COMP_ID | 0x0A, - TPM_DEVICE_NOT_AVAILABLE = TPMDD_COMP_ID | 0x0B, + TPM_DISABLED_VIA_MRW = TPMDD_COMP_ID | 0x0B, TPM_BUS_SPEED_LOOKUP_FAIL = TPMDD_COMP_ID | 0x0C, + 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, }; }; // end TPMDD |