Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-24 Thread Ilias Apalodimas
Hi Eddie, On Mon, Jan 23, 2023 at 02:15:18PM -0600, Eddie James wrote: > > On 1/16/23 06:00, Ilias Apalodimas wrote: > > Hi Eddie > > > > > > > +static inline u16 tpm2_algorithm_to_len(enum tpm2_algorithms a) > > > +{ > > > + switch (a) { > > > + case TPM2_ALG_SHA1: > > > + return

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-23 Thread Simon Glass
Hi Ilias, On Mon, 16 Jan 2023 at 03:51, Ilias Apalodimas wrote: > > Hi Simon, > > [...] > > > > >> > > > > [..] > > > > > > > >> +static int tcg2_log_init(struct udevice *dev, struct tcg2_event_log > > > >> *elog) > > > >> +{ > > > >> + struct tcg_efi_spec_id_event *ev; > > > > We cannot

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-23 Thread Eddie James
On 1/16/23 06:00, Ilias Apalodimas wrote: Hi Eddie +static inline u16 tpm2_algorithm_to_len(enum tpm2_algorithms a) +{ + switch (a) { + case TPM2_ALG_SHA1: + return TPM2_SHA1_DIGEST_SIZE; + case TPM2_ALG_SHA256: + return TPM2_SHA256_DIGEST_SIZE;

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-16 Thread Ilias Apalodimas
Hi Eddie > +static inline u16 tpm2_algorithm_to_len(enum tpm2_algorithms a) > +{ > + switch (a) { > + case TPM2_ALG_SHA1: > + return TPM2_SHA1_DIGEST_SIZE; > + case TPM2_ALG_SHA256: > + return TPM2_SHA256_DIGEST_SIZE; > + case TPM2_ALG_SHA384: > +

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-16 Thread Ilias Apalodimas
Hi Simon, [...] > > >> > > > [..] > > > > > >> +static int tcg2_log_init(struct udevice *dev, struct tcg2_event_log > > >> *elog) > > >> +{ > > >> + struct tcg_efi_spec_id_event *ev; > > > We cannot add EFI things to generic TPM code. > > > > > > Ah, this is NOT an EFI thing even though

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-13 Thread Simon Glass
Hi Eddie, On Fri, 13 Jan 2023 at 07:46, Eddie James wrote: > > > On 1/12/23 17:43, Simon Glass wrote: > > Hi Eddie, > > > > On Thu, 12 Jan 2023 at 09:16, Eddie James wrote: > >> Add TPM2 functions to support boot measurement. This includes > >> starting up the TPM, initializing/appending the

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-13 Thread Eddie James
On 1/12/23 17:43, Simon Glass wrote: Hi Eddie, On Thu, 12 Jan 2023 at 09:16, Eddie James wrote: Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-13 Thread Heinrich Schuchardt
On 1/13/23 08:07, Ilias Apalodimas wrote: Hi Simon On Fri, 13 Jan 2023 at 01:43, Simon Glass wrote: Hi Eddie, On Thu, 12 Jan 2023 at 09:16, Eddie James wrote: Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-12 Thread Ilias Apalodimas
Hi Simon On Fri, 13 Jan 2023 at 01:43, Simon Glass wrote: > > Hi Eddie, > > On Thu, 12 Jan 2023 at 09:16, Eddie James wrote: > > > > Add TPM2 functions to support boot measurement. This includes > > starting up the TPM, initializing/appending the event log, and > > measuring the U-Boot version.

Re: [PATCH v3 2/6] tpm: Support boot measurements

2023-01-12 Thread Simon Glass
Hi Eddie, On Thu, 12 Jan 2023 at 09:16, Eddie James wrote: > > Add TPM2 functions to support boot measurement. This includes > starting up the TPM, initializing/appending the event log, and > measuring the U-Boot version. Much of the code was used in the > EFI subsystem, so remove it there and

[PATCH v3 2/6] tpm: Support boot measurements

2023-01-12 Thread Eddie James
Add TPM2 functions to support boot measurement. This includes starting up the TPM, initializing/appending the event log, and measuring the U-Boot version. Much of the code was used in the EFI subsystem, so remove it there and use the common functions. Signed-off-by: Eddie James ---