[PATCH 2/2 v4] efi: Add basic EFI_TCG2_PROTOCOL support

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Nov 12 20:27:08 CET 2020


On Thu, 12 Nov 2020 at 21:22, Heinrich Schuchardt <xypron.glpk at gmx.de>
wrote:

> On 11/12/20 8:10 PM, Ilias Apalodimas wrote:
> > Hi Heinrich,
> >
> >
> > [...]
> >>> +           return EFI_SUCCESS;
> >>> +
> >>> +   tpm_ver = tpm_get_version(dev);
> >>> +   if (tpm_ver != TPM_V2) {
> >>> +           log_warning("Only TPMv2 supported for EFI_TCG2_PROTOCOL");
> >>
> >> The message should end with \n.
> >>
> >> This message becomes superfluous if you correct
> platform_get_tpm2_device().
> >>
> >
> > platform_get_tpm2_device() is used in EFI calls, won't that break
> printing from
> > EFI apps?
>
> If platform_get_tpm2_device() only return TPM2v2 devices, you don't need
> to check the type and hence you won't need the log_warning() above.
>

Well you still need to warn the user that only TPMv2 devices are supported
no?
Hence my question on what's the best way to do that.


> Regards
>
> Heinrich
>
> >
> >>> +           return EFI_SUCCESS;
> >>> +   }
> >>> +
> >>> +   ret = efi_add_protocol(efi_root, &efi_guid_tcg2_protocol,
> >>> +                          (void *)&efi_tcg2_protocol);
> >>> +   if (ret != EFI_SUCCESS)
> >>> +           log_err("Cannot install EFI_TCG2_PROTOCOL");
> >>
> >> The message should end with \n.
> >>
> >> Best regards
> >>
> >> Heinrich
> >>
> >>> +
> >>> +   return ret;
> >>> +}
> >>>
> >>
> >
> > Cheers
> > /Ilias
> >
>
>


More information about the U-Boot mailing list