tpm: Allow separate handling of Google Ti50 TPM
A new iteration of Google's TPM implementation will advertize a new DID:VID, but otherwise follow the same protocol as the earlier design. This change makes use of Kconfigs TPM_GOOGLE_CR50 and TPM_GOOGLE_TI50 to be able to take slightly different code paths, when e.g. evaluating whether TPM firmware is new enough to support certain features. Change-Id: I1e1f8eb9b94fc2d5689656335dc1135b47880986 Signed-off-by: Jes B. Klinke <jbk@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63158 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
committed by
Martin L Roth
parent
9d8df30950
commit
1430b043f0
@@ -419,6 +419,7 @@ static enum cb_err tpm2_claim_locality(void)
|
||||
/* Device/vendor ID values of the TPM devices this driver supports. */
|
||||
static const uint32_t supported_did_vids[] = {
|
||||
0x00281ae0, /* H1 based Cr50 security chip. */
|
||||
0x504a6666, /* H1D3C based Ti50 security chip. */
|
||||
0x0000104a /* ST33HTPH2E32 */
|
||||
};
|
||||
|
||||
@@ -496,15 +497,13 @@ int tpm2_init(struct spi_slave *spi_if)
|
||||
printk(BIOS_INFO, "Connected to device vid:did:rid of %4.4x:%4.4x:%2.2x\n",
|
||||
tpm_info.vendor_id, tpm_info.device_id, tpm_info.revision);
|
||||
|
||||
/* Do some cr50-specific things here. */
|
||||
if (CONFIG(TPM_GOOGLE) && tpm_info.vendor_id == 0x1ae0) {
|
||||
struct cr50_firmware_version ver;
|
||||
|
||||
/* Do some GSC-specific things here. */
|
||||
if (CONFIG(TPM_GOOGLE)) {
|
||||
if (tpm_first_access_this_boot()) {
|
||||
/* This is called for the side-effect of printing the firmware version
|
||||
string */
|
||||
cr50_get_firmware_version(&ver);
|
||||
cr50_set_board_cfg();
|
||||
cr50_get_firmware_version(NULL);
|
||||
cr50_set_board_cfg();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user