]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Record the position of the SMBIOS tables
authorSimon Glass <sjg@chromium.org>
Wed, 20 Sep 2023 03:00:15 +0000 (21:00 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 21 Sep 2023 22:05:40 +0000 (06:05 +0800)
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>
arch/arm/include/asm/global_data.h
arch/riscv/include/asm/global_data.h
arch/sandbox/include/asm/global_data.h
arch/x86/include/asm/global_data.h
arch/x86/lib/tables.c
include/asm-generic/global_data.h

index 2a222c53882a68fb3cd9877bb089d286583f372d..b385bae02669a93eb19a69d35d9a73517c25791f 100644 (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>
index 9d97517e124c916d1c8bb4fe208a6d411e99dbf6..937fa4d15446e94f71986e1761a2019624a92669 100644 (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>
index f0ab3ba5c14641c8f3999ac3531624bdd57784d7..c6977735029d5d159642929a369545643b4636e5 100644 (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>
index ea58259ad774dacf39309f5831128dfe7b3b9e0a..6f4a7130f1da78f78a97a70a91153e84ed7849f4 100644 (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
index 67bc0a72aebc0d3a75375becb6b69dfc54757457..5b5070f7ca575d941b32c207fe94a9a74f2ec533 100644 (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;
index d47c674c742964c40351950fdd4afab87b6d3db2..c6d63b3657c36aed2c70e59381d79868f24d7b4b 100644 (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