
Hi Heinrich
[...]
rc = tpm2_pcr_extend(dev, pcr_index, alg,
This does not compile with sandbox_defconfig
lib/efi_loader/efi_tcg2.c: In function ‘tcg2_pcr_extend’: lib/efi_loader/efi_tcg2.c:152:40: warning: passing argument 3 of ‘tpm2_pcr_extend’ makes pointer from integer without a cast [-Wint-conversion] 152 | rc = tpm2_pcr_extend(dev, pcr_index, alg, | ^~~ | | | u32 {aka unsigned int} In file included from include/efi_tcg2.h:12, from lib/efi_loader/efi_tcg2.c:14: include/tpm-v2.h:398:68: note: expected ‘const uint8_t *’ {aka ‘const unsigned char *’} but argument is of type ‘u32’ {aka ‘unsigned int’} 398 | u32 tpm2_pcr_extend(struct udevice *dev, u32 index, const uint8_t *digest); |
lib/efi_loader/efi_tcg2.c:152:8: error: too many arguments to function ‘tpm2_pcr_extend’ 152 | rc = tpm2_pcr_extend(dev, pcr_index, alg, | ^~~~~~~~~~~~~~~ In file included from include/efi_tcg2.h:12, from lib/efi_loader/efi_tcg2.c:14: include/tpm-v2.h:398:5: note: declared here 398 | u32 tpm2_pcr_extend(struct udevice *dev, u32 index, const uint8_t *digest); | ^~~~~~~~~~~~~~~
I probably should have added this in the cover letter as well but have you applied https://lists.denx.de/pipermail/u-boot/2020-November/433569.html beforehand?
This patch is a prerequisite, since without it extending anything else apart from SHA256 PCRs will fail.
Regards
/Ilias