Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf074402 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Linus Torvalds
Browse files

firmware/dmi_scan: generalize for use by other archs



This patch makes a couple of changes to the SMBIOS/DMI scanning
code so it can be used on other archs (such as ARM and arm64):
(a) wrap the calls to ioremap()/iounmap(), this allows the use of a
    flavor of ioremap() more suitable for random unaligned access;
(b) allow the non-EFI fallback probe into hardcoded physical address
    0xF0000 to be disabled.

Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3e2a4c18
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -104,6 +104,7 @@ config HAVE_SETUP_PER_CPU_AREA
config DMI
config DMI
	bool
	bool
	default y
	default y
	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK


config EFI
config EFI
	bool
	bool
+5 −3
Original line number Original line Diff line number Diff line
@@ -5,8 +5,10 @@
#include <asm/io.h>
#include <asm/io.h>


/* Use normal IO mappings for DMI */
/* Use normal IO mappings for DMI */
#define dmi_ioremap ioremap
#define dmi_early_remap		ioremap
#define dmi_iounmap(x,l) iounmap(x)
#define dmi_early_unmap(x, l)	iounmap(x)
#define dmi_remap		ioremap
#define dmi_unmap		iounmap
#define dmi_alloc(l)		kzalloc(l, GFP_ATOMIC)
#define dmi_alloc(l)		kzalloc(l, GFP_ATOMIC)


#endif
#endif
+1 −0
Original line number Original line Diff line number Diff line
@@ -731,6 +731,7 @@ config APB_TIMER
# The code disables itself when not needed.
# The code disables itself when not needed.
config DMI
config DMI
	default y
	default y
	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
	bool "Enable DMI scanning" if EXPERT
	bool "Enable DMI scanning" if EXPERT
	---help---
	---help---
	  Enabled scanning of DMI to identify machine quirks. Say Y
	  Enabled scanning of DMI to identify machine quirks. Say Y
+4 −2
Original line number Original line Diff line number Diff line
@@ -13,7 +13,9 @@ static __always_inline __init void *dmi_alloc(unsigned len)
}
}


/* Use early IO mappings for DMI because it's initialized early */
/* Use early IO mappings for DMI because it's initialized early */
#define dmi_ioremap early_ioremap
#define dmi_early_remap		early_ioremap
#define dmi_iounmap early_iounmap
#define dmi_early_unmap		early_iounmap
#define dmi_remap		ioremap
#define dmi_unmap		iounmap


#endif /* _ASM_X86_DMI_H */
#endif /* _ASM_X86_DMI_H */
+3 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,9 @@ config DMI_SYSFS
	  under /sys/firmware/dmi when this option is enabled and
	  under /sys/firmware/dmi when this option is enabled and
	  loaded.
	  loaded.


config DMI_SCAN_MACHINE_NON_EFI_FALLBACK
	bool

config ISCSI_IBFT_FIND
config ISCSI_IBFT_FIND
	bool "iSCSI Boot Firmware Table Attributes"
	bool "iSCSI Boot Firmware Table Attributes"
	depends on X86
	depends on X86
Loading