aboutsummaryrefslogtreecommitdiff
path: root/src/post.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2015-03-23 14:22:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-05-21 13:15:56 -0400
commitb310dfa59913149bcb728176fd0fcb52731a97d8 (patch)
tree44459d686d618a60bbd5e4b5f1c1d1dab4d9c674 /src/post.c
parentdfbc885d622871f8f671b3f07374f922df4d0ec4 (diff)
downloadseabios-hppa-b310dfa59913149bcb728176fd0fcb52731a97d8.zip
seabios-hppa-b310dfa59913149bcb728176fd0fcb52731a97d8.tar.gz
seabios-hppa-b310dfa59913149bcb728176fd0fcb52731a97d8.tar.bz2
Implementation of the TCG BIOS extensions
This patch implements the main part of the TCG BIOS extensions. It provides the following functionality: - initialization of the TCPA ACPI table used for logging of measurements - initialization of the TPM by sending a sequence of commands to it - proper setup of the TPM before the BIOS hands over control to the bootloader - support for S3 resume; BIOS sends TPM_Startup(ST_STATE) to TPM - enable configuration of SeaBIOS to be built with TCGBIOS extensions All TCG BIOS extensions are activated with CONFIG_TCGBIOS. Structures that are needed in subsequent patches are also included in tcgbios.h at this point. The effect of this patch is that it initialized the TPM upon VM start and S3 resume. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'src/post.c')
-rw-r--r--src/post.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/post.c b/src/post.c
index 9ea5620..0c7b36b 100644
--- a/src/post.c
+++ b/src/post.c
@@ -28,6 +28,7 @@
#include "output.h" // dprintf
#include "string.h" // memset
#include "util.h" // kbd_init
+#include "tcgbios.h" // tpm_*
/****************************************************************
@@ -220,6 +221,9 @@ maininit(void)
if (threads_during_optionroms())
device_hardware_setup();
+ // Initialize TPM
+ tpm_start();
+
// Run vga option rom
vgarom_setup();
@@ -236,6 +240,9 @@ maininit(void)
interactive_bootmenu();
wait_threads();
+ // Change TPM phys. presence state befor leaving BIOS
+ tpm_leave_bios();
+
// Prepare for boot.
prepareboot();