[PATCH v4 2/3] tcg2: decouple eventlog size from efi
Raymond Mao
raymond.mao at linaro.org
Mon Jan 13 16:13:33 CET 2025
Hi Heinrich,
On Fri, 10 Jan 2025 at 19:06, Heinrich Schuchardt <xypron.glpk at gmx.de>
wrote:
> Am 10. Januar 2025 22:56:34 MEZ schrieb Raymond Mao <
> raymond.mao at linaro.org>:
> >Move default eventlog size from efi to tpm for using in both
> >modules.
> >
> >Signed-off-by: Raymond Mao <raymond.mao at linaro.org>
> >---
> >Changes in v4
> >- Initial patch.
> >
> > include/efi_tcg2.h | 2 --
> > include/tpm_tcg2.h | 2 ++
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h
> >index 8dfb1bc952..7ed8880991 100644
> >--- a/include/efi_tcg2.h
> >+++ b/include/efi_tcg2.h
> >@@ -28,8 +28,6 @@
> > #define EFI_TCG2_MAX_PCR_INDEX 23
> > #define EFI_TCG2_FINAL_EVENTS_TABLE_VERSION 1
> >
> >-#define TPM2_EVENT_LOG_SIZE CONFIG_EFI_TCG2_PROTOCOL_EVENTLOG_SIZE
> >-
> > typedef u32 efi_tcg_event_log_bitmap;
> > typedef u32 efi_tcg_event_log_format;
> > typedef u32 efi_tcg_event_algorithm_bitmap;
> >diff --git a/include/tpm_tcg2.h b/include/tpm_tcg2.h
> >index 6519004cc4..25a31daf65 100644
> >--- a/include/tpm_tcg2.h
> >+++ b/include/tpm_tcg2.h
> >@@ -65,6 +65,8 @@
> > #define EFI_DTB_EVENT_STRING \
> > "DTB DATA"
> >
>
> Please, provide Sphinx style documentation for defines.
>
> >+#define TPM2_EVENT_LOG_SIZE CONFIG_EFI_TCG2_PROTOCOL_EVENTLOG_SIZE
>
> Why would we need such a define at all? Can't we directly use the CONFIG
> value?
>
> Why should the CONFIG value remain in lib/efi_loader/Kconfig? I would not
> expect the log size in the non-EFI case to depend on the UEFI subsystem.
>
> This eventlog size should be treated as part of the kconfigs of
TCG2_PROTOCOL but not lower level of TPM2.
We don't have a separate kconfig page for TCG2_PROTOCOL, if my
understanding is correct, all TCG2 stuff are supposed to be used by EFI
only for now.
Regards,
Raymond
> >+
> > /**
> > * struct TCG_EfiSpecIdEventAlgorithmSize - hashing algorithm
> information
> > *
>
>
More information about the U-Boot
mailing list