drivers/crb: Add SMBIOS hook to generate type 43 TPM Device

Example for Alder Lake PTT:

Handle 0x004C, DMI type 43, 31 bytes
TPM Device
	Vendor ID: INTC
	Specification Version: 2.0
	Firmware Revision: 600.18
	Description: Intel iTPM
	Characteristics:
		TPM Device characteristics not supported
	OEM-specific Information: 0x00000000

TEST=Execute dmidecode and see the type 43 is populated with PTT
on MSI PRO Z690-A WIFI DDR4

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I05289f98969bd431017aff1aa77be5806d6f1838
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
This commit is contained in:
Michał Żygowski 2022-05-04 14:12:17 +02:00
commit 283e5876b5
2 changed files with 92 additions and 1 deletions

View file

@ -177,6 +177,11 @@ typedef TPM_HANDLE TPMI_RH_NV_INDEX;
/* TPM Property capability constants. */
typedef uint32_t TPM_PT;
#define PT_GROUP 0x00000100
#define PT_FIXED (PT_GROUP * 1)
#define TPM_PT_FAMILY_INDICATOR ((TPM_PT)(PT_FIXED + 0))
#define TPM_PT_MANUFACTURER ((TPM_PT)(PT_FIXED + 5))
#define TPM_PT_FIRMWARE_VERSION_1 ((TPM_PT)(PT_FIXED + 11))
#define TPM_PT_FIRMWARE_VERSION_2 ((TPM_PT)(PT_FIXED + 12))
#define PT_VAR (PT_GROUP * 2)
#define TPM_PT_PERMANENT ((TPM_PT)(PT_VAR + 0))