[PATCH v2 4/6] smbios: Correct gd_smbios_start()

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Dec 26 12:03:07 CET 2023


On 10/15/23 04:45, Simon Glass wrote:
> This should access arch-specific properties. Fix it and update the
> existing usage.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

> ---
>
> Changes in v2:
> - Add a new patch to correct gd_smbios_start()
>
>   include/asm-generic/global_data.h | 2 +-
>   lib/efi_loader/efi_smbios.c       | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
> index e8c6412e3f8d..c1f7818817f2 100644
> --- a/include/asm-generic/global_data.h
> +++ b/include/asm-generic/global_data.h
> @@ -553,7 +553,7 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
>   #endif
>
>   #ifdef CONFIG_SMBIOS
> -#define gd_smbios_start()	gd->smbios_start
> +#define gd_smbios_start()	gd->arch.smbios_start
>   #define gd_set_smbios_start(addr)	gd->arch.smbios_start = addr
>   #else
>   #define gd_smbios_start()	0UL
> diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
> index 48446f654d9b..4ae4e4a7c236 100644
> --- a/lib/efi_loader/efi_smbios.c
> +++ b/lib/efi_loader/efi_smbios.c
> @@ -29,7 +29,7 @@ efi_status_t efi_smbios_register(void)
>   	ulong addr;
>   	efi_status_t ret;
>
> -	addr = gd->arch.smbios_start;
> +	addr = gd_smbios_start();
>   	if (!addr) {
>   		log_err("No SMBIOS tables to install\n");
>   		return EFI_NOT_FOUND;



More information about the U-Boot mailing list