Re: [v3][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-24 Thread Ilias Apalodimas
Hi, > + ret = tcg2_get_fw_eventlog(dev, event_log.buffer, &event_log.pos); > + /* > + * If earlier firmware hasn't passed any eventlog, go ahead and > + * create the eventlog header > + */ > + if (ret == EFI_NOT_FOUND) { > + put_unaligned_le32(0, &event_heade

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-24 Thread Masahisa Kojima
Hi Ruchika, On Wed, 24 Nov 2021 at 18:12, Ruchika Gupta wrote: > > Hi Kojima-san, > > On Wed, 24 Nov 2021 at 13:08, Masahisa Kojima > wrote: >> >> Hi Ruchika, Ilias, >> >> On Tue, 23 Nov 2021 at 20:53, Ruchika Gupta wrote: >> > >> > Platforms may have support to measure their initial firmware

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-24 Thread Ruchika Gupta
Hi Kojima-san, On Wed, 24 Nov 2021 at 13:08, Masahisa Kojima wrote: > Hi Ruchika, Ilias, > > On Tue, 23 Nov 2021 at 20:53, Ruchika Gupta > wrote: > > > > Platforms may have support to measure their initial firmware components > > and pass the event log to u-boot. The event log address can be pa

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-24 Thread Ruchika Gupta
Hi Ilias, On Wed, 24 Nov 2021 at 12:34, Ilias Apalodimas wrote: > Hi Ruchika, > > + > > [...] > > > + ret = platform_get_eventlog(dev, &base, &sz); > > + if (ret == EFI_SUCCESS) { > > Can we invert the logic here? > if (ret != EFI_SUCCESS) > return ret; > > etc... > Change posted

[v3][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added t

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Masahisa Kojima
Hi Ruchika, Ilias, On Tue, 23 Nov 2021 at 20:53, Ruchika Gupta wrote: > > Platforms may have support to measure their initial firmware components > and pass the event log to u-boot. The event log address can be passed > in property tpm_event_log_addr and tpm_event_log_size of the tpm node. > Plat

Re: [v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ilias Apalodimas
Hi Ruchika, > + [...] > + ret = platform_get_eventlog(dev, &base, &sz); > + if (ret == EFI_SUCCESS) { Can we invert the logic here? if (ret != EFI_SUCCESS) return ret; etc... > + void *buffer = (void *)base; > + > + if (sz > TPM2_EVENT_LOG_SIZE) > +

[v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added t

[v2][PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-23 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added t

Re: [PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-22 Thread Ilias Apalodimas
Hi Ruchika, > [...] > +static efi_status_t efi_init_event_log(struct udevice *dev) > { > /* >* vendor_info_size is currently set to 0, we need to change the length >* and allocate the flexible array member if this changes >*/ > struct tcg_pcr_event *event_h

Fwd: [PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-20 Thread Heinrich Schuchardt
Hello Ilias, hello Masahisa, could you, please, review the patch available at https://patchwork.ozlabs.org/project/uboot/patch/2028061751.3334620-1-ruchika.gu...@linaro.org/ Best regards Heinrich On 11/18/21 07:17, Ruchika Gupta wrote: Platforms may have support to measure their initial

[PATCH 1/3] efi_loader: Add check for event log passed from firmware

2021-11-17 Thread Ruchika Gupta
Platforms may have support to measure their initial firmware components and pass the event log to u-boot. The event log address can be passed in property tpm_event_log_addr and tpm_event_log_size of the tpm node. Platforms may choose their own specific mechanism to do so. A weak function is added t