drivers/tpm: Implement full PPI

Implement the ACPI PPI interface as described in
"TCG PC Client Physical Presence Interface Specification" Version 1.3.

Add a new Kconfig that allows to use the full PPI instead of the stub
version compiled in.

This doesn't add code to execute the PPI request, as that's up to the
payload with graphical UI support.

Tested on GNU/Linux 5.6 using the sysfs interface at:
/sys/class/tpm/tpm0/ppi/

Change-Id: Ifffe1d9b715e2c37568e1b009e86c298025c89ac
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45568
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph
2020-09-21 09:49:31 +02:00
committed by Hung-Te Lin
parent f20151dfaa
commit 39d6927609
7 changed files with 859 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include <version.h>
#include <boardid.h>
#include <device/device.h>
#include <drivers/tpm/tpm_ppi.h>
#include <fmap.h>
#include <fw_config.h>
#include <stdlib.h>
@ -526,6 +527,9 @@ static uintptr_t write_coreboot_table(uintptr_t rom_table_end)
/* Board configuration information (including straps) */
lb_board_config(head);
if (CONFIG(TPM_PPI))
lb_tpm_ppi(head);
/* Add architecture records. */
lb_arch_add_records(head);