From b2b58e1ef5c3f60ce6db1d6192c265d4ee45b170 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 31 Dec 2023 08:25:48 -0700 Subject: [PATCH] smbios: Correct gd_smbios_start() This should access arch-specific properties. Fix it and update the existing usage. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- 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 99bde9ec7e..fcc3c6e14c 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 bbb8421ce1..49adc87e45 100644 --- a/lib/efi_loader/efi_smbios.c +++ b/lib/efi_loader/efi_smbios.c @@ -28,7 +28,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; -- 2.39.5