Message ID | 20231015024511.3995580-5-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | smbios: Deal with tables beyond 4GB | expand |
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@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@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;
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;
This should access arch-specific properties. Fix it and update the existing usage. Signed-off-by: Simon Glass <sjg@chromium.org> --- 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(-)