Record the position of the SMBIOS tables

Remember where these end up so that we can pass this information on to
the EFI layer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2023-09-19 21:00:15 -06:00
committed by Bin Meng
parent 1b1d36ec58
commit 50834884a8
6 changed files with 19 additions and 0 deletions

View File

@@ -102,6 +102,9 @@ struct arch_global_data {
#ifdef CONFIG_ARCH_IMX8ULP
bool m33_handshake_done;
#endif
#ifdef CONFIG_SMBIOS
ulong smbios_start; /* Start address of SMBIOS table */
#endif
};
#include <asm-generic/global_data.h>

View File

@@ -32,6 +32,9 @@ struct arch_global_data {
ulong available_harts;
#endif
#endif
#ifdef CONFIG_SMBIOS
ulong smbios_start; /* Start address of SMBIOS table */
#endif
};
#include <asm-generic/global_data.h>

View File

@@ -17,6 +17,7 @@ struct arch_global_data {
ulong table_end; /* End address of x86 tables */
ulong table_start_high; /* Start address of high x86 tables */
ulong table_end_high; /* End address of high x86 tables */
ulong smbios_start; /* Start address of SMBIOS table */
};
#include <asm-generic/global_data.h>

View File

@@ -127,6 +127,7 @@ struct arch_global_data {
ulong table_end; /* End address of x86 tables */
ulong table_start_high; /* Start address of high x86 tables */
ulong table_end_high; /* End address of high x86 tables */
ulong smbios_start; /* Start address of SMBIOS table */
};
#endif

View File

@@ -97,6 +97,9 @@ int write_tables(void)
int size = table->size ? : CONFIG_ROM_TABLE_SIZE;
u32 rom_table_end;
if (!strcmp("smbios", table->name))
gd->arch.smbios_start = rom_addr;
if (IS_ENABLED(CONFIG_BLOBLIST_TABLES) && table->tag) {
if (!gd->arch.table_end)
gd->arch.table_end = rom_addr;

View File

@@ -552,6 +552,14 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_set_acpi_start(addr)
#endif
#ifdef CONFIG_SMBIOS
#define gd_smbios_start() gd->smbios_start
#define gd_set_smbios_start(addr) gd->arch.smbios_start = addr
#else
#define gd_smbios_start() 0UL
#define gd_set_smbios_start(addr)
#endif
#if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
#define gd_multi_dtb_fit() gd->multi_dtb_fit
#define gd_set_multi_dtb_fit(_dtb) gd->multi_dtb_fit = _dtb