xref: /OK3568_Linux_fs/kernel/arch/arm64/include/asm/dmi.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * arch/arm64/include/asm/dmi.h
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2013 Linaro Limited.
5*4882a593Smuzhiyun  * Written by: Yi Li (yi.li@linaro.org)
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * based on arch/ia64/include/asm/dmi.h
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
10*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
11*4882a593Smuzhiyun  * for more details.
12*4882a593Smuzhiyun  */
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #ifndef __ASM_DMI_H
15*4882a593Smuzhiyun #define __ASM_DMI_H
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #include <linux/io.h>
18*4882a593Smuzhiyun #include <linux/slab.h>
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun /*
21*4882a593Smuzhiyun  * According to section 2.3.6 of the UEFI spec, the firmware should not
22*4882a593Smuzhiyun  * request a virtual mapping for configuration tables such as SMBIOS.
23*4882a593Smuzhiyun  * This means we have to map them before use.
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun #define dmi_early_remap(x, l)		ioremap_cache(x, l)
26*4882a593Smuzhiyun #define dmi_early_unmap(x, l)		iounmap(x)
27*4882a593Smuzhiyun #define dmi_remap(x, l)			ioremap_cache(x, l)
28*4882a593Smuzhiyun #define dmi_unmap(x)			iounmap(x)
29*4882a593Smuzhiyun #define dmi_alloc(l)			kzalloc(l, GFP_KERNEL)
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #endif
32