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. 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 >