summaryrefslogtreecommitdiffstats
path: root/src/usr/secureboot/trusted
diff options
context:
space:
mode:
authorChris Engel <cjengel@us.ibm.com>2015-11-16 10:55:16 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-11-19 10:50:10 -0600
commitf1e68e784db481d111bd890409f7ca236923d5f6 (patch)
tree68b68c42b56e66c36eedbd2ba965a42e9ec28a03 /src/usr/secureboot/trusted
parentb0751669bfae810059edfb430283365cdc75514f (diff)
downloadtalos-hostboot-f1e68e784db481d111bd890409f7ca236923d5f6.tar.gz
talos-hostboot-f1e68e784db481d111bd890409f7ca236923d5f6.zip
Trustedboot: Remove TPM 1.2 support
Change-Id: I2a8635f901e1473ffb81e92861a4b25a5d479095 RTC:125288 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22088 Tested-by: Jenkins Server Reviewed-by: Timothy R. Block <block@us.ibm.com> Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/secureboot/trusted')
-rw-r--r--src/usr/secureboot/trusted/trustedboot.C21
-rw-r--r--src/usr/secureboot/trusted/trustedboot.H86
2 files changed, 7 insertions, 100 deletions
diff --git a/src/usr/secureboot/trusted/trustedboot.C b/src/usr/secureboot/trusted/trustedboot.C
index a80272be3..631448ad7 100644
--- a/src/usr/secureboot/trusted/trustedboot.C
+++ b/src/usr/secureboot/trusted/trustedboot.C
@@ -175,18 +175,8 @@ void tpmInitialize(TRUSTEDBOOT::TpmTarget & io_target,
// Build our command block for a startup
memset(dataBuf, 0, sizeof(dataBuf));
- TRUSTEDBOOT::TPM_BaseOut* resp =
- (TRUSTEDBOOT::TPM_BaseOut*)dataBuf;
-#ifdef CONFIG_TPMDD_1_2
- TRUSTEDBOOT::TPM_2ByteIn* cmd =
- (TRUSTEDBOOT::TPM_2ByteIn*)dataBuf;
-
- cmd->base.tag = TRUSTEDBOOT::TPM_TAG_RQU_COMMAND;
- cmd->base.paramSize = sizeof (TRUSTEDBOOT::TPM_2ByteIn);
- cmd->base.ordinal = TRUSTEDBOOT::TPM_ORD_Startup;
- cmd->param = TRUSTEDBOOT::TPM_ST_CLEAR;
- cmdSize = cmd->base.paramSize;
-#elif defined(CONFIG_TPMDD_2_0)
+ TRUSTEDBOOT::TPM2_BaseOut* resp =
+ (TRUSTEDBOOT::TPM2_BaseOut*)dataBuf;
TRUSTEDBOOT::TPM2_2ByteIn* cmd =
(TRUSTEDBOOT::TPM2_2ByteIn*)dataBuf;
@@ -195,7 +185,6 @@ void tpmInitialize(TRUSTEDBOOT::TpmTarget & io_target,
cmd->base.commandCode = TRUSTEDBOOT::TPM_CC_Startup;
cmd->param = TRUSTEDBOOT::TPM_SU_CLEAR;
cmdSize = cmd->base.commandSize;
-#endif
err = deviceRead(io_target.nodeTarget,
&dataBuf,
@@ -212,11 +201,11 @@ void tpmInitialize(TRUSTEDBOOT::TpmTarget & io_target,
break;
}
- else if (TRUSTEDBOOT::TPM_SUCCESS != resp->returnCode)
+ else if (TRUSTEDBOOT::TPM_SUCCESS != resp->responseCode)
{
TRACFCOMP( g_trac_trustedboot,
"TPM STARTUP OP Fail %X : ",
- resp->returnCode);
+ resp->responseCode);
/*@
* @errortype
@@ -232,7 +221,7 @@ void tpmInitialize(TRUSTEDBOOT::TpmTarget & io_target,
RC_TPM_START_FAIL,
TARGETING::get_huid(
io_target.nodeTarget),
- resp->returnCode,
+ resp->responseCode,
true /*Add HB SW Callout*/ );
err->collectTrace( SECURE_COMP_NAME );
diff --git a/src/usr/secureboot/trusted/trustedboot.H b/src/usr/secureboot/trusted/trustedboot.H
index fa5e085fe..3e3b43411 100644
--- a/src/usr/secureboot/trusted/trustedboot.H
+++ b/src/usr/secureboot/trusted/trustedboot.H
@@ -66,89 +66,8 @@ public:
TpmTarget tpm[MAX_SYSTEM_TPMS];
};
-// Command structures taken from TPM Main - Part3 commands v 1.2 rev116
-
-/// Base of all incoming messages
-struct TPM_BaseIn {
- uint16_t tag; ///< Type TPM_TAG
- uint32_t paramSize; ///< Total # output bytes incl paramSize and tag
- uint32_t ordinal; ///< Type TpmOrdinal : Command ordinal
-} PACKED;
-
-/// Base of all outgoing messages
-struct TPM_BaseOut {
- uint16_t tag; ///< Type TPM_TAG
- uint32_t paramSize; ///< Total # output bytes incl paramSize and tag
- uint32_t returnCode;///< The return code of the operation
-} PACKED;
-
-/// Generic TPM Input Command structure with a 2 byte parm
-struct TPM_2ByteIn {
- TPM_BaseIn base;
- uint16_t param;
-} PACKED;
-
-/// Generic TPM Output Command structure with a 4 byte return data
-struct TPM_4ByteOut {
- TPM_BaseOut base;
- uint32_t resp;
-} PACKED;
-
-#ifdef CONFIG_TPMDD_1_2
-
-/// Incoming TPM_GetCapability structure
-struct TPM_GetCapabilityIn {
- TPM_BaseIn base;
- uint32_t capArea; ///< Partition of capabilites to be interrogated
- uint32_t subCapSize; ///< Size of subCap parameter
- uint8_t subCap[0]; ///< Further definition of information
-} PACKED;
-
-/// Outgoing TPM_GetCapability structure
-struct TPM_GetCapabilityOut {
- TPM_BaseOut base;
- uint32_t respSize; ///< The length of the returned capability response
- uint8_t resp[0]; ///< The capability response
-} PACKED;
-
-/// Various static values
-enum {
- // Command structure tags
- TPM_TAG_RQU_COMMAND = 0x00C1, ///< A command with no authentication
- TPM_TAG_RQU_AUTH1_COMMAND = 0x00C2, ///< A command with one auth handle
- TPM_TAG_RQU_AUTH2_COMMAND = 0x00C3, ///< A command with two auth handles
- TPM_TAG_RSP_COMMAND = 0x00C4, ///< A response from cmd with no auth
- TPM_TAG_RSP_AUTH1_COMMAND = 0x00C5, ///< An auth response w/one auth handle
- TPM_TAG_RSP_AUTH2_COMMAND = 0x00C6, ///< An auth response w/two auth handles
-
-
- // Ordinals
- TPM_ORD_Extend = 0x00000014, ///< Extend a PCR valud
- TPM_ORD_PcrRead = 0x00000015, ///< Read a PCR Value
- TPM_ORD_GetCapability = 0x00000065, ///< Get Capability command
- TPM_ORD_Init = 0x00000097, ///< Init the TPM
- TPM_ORD_Startup = 0x00000099, ///< Initialize the TPM settings
-
- // Capability areas
- TPM_CAP_PROPERTY = 0x00000005, ///< Pull TPM properties
-
- // Capability subcaps
- TPM_CAP_PROP_MANUFACTURER = 0x00000103, ///< returns the vendor ID
- TPM_CAP_PROP_INPUT_BUFFER = 0x00000124, ///< The max size of TPM i/o buf(B)
-
- // TPM_STARTUP_TYPE's
- TPM_ST_CLEAR = 0x0001, ///< Start TPM from a clean state
- TPM_ST_STATE = 0x0002, ///< Start TPM from a saved state
- TPM_ST_DEACTIVATED = 0x0003, ///< Start TPM in deactivated state
-
-
- // TPM Return Codes
- TPM_SUCCESS = 0x00000000,
-
-};
-
-#elif defined(CONFIG_TPMDD_2_0)
-
+// Command structures taken from Trusted Platform Module Library Part 3:
+// Commands Family "2.0"
struct TPM2_BaseIn {
uint16_t tag; ///< Type TPM_ST_xx
uint32_t commandSize; ///< Total # output bytes incl cmdSize and tag
@@ -219,7 +138,6 @@ enum {
};
-#endif
} // end TRUSTEDBOOT namespace
OpenPOWER on IntegriCloud