Project

General

Profile

Actions

Feature #433

open

Unify TPM drivers in coreboot

Added by Michał Żygowski over 1 year ago. Updated 9 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/24/2022
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

Add an option to compile all drivers for TPM 1.2, 2.0 TIS and CRB. The motivation is to not build multiple coreboot ROMs for each possible TPM supported by the platform.

The tasks would include:

  • runtime TPM detection (probing TPM_INTF_CAPABILITY and TPM_INTERFACE_ID)
  • rename the TPM driver functions, make them static and expose them as a driver structure, e.g.

struct tpm_driver {
void (*init)(void);
int (*open)(void);
int (*close)(void);
int (*sendrecv)(const uint8_t *sendbuf, size_t send_size, uint8_t *recvbuf, size_t *recv_len);
}

  • based on the detected TPM, hook the tpm_driver functions to provide the global TPM API: tis_open, tis_close, tis_init, tis_sendrecv. Some additional API to get vendor/device name could also be considered.
Actions

Also available in: Atom PDF