diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2023-09-17 14:46:16 -0500 |
---|---|---|
committer | Jakub Czapiga <jacz@semihalf.com> | 2023-09-22 12:32:52 +0000 |
commit | c6d41ecbed60564fbee0d79677853ac8416d8004 (patch) | |
tree | 3a32413a29aef053e211d3f4477d7125398799f2 /src/mainboard | |
parent | 4e154a6676a4c38c863eb7e4fb85f20a6fc46334 (diff) |
mb/google/brya: Init TPM in bootblock when not using vboot
Brya queries the TPM in early ramstage (pre-device init) to determine
if the CR50 has support for long-pulse interrupts. If the TPM (and
underlying I2C controller) hasn't already been setup in verstage, it
will fail to do so in ramstage since the I2C controller has not yet
been initialized. To work around this, initialize the TPM in bootblock
for the non-vboot case, to ensure the I2C controller is set up when
needed in early ramstage.
TEST=build/boot google/brya (banshee), verify no I2C errors in cbmem
console when initializing TPM in early ramstage.
Change-Id: I26f0711a9cc4c2eb9837f258cadf391d337994c9
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78028
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/brya/bootblock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/bootblock.c b/src/mainboard/google/brya/bootblock.c index c24e9590e2..0d0662bb8c 100644 --- a/src/mainboard/google/brya/bootblock.c +++ b/src/mainboard/google/brya/bootblock.c @@ -2,6 +2,7 @@ #include <baseboard/variants.h> #include <bootblock_common.h> +#include <security/tpm/tss.h> void bootblock_mainboard_early_init(void) { @@ -9,6 +10,10 @@ void bootblock_mainboard_early_init(void) size_t num; pads = variant_early_gpio_table(&num); gpio_configure_pads(pads, num); + + /* Init TPM in non-vboot case so ready in early ramstage before i2c init */ + if (!CONFIG(VBOOT)) + tlcl_lib_init(); } void bootblock_mainboard_init(void) |