aboutsummaryrefslogtreecommitdiff
path: root/include/smbios.h
diff options
context:
space:
mode:
authorSimon Glass2023-12-31 08:25:47 -0700
committerSimon Glass2024-01-07 13:45:06 -0700
commit70924294f375c351339f029b9615b52608e04cf4 (patch)
tree0439d95d7bb8926aacede0981ccb8ce55c1fca6b /include/smbios.h
parentde4b91ca686f1bedf46319f31b626cfe26665810 (diff)
smbios: Use SMBIOS 3.0 to support an address above 4GB
When the SMBIOS table is written to an address above 4GB a 32-bit table address is not large enough. Use an SMBIOS3 table in that case. Note that we cannot use efi_allocate_pages() since this function has nothing to do with EFI. There is no equivalent function to allocate memory below 4GB in U-Boot. One solution would be to create a separate malloc() pool, or just always put the malloc() pool below 4GB. - Use log_debug() for warning - Rebase on Heinrich's smbios.h patch - Set the checksum for SMBIOS3 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include/smbios.h')
-rw-r--r--include/smbios.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/smbios.h b/include/smbios.h
index e601283d293..77be58887a2 100644
--- a/include/smbios.h
+++ b/include/smbios.h
@@ -12,7 +12,7 @@
/* SMBIOS spec version implemented */
#define SMBIOS_MAJOR_VER 3
-#define SMBIOS_MINOR_VER 0
+#define SMBIOS_MINOR_VER 7
enum {
SMBIOS_STR_MAX = 64, /* Maximum length allowed for a string */
@@ -80,6 +80,10 @@ 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)