]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
smbios: smbios.h should not import ofnode.h
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 3 Jan 2024 08:07:20 +0000 (09:07 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 9 Jan 2024 09:09:15 +0000 (10:09 +0100)
The smbios.h include does not use any definitions from ofnode.h.
So don't include it.

As DECLARE_GLOBAL_DATA_PTR is no longer defined via dm/of.h we need to
add it to efi_smbios.c.

Add now missing includes to smbios-parser.c.

Remove a superfluous check comparing the sizes of the SMBIOS 2.1 and SMBIOS
3.0 anchors.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/smbios.h
lib/efi_loader/efi_smbios.c
lib/smbios-parser.c

index 49de32fec2deb7edf1cfe4d98971a83e71cc8a1d..b507b9d9d723bed32391003346a7826847b264da 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef _SMBIOS_H_
 #define _SMBIOS_H_
 
-#include <dm/ofnode.h>
+#include <linux/types.h>
 
 /* SMBIOS spec version implemented */
 #define SMBIOS_MAJOR_VER       3
@@ -80,10 +80,6 @@ struct __packed smbios3_entry {
        u64 struct_table_address;
 };
 
-/* These two structures should use the same amount of 16-byte-aligned space */
-static_assert(ALIGN(16, sizeof(struct smbios_entry)) ==
-             ALIGN(16, sizeof(struct smbios3_entry)));
-
 /* BIOS characteristics */
 #define BIOS_CHARACTERISTICS_PCI_SUPPORTED     (1 << 7)
 #define BIOS_CHARACTERISTICS_UPGRADEABLE       (1 << 11)
index eb6d2ba43c9c5bf5e3727aae02ba9b58211f3428..b2ec1f791940485f0e228efb1f78471e91fb6c49 100644 (file)
@@ -13,6 +13,9 @@
 #include <mapmem.h>
 #include <smbios.h>
 #include <linux/sizes.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 const efi_guid_t smbios3_guid = SMBIOS3_TABLE_GUID;
 
index 4a3732bcf2edd7df1c6b0a5af1e2448ba5708510..e1180efae18e4cb8bc74e87559fea0cfe07bff35 100644 (file)
@@ -5,8 +5,11 @@
 
 #define LOG_CATEGORY   LOGC_BOOT
 
+#include <errno.h>
 #include <smbios.h>
+#include <string.h>
 #include <tables_csum.h>
+#include <linux/kernel.h>
 
 const struct smbios_entry *smbios_entry(u64 address, u32 size)
 {