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>
This commit is contained in:
parent
4e154a6676
commit
c6d41ecbed
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <baseboard/variants.h>
|
#include <baseboard/variants.h>
|
||||||
#include <bootblock_common.h>
|
#include <bootblock_common.h>
|
||||||
|
#include <security/tpm/tss.h>
|
||||||
|
|
||||||
void bootblock_mainboard_early_init(void)
|
void bootblock_mainboard_early_init(void)
|
||||||
{
|
{
|
||||||
|
@ -9,6 +10,10 @@ void bootblock_mainboard_early_init(void)
|
||||||
size_t num;
|
size_t num;
|
||||||
pads = variant_early_gpio_table(&num);
|
pads = variant_early_gpio_table(&num);
|
||||||
gpio_configure_pads(pads, 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)
|
void bootblock_mainboard_init(void)
|
||||||
|
|
Loading…
Reference in New Issue