aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_setup.c
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2020-11-30 11:47:40 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-12-03 21:22:40 +0100
commitc8d0fd582576ff7cc67d0053282430476201fd33 (patch)
treee23f1673ca05d9909846924d3020f31adfeb6ded /lib/efi_loader/efi_setup.c
parent8e0b0871b82db0511440208b101ecf488858e915 (diff)
downloadu-boot-c8d0fd582576ff7cc67d0053282430476201fd33.zip
u-boot-c8d0fd582576ff7cc67d0053282430476201fd33.tar.gz
u-boot-c8d0fd582576ff7cc67d0053282430476201fd33.tar.bz2
efi_loader: Introduce eventlog support for TCG2_PROTOCOL
In the previous patches we only introduced a minimal subset of the EFI_TCG2_PROTOCOL protocol implementing GetCapability(). So let's continue adding features to it, introducing the GetEventLog() and HashLogExtendEvent() functions. In order to do that we first need to construct the eventlog in memory, specifically in EFI_BOOT_SERVICES_DATA memory and a configuration table from EFI_ACPI_MEMORY_NVS. U-Boot won't currently add any events to the log or measure any components, but will expose the necessary EFI APIs for applications to do so. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/efi_loader/efi_setup.c')
-rw-r--r--lib/efi_loader/efi_setup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c
index e206b60..2bb2c3c 100644
--- a/lib/efi_loader/efi_setup.c
+++ b/lib/efi_loader/efi_setup.c
@@ -157,12 +157,6 @@ efi_status_t efi_init_obj_list(void)
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)
@@ -189,6 +183,12 @@ 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;
+ }
+
/* Secure boot */
ret = efi_init_secure_boot();
if (ret != EFI_SUCCESS)