coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tpm.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <acpi/acpi.h>
4 #include <bootstate.h>
5 #include <security/tpm/tspi.h>
6 
7 static void init_tpm_dev(void *unused)
8 {
9  int s3resume = acpi_is_wakeup_s3();
10  tpm_setup(s3resume);
11 }
12 
static int acpi_is_wakeup_s3(void)
Definition: acpi.h:9
@ BS_DEV_INIT
Definition: bootstate.h:83
@ BS_ON_ENTRY
Definition: bootstate.h:95
#define NULL
Definition: stddef.h:19
static void init_tpm_dev(void *unused)
Definition: tpm.c:7
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, init_tpm_dev, NULL)
uint32_t tpm_setup(int s3flag)
Start the TPM and establish the root of trust.
Definition: tspi.c:135