summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-08-19 01:23:25 +0200
committerAlexander Graf <agraf@suse.de>2016-10-19 09:01:51 +0200
commite824cf3fb5857ef452bb84018da854328d816514 (patch)
treee5baa15278dad1051a83a285262b277d475d982e /arch
parent488bf12d842e51b8d596f104bc9bd9aa4d0501b6 (diff)
smbios: Allow compilation on 64bit systems
The SMBIOS generation code passes pointers as u32. That causes the compiler to warn on casts to pointers. This patch moves all address pointers to uintptr_t instead. Technically u32 would be enough for the current SMBIOS2 style tables, but we may want to extend the code to SMBIOS3 in the future which is 64bit address capable. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/lib/tables.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index e62705af41..025b183d6b 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -12,6 +12,11 @@
#include <asm/acpi_table.h>
#include <asm/coreboot_tables.h>
+static u32 write_smbios_table_wrapper(u32 addr)
+{
+ return write_smbios_table(addr);
+}
+
/**
* Function prototype to write a specific configuration table
*
@@ -34,7 +39,7 @@ static table_write table_write_funcs[] = {
write_acpi_tables,
#endif
#ifdef CONFIG_GENERATE_SMBIOS_TABLE
- write_smbios_table,
+ write_smbios_table_wrapper,
#endif
};