drivers/crb: Add support for PTT

When we use Intel Platform Trust Technologies, we need to verify
that the enable bit is set before we use the integrated TPM.

Change-Id: I3b262a5d5253648fb96fb1fd9ba3995f92755bb1
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34381
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Christian Walter 2019-07-16 20:07:36 +02:00 committed by Philipp Deppenwiese
parent 0bd84ed250
commit 5422681942
1 changed files with 9 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include <security/tpm/tis.h>
#include <arch/acpigen.h>
#include <device/device.h>
#include <drivers/intel/ptt/ptt.h>
#include "tpm.h"
#include "chip.h"
@ -49,6 +50,14 @@ int tis_open(void)
return -1;
}
if (CONFIG(HAVE_INTEL_PTT)) {
if (!ptt_active()) {
printk(BIOS_ERR, "%s: Intel PTT is not active.\n", __func__);
return -1;
}
printk(BIOS_DEBUG, "%s: Intel PTT is active.\n", __func__);
}
return 0;
}