1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _ASM_FIXMAP_H 13 #define _ASM_FIXMAP_H 14 15 #define FIXADDR_USER_START __fix_to_virt(FIX_VDSO) 16 #define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1) 17 18 #ifndef __ASSEMBLY__ 19 #include <linux/kernel.h> 20 #include <asm/acpi.h> 21 #include <asm/apicdef.h> 22 #include <asm/page.h> 23 24 enum fixed_addresses { 25 FIX_HOLE, 26 FIX_VDSO, 27 FIX_DBGP_BASE, 28 FIX_EARLYCON_MEM_BASE, 29 __end_of_permanent_fixed_addresses, 30 31 #define NR_FIX_BTMAPS 16 32 FIX_BTMAP_END = __end_of_permanent_fixed_addresses, 33 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1, 34 FIX_WP_TEST, 35 __end_of_fixed_addresses 36 }; 37 38 #define set_fixmap(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL) 39 40 #define set_fixmap_nocache(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE) 41 42 #define clear_fixmap(idx) __set_fixmap(idx, 0, __pgprot(0)) 43 44 #define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) 45 46 #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) 47 #define __FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 48 #define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE) 49 #define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE) 50 51 #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) 52 #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) 53 54 #endif 55 #endif 56