Hi Yi,
On 27 May 2014 18:49, Yi Li yi.li@linaro.org wrote:
Add smbios/dmi support on arm64 system, it depends on EFI boot.
Signed-off-by: Yi Li yi.li@linaro.org
arch/arm64/Kconfig | 11 +++++++++++ arch/arm64/include/asm/dmi.h | 28 ++++++++++++++++++++++++++++ arch/arm64/kernel/setup.c | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 arch/arm64/include/asm/dmi.h
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 385236f..0fd8ed8 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -295,6 +295,17 @@ config EFI allow the kernel to be booted as an EFI application. This is only useful on systems that have UEFI firmware.
+config DMI
bool "Enable support for SMBIOS (DMI) tables"
depends on EFI
default y
help
This enables SMBIOS/DMI feature for systems.
This option is only useful on systems that have UEFI firmware.
However, even with this option, the resultant kernel should
continue to boot on existing non-UEFI platforms.
dmideocde tool can work which depends on STRICT_DEVMEM is false.
Typo and poor grammar here, but I think you can drop this line entirely (assuming the statement applies equally to x86)
endmenu
menu "Userspace binary formats" diff --git a/arch/arm64/include/asm/dmi.h b/arch/arm64/include/asm/dmi.h new file mode 100644 index 0000000..f6e6004 --- /dev/null +++ b/arch/arm64/include/asm/dmi.h @@ -0,0 +1,28 @@ +/*
- arch/arm64/include/asm/dmi.h
- Copyright (C) 2013 Linaro Limited.
- Written by: Yi Li (yi.li@linaro.org)
- based on arch/ia64/include/asm/dmi.h
- This file is subject to the terms and conditions of the GNU General Public
- License. See the file "COPYING" in the main directory of this archive
- for more details.
- */
+#ifndef _ASM_DMI_H +#define _ASM_DMI_H 1
+#include <linux/slab.h> +#include <asm/io.h>
+/* Use normal IO mappings for DMI */
What is a 'normal IO mapping' and how does this statement apply to the macros below?
+#define dmi_early_remap(x, l) efi_lookup_mapped_addr(x) +#define dmi_early_unmap(x, l) +#define dmi_remap(x, l) efi_lookup_mapped_addr(x) +#define dmi_unmap(x) +#define dmi_alloc(l) kzalloc(l, GFP_ATOMIC)
+#endif diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 72a0c8e..7de9e96 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -43,6 +43,7 @@ #include <linux/of_platform.h> #include <linux/efi.h> #include <linux/acpi.h>
The patch by itself could be merged once the EFI changes are in, but due to this #include, it now depends on ACPI support as well. If you were planning to propose it for mainline (again), you should at least rebase it so it applies cleanly to matt fleming's arm64-efi branch.