diff --git a/include/tpm_tcg2.h b/include/tpm_tcg2.h index eb6afe49e77..189a93ee840 100644 --- a/include/tpm_tcg2.h +++ b/include/tpm_tcg2.h @@ -345,4 +345,13 @@ void tcg2_platform_startup_error(struct udevice *dev, int rc); */ u32 tcg2_algorithm_to_mask(enum tpm2_algorithms); +/** + * tcg2_log_init() - Set up the elog + * + * @dev: TPM device, used to find the number of PCRs + * @elog Platform event log + * Return: zero on success, negative errno otherwise + */ +int tcg2_log_init(struct udevice *dev, struct tcg2_event_log *elog); + #endif /* __TPM_TCG_V2_H */ diff --git a/lib/tpm_tcg2.c b/lib/tpm_tcg2.c index adb32a14f0d..364f7287438 100644 --- a/lib/tpm_tcg2.c +++ b/lib/tpm_tcg2.c @@ -220,7 +220,7 @@ static int tcg2_log_append_check(struct tcg2_event_log *elog, u32 pcr_index, return 0; } -static int tcg2_log_init(struct udevice *dev, struct tcg2_event_log *elog) +int tcg2_log_init(struct udevice *dev, struct tcg2_event_log *elog) { struct tpm_chip_priv *priv = dev_get_uclass_priv(dev); struct tcg_efi_spec_id_event *ev;