Skip to contentSkip to conversation

Add dmi driver support on arm

PATCH New Yi Li 1 participant 2 messages Sep 6, 2013 Arm (32-bit)

lore
Share & tools
lore

Yi Li

author
#0 lore raw

PATCH 1/1 Add dmi driver support on arm

From: liyi <[email protected]>

x86 and IA64 have the DMI support, which is useful for supporting SMBIOS specification. All these SMBIOS tables will give the hardware information for user or applications.

This patch depends on EFI runtime service function which
not yet upstreamed, it has been generated against the tag leg-20130906.0 on git://git.linaro.org/people/graemegregory/linux.git."

liyi (1):
ARM:DMI: Add dmi driver support on arm

 arch/arm/Kconfig           |    9 +++++++++
 arch/arm/include/asm/dmi.h |   12 ++++++++++++
 arch/arm/kernel/setup.c    |    7 ++++++-
 3 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/dmi.h
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 ARM:DMI: Add dmi driver support on arm

From: liyi <[email protected]>

Add dmi driver support on arm, it depends on efi runtime service enabled.

---
 arch/arm/Kconfig           |    9 +++++++++
 arch/arm/include/asm/dmi.h |   12 ++++++++++++
 arch/arm/kernel/setup.c    |    7 ++++++-
 3 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/dmi.h
arch/arm/Kconfig +9 -0
index e8daccd..02abb1d 100644
@@ -1946,6 +1946,15 @@ config EFI_STUB
 	  executed directly by EFI firmware.
 	  See Documentation/efi-stub.txt for more information.
 
+config DMI
+	default y
+	bool "Enable DMI scanning" if EXPERT
+	---help---
+	  Enabled scanning of DMI to identify machine quirks. Say Y
+	  here unless you have verified that your setup is not
+	  affected by entries in the DMI blacklist. Required by EFI
+	  support.
+
 config SECCOMP
 	bool
 	prompt "Enable seccomp to safely compute untrusted bytecode"
arch/arm/include/asm/dmi.h new file +12 -0
new file mode 100644
index 0000000..84baf0e
@@ -0,0 +1,12 @@
+#ifndef _ASM_DMI_H
+#define _ASM_DMI_H 1
+
+#include <linux/slab.h>
+#include <asm/io.h>
+#include <asm/mach/map.h>
+/* Use normal IO mappings for DMI */
+#define dmi_ioremap(x, l) __arm_ioremap((x), (l), MT_MEMORY)
+#define dmi_iounmap(x, l) __arm_iounmap((x))
+#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
+
+#endif
arch/arm/kernel/setup.c +6 -1
index a440211..2194554 100644
@@ -34,13 +34,15 @@
 #ifdef CONFIG_ACPI
 #include <linux/acpi.h>
 #endif
+#ifdef CONFIG_DMI
+#include <linux/dmi.h>
+#endif
 
 #include <asm/unified.h>
 #include <asm/cp15.h>
 #include <asm/cpu.h>
 #include <asm/cputype.h>
 #include <asm/elf.h>
-#include <asm/io.h>
 #include <asm/procinfo.h>
 #include <asm/psci.h>
 #include <asm/sections.h>
@@ -1073,3 +1075,6 @@ const struct seq_operations cpuinfo_op = {
 	.stop	= c_stop,
 	.show	= c_show
 };
+#ifdef CONFIG_DMI
+	core_initcall(dmi_scan_machine);
+#endif
Signature · 1 line
1.7.9.5