On Saturday, November 23, 2013 01:05 AM, Ard Biesheuvel wrote:
On 22 November 2013 17:43, Yi Li yi.li@linaro.org wrote:
Add dmi support on arm64, it depends on efi boot.
Signed-off-by: Yi Li yi.li@linaro.org
arch/arm64/Kconfig | 8 ++++++++ arch/arm64/include/asm/dmi.h | 29 +++++++++++++++++++++++++++++ arch/arm64/kernel/setup.c | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 arch/arm64/include/asm/dmi.h
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index d5aaddf..5fda3b4 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -292,6 +292,14 @@ config EFI_STUB by EFI firmware without the use of a bootloader. See Documentation/efi-stub.txt for more information.
+config DMI
default y
bool "Enable DMI scanning"
---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
endmenusupport.
Where does this text come from? It more or less suggests that you can disable this once you have checked that your system is not blacklisted, which seems bogus to me. Also, if EFI requires it, should we not have a 'depends on' or 'select' relation between the two somewhere?
Yi: the text comes from arch/x86/Kconfig.
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..f25a7da --- /dev/null +++ b/arch/arm64/include/asm/dmi.h @@ -0,0 +1,29 @@ +/*
- 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 */ +#define dmi_early_remap early_memremap +#define dmi_early_unmap(x, l) early_iounmap(x, l)
This seems sane, although you can drop the (x, l) here
Yi: ok.
+#define dmi_remap early_memremap +#define dmi_unmap(x, l) early_iounmap(x, l)
As far as I understand from Leif, these are not callable anymore when the memory system is fully up and running.
Yi: maybe, but it is tested under FVP.