aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_setup.c
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2020-11-11 11:18:11 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-11-14 05:05:46 +0100
commitc1c021052c7a03ed0226b4ce3e9b20c0498e2ccb (patch)
tree0fe96e4a2a44c00d3234048c2a5e3fca99d94d6b /lib/efi_loader/efi_setup.c
parent915e3ae5682dc41b32818e918b20c9aea0ba8076 (diff)
downloadu-boot-c1c021052c7a03ed0226b4ce3e9b20c0498e2ccb.zip
u-boot-c1c021052c7a03ed0226b4ce3e9b20c0498e2ccb.tar.gz
u-boot-c1c021052c7a03ed0226b4ce3e9b20c0498e2ccb.tar.bz2
efi_loader: Add basic EFI_TCG2_PROTOCOL support
Since U-boot EFI implementation is getting richer it makes sense to add support for EFI_TCG2_PROTOCOL taking advantage of any hardware TPM available on the device. This is the initial implementation of the protocol which only adds support for GetCapability(). It's limited in the newer and safer TPMv2 devices. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_setup.c')
-rw-r--r--lib/efi_loader/efi_setup.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index 45226c5..e206b60 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -156,6 +156,13 @@ efi_status_t efi_init_obj_list(void)
if (ret != EFI_SUCCESS)
goto out;
}
+
+ if (IS_ENABLED(CONFIG_EFI_TCG2_PROTOCOL)) {
+ ret = efi_tcg2_register();
+ if (ret != EFI_SUCCESS)
+ goto out;
+ }
+
/* Initialize variable services */
ret = efi_init_variables();
if (ret != EFI_SUCCESS)