[PATCH 1/2] efi_loader: export efi_get_configuration_table
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Jan 26 09:09:45 CET 2024
On Fri, 26 Jan 2024 at 09:54, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> In multiple places we need a function to find an EFI configuration table.
> Rename get_config_table() to efi_get_configuration_table() and export it.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> include/efi_loader.h | 2 ++
> lib/efi_loader/efi_helper.c | 6 +++---
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index d5fca2fa5ef..2c44614dde4 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -545,6 +545,8 @@ void efi_setup_console_size(void);
> /* Set up load options from environment variable */
> efi_status_t efi_env_set_load_options(efi_handle_t handle, const char *env_var,
> u16 **load_options);
> +/* Get EFI configuration table */
> +void *efi_get_configuration_table(const efi_guid_t *guid);
> /* Install device tree */
> efi_status_t efi_install_fdt(void *fdt);
> /* Execute loaded UEFI image */
> diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
> index 11066eb505d..5dd9cc876e4 100644
> --- a/lib/efi_loader/efi_helper.c
> +++ b/lib/efi_loader/efi_helper.c
> @@ -380,12 +380,12 @@ done:
> }
>
> /**
> - * get_config_table() - get configuration table
> + * efi_get_configuration_table() - get configuration table
> *
> * @guid: GUID of the configuration table
> * Return: pointer to configuration table or NULL
> */
> -static void *get_config_table(const efi_guid_t *guid)
> +void *efi_get_configuration_table(const efi_guid_t *guid)
> {
> size_t i;
>
> @@ -430,7 +430,7 @@ efi_status_t efi_install_fdt(void *fdt)
> uintptr_t fdt_addr;
>
> /* Look for device tree that is already installed */
> - if (get_config_table(&efi_guid_fdt))
> + if (efi_get_configuration_table(&efi_guid_fdt))
> return EFI_SUCCESS;
> /* Check if there is a hardware device tree */
> fdt_opt = env_get("fdt_addr");
> --
> 2.43.0
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list