aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-01-26 09:13:22 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-01-29 11:31:28 +0100
commit796469c453325c2778b388ee4bd67f4dc0d16685 (patch)
tree6b84d86edc825590f78ee674a3f0a7a1f59ad2e7 /lib
parent102ab672d39fb90659dc8464ef77fcc607ba20a5 (diff)
downloadu-boot-796469c453325c2778b388ee4bd67f4dc0d16685.zip
u-boot-796469c453325c2778b388ee4bd67f4dc0d16685.tar.gz
u-boot-796469c453325c2778b388ee4bd67f4dc0d16685.tar.bz2
efi_loader: replace find_smbios_table by library function
The code in find_smbios_table() is redundant to efi_get_configuration_table(). Replace it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_tcg2.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index 85562c5..b5d4aa7 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -1129,23 +1129,6 @@ out:
}
/**
- * find_smbios_table() - find smbios table
- *
- * Return: pointer to the smbios table
- */
-static void *find_smbios_table(void)
-{
- u32 i;
-
- for (i = 0; i < systab.nr_tables; i++) {
- if (!guidcmp(&smbios3_guid, &systab.tables[i].guid))
- return systab.tables[i].table;
- }
-
- return NULL;
-}
-
-/**
* tcg2_measure_gpt_table() - measure gpt table
*
* @dev: TPM device
@@ -1387,7 +1370,7 @@ efi_status_t efi_tcg2_measure_efi_app_invocation(struct efi_loaded_image_obj *ha
if (ret != EFI_SUCCESS)
goto out;
- entry = (struct smbios3_entry *)find_smbios_table();
+ entry = efi_get_configuration_table(&smbios3_guid);
if (entry) {
ret = tcg2_measure_smbios(dev, entry);
if (ret != EFI_SUCCESS)