Skip to content
Commit b73948c7 authored by Ilias Apalodimas's avatar Ilias Apalodimas
Browse files

efi_loader: fix the return values on efi_tcg



A while back we moved the core functions of the EFI TCG protocol to the
TPM APIs in order for them to be used with bootm, booti etc.
Some prototypes changed from returning efi_status_t to int, which is more
appropriate for the non-EFI APIs. However, some of the EFI callsites never
changed and we ended up assigning the int value to efi_status_t.

This is unlikely to cause any problems, apart from returning invalid
values on failures and violating the EFI spec. Let's fix them
by looking at the new return code and map it to the proper EFI return
code on failures.

Fixes: commit 97707f12 ("tpm: Support boot measurements")
Fixes: commit d6b55a42 ("efi_loader: startup the tpm device when installing the protocol")
Reviewed-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
parent 27d49662
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment